Problem Statement in General (Text) Format

PSG supports Full and Short Description of Optimization and Calculate Problems in General (Text) format.

 

Syntax

Full format of Optimization Problem (see Problem) has the following general layout:

 

 

Problem: <problem name>, type = {minimize | maximize}

 

Objective: <objective name> [, linearize = 1 | , quadratic = 1]

[<coefficient 1>*] <function 1>

.........................................

[<coefficient K>*] <function K>

 

Constraint: <constraint name> [, lower_bound =<lower bound>] [,   upper_bound =<upper bound>] [, linearize = 1 ]

[<coefficient 1>*] <function 1>

.........................................

[<coefficient K>*] <function K>

 

...............................................

 

Constraint: <constraint name> [, lower_bound =<lower bound>][, upper_bound =<upper bound>] [, linearize = 1 ]

[<coefficient 1>*] <function 1>

.........................................

[<coefficient K>*] <function K>

 

 

Value:

<function 1>

....................

<function K>

 

Box_of_Variables: [lowerbounds = <point_lowerbounds>] [,  upperbounds = <point_upperbounds>, ][, types = <point_types>|0|1|2 ]

 

Solver: [{ VAN | CAR | BULDOZER | TANK },] [precision = { 1 |...| 9 }] [ , stages = { 1 |...| 30 } ] [ , timelimit = <float_number> ] [ , init_point = <point_name> ]

 

 

 

Short format of Optimization Problem (see Problem) is obtained from Full format by dropping an inessential for optimization process information.

Short format of Optimization Problem has the following layout:

 

 

{minimize | maximize}

 

[ linearize = 1 |  quadratic = 1]

[<coefficient 1>*] <function 1>

................................

[<coefficient K>*] <function K>

 

Constraint: { == | >= | <= } <bound>][, linearize = 1]

[<coefficient 1>*] <function 1>

................................

[<coefficient K>*] <function K>

 

...............................................

 

Constraint: { == | >= | <= } <bound>][, linearize = 1]

[<coefficient 1>*] <function 1>

...............................

[<coefficient K>*] <function K>

 

Value:

<function 1>

............

<function K>

 

Box: { == | >= | <= } <point> [, types = <point_types>|0|1|2]

 

 

 

Full format of Calculate Problem (see Calculate Problem) has the following general layout:

 

 

Problem: <problem name>, type = calculate

 

Point: <point name>

 

Objective: <objective name>

[<coefficient 1>*] <function 1>

...............................

[<coefficient K>*] <function K>

 

Constraint: <constraint name>

[<coefficient 1>*] <function 1>

...............................

[<coefficient K>*] <function K>

 

...............................................

 

Constraint: <constraint name>

[<coefficient 1>*] <function 1>

...............................

[<coefficient K>*] <function K>

 

 

Value:

<function 1>

............

<function K>

 

 

 

 

Short format of Calculate Problem (see Calculate Problem) is obtained from Full format by dropping an inessential for optimization process information.

Short format of Calculate Problem has the following layout:

 

 

calculate

 

Point: <point name>

 

[<coefficient 1>*] <function 1>

..............................

[<coefficient K>*] <function K>

 

Constraint:

[<coefficient 1>*] <function 1>

...............................

[<coefficient K>*] <function K>

 

...............................................

 

Constraint:

[<coefficient 1>*] <function 1>

...............................

[<coefficient K>*] <function K>

 

 

Value:

<function 1>

............

<function K>

 

 

 

 

Description

 

Problem statement consists of the following five main sections:

 

Problem:

Objective:

Constraint:

Box:

Solver:

 

Problem statement  may also include the following two additional sections:

Point:

Value:

 

Sections in Optimization Problem  should be ordered as follows:

Problem:   Objective:  Constraint:  Point: Value:  Box:  Solver:

 

Sections in Calculate Problem  should be ordered as follows:

Problem:   Point:  Objective:  Constraint:  Value:

 

All sections except “Problem:”  are optional. For missing parameters and sections default values are applied.

Problem statement string may include empty lines. Comment can be written in any line of the problem statement.

Comment must begin with  '%' character.

 

The section “Problem:” consists of a single line, and should be the first in the Problem statement.

 

In Full format this section must begin with  the keyword "Problem", and  include Problem name as well as type ("minimize", "maximize", or "calculate"). Default type is "minimize". In Optimization Problem only "minimize" or "maximize"  types are used; in Calculate Problem only "calculate" type is used.

 

In Short format of Optimization Problem this section includes only "minimize", or "maximize" type; in Short format of Calculate Problem this section includes only "calculate" type..

 

The name of Problem should contain up to 128 symbols and should begin with the string “problem_”. The name of Problem should include only alphabetic characters, numbers, and the underscore sign, “_”.  The name of Problem  is "insensitive" to the case, i.e. there is no difference between low case and upper case in the Poblem name.

 

Remark

Comment in problem statement can be placed after symbol %. Comment ends with the end of line. For instance:

minimize % Comment: type of problem

 

 

Examples

 Example 1 (Full format of Optimization Problem).

Problem: problem_CSection_LOGEXPSUM_POLYNOMAMS_RegLikelihood, type = maximize

Objective: objective_regularized_likelihood

 logexp_sum_matrix_allscenarios(matrix_allscenarios)

 -polynom_abs_matrix_coefficients(matrix_coefficients)

Box_of_variables: lowerbounds = point_lowerbounds, upperbounds = point_upperbounds

Solver: VAN, precision = 9, stages = 6

 

 

Example 1 (Short format of Optimization Problem).

maximize

 logexp_sum(matrix_allscenarios)

 -polynom_abs(matrix_coefficients)

Box: >= point_lowerbounds, <= point_upperbounds

Solver: precision = 9

 

Example 2 (Short format of Calculate Problem).

calculate

Point: point_problem_1

 meanabs_pen(spline_sum(matrix_parameters_5_pieces,matrix_data,matrix_data_knots))

 spline_sum(matrix_parameters_5_pieces, matrix_data,matrix_data_knots)

 

Example 2 (Full format of Calculate Problem).

 

Problem: problem_SimpleCrossValidation_NN, type = calculate

Point: point_problem_1

Objective: objective_cvar1

 cvar_risk_1(0.75,matrix_cut)

Value:

 cvar_risk_2(0.75,matrix_take)

 

Example 3 (Full format of Optimization Problem).

Problem: problem_3_Trans_Costs, type = maximize

Objective: objective_expected_gain_1, linearize = 1

 avg_g_expected_gain_1(matrix_loss_1)

Constraint: constraint_polynom_abs_nonlinear, upper_bound = 0

 linear_price(matrix_initial_prices)

 polynom_abs_2(matrix_polynom_abs_2)

Constraint: constraint_on_CVaR_1, upper_bound = 1000, linearize = 1

 cvar_risk_1(0.9, matrix_loss_1)

Box_of_Variables: lowerbounds = point_lowerbounds, upperbounds = point_upperbounds

Solver: VAN, precision = 9, stages = 6

 

Example 3 (Short format of Optimization Problem).

 

maximize

linearize = 1

 avg_g(matrix_loss_1)

Constraint: <= 0

 linear(matrix_initial_prices)

 polynom_abs(matrix_polynom_abs_2)

Constraint: <= 1000, linearize = 1

 cvar_risk(0.9, matrix_loss_1)

Box: >= point_lowerbounds, <= point_upperbounds

Solver: precision = 9

 

Example 4 (Full format of Optimization Problem).

 

Problem: problem_SimpleCrossValidation_NN, type = minimize

Objective: objective_cvar1

 cvar_risk_1(0.75,matrix_cut)

Value:

 cvar_risk_2(0.75,matrix_take)

Box_of_variables: lowerbounds = -10, upperbounds = 10

Solver: VAN, precision = 6

 

Example 4 (Short format of Optimization Problem).

 

minimize

 cvar_risk(0.75,matrix_cut)

Value:

 cvar_risk(0.75,matrix_take)

Box: >= -10, upperbounds = 10, <= 10