Objectives and Constraints include a linear combination of PSG built-in Functions (see Function).

 

Syntax

 

<function name>([<parameter value>], <matrix name 1>, [<matrix name 2>,...,<matrix name K >] )

 

 

The text in italics in angle brackets <function name> is the Function name.

 

In Full Format:

<function name> = <function prefix>_<additional_name>

 

In Short Format:

<function name> = <function prefix>  

 

List of function prefixes are column "Brief Name" in the table "Table (List) of Functions" in section Function.

 

<function name>:

Contains up to 128 symbols;
Begins with function prefix;
Includes only alphabetic characters, numbers, and the underscore sign, “_”.

 

Remark 1

More complicated Text Format is used  for some Functions (for instance, see Calculation of Risk Functions Defined on Recourse Function).

 

The strings in italics in angle brackets <matrix name 1>,...,<matrix name K > are names of matrices in corresponding Function. The <matrix name> is the name of a text file (without extension ".txt")  containing matrix data. Files with matrices should have extension ".txt" . The name of matrix should coincide with the name of text file containing this matrix. Format of a file with matrix is described in PSG Matrix in General (Text) Format.

 

<matrix name>:

Contains up to 128 symbols and include only alphabetic characters, numbers, and the underscore sign, “_”;
The name of a PSG Matrix (including Matrix of Scenarios and Symmetric Matrix) should begin with the string “matrix_” (see PSG Matrix);
The name of a Packed PSG Matrix should begin with the string “pmatrix_” (see Sparse (Packed) Matrix Format).

 

Remark 2

If Function depends on more than one matrices and names of matrices differ only by numbers, then all names of matrices may be omitted and changed with three dots "..." except the first one and the last one:

 

prmulti_pen(3, matrix_1, matrix_2, matrix_3, matrix_4)

 

equivalently

 

prmulti_pen(3, matrix_1, ..., matrix_4)

 

 

Remark 3

A linear combination of functions in Objective, Constraints, Value may be typed in different lines or in one line with separators "+" or "-":

[<coefficient 1>] <function 1> + [<coefficient 2>] <function 2> - [<coefficient 3>] <function 3>

 

 

Examples of Functions in Short Text Format

cvar_risk(0.1, matrix_1)

prmulti_pen(3, matrix_1, matrix_2, matrix_3)

pm_pen_nd(0.37837,  matrix_mean,  matrix_cov)

prmulti_pen(0, pmatrix_xab, pmatrix_xac, pmatrix_xba, pmatrix_xbc, pmatrix_xbd)

 

Examples of Functions in Full Text Format (containing some symbols after the function prefix)

cvar_risk_kuku(0.1, matrix_1)

prmulti_pen_2(3, matrix_1, matrix_2, matrix_3)

pm_pen_nd_1(0.37837,  matrix_mean,  matrix_cov)

prmulti_pen_prix(0, pmatrix_xab, pmatrix_xac, pmatrix_xba, pmatrix_xbc, pmatrix_xbd)