A solution point of an optimization problem has to satisfy all Constraints in the problem statement. Constraint has the following general mathematical form:
,
where are Functions, are coefficients (numbers), is a Lower bound on the Constraint, and is an Upper bound on the Constraint.
Some functions can not be included in linear combinations; for instance, functions from Probability group should not be combined with other functions (see Constraint).
Many linear Constraints are included in one Multiple Linear Constraint with Linear Multiple function (see Linear Group). The Multiple Linear Constraint has the following general mathematical form:
L ≤ Linear Multiple Function ≤ U ,
where
• | "L" equals to "-Infinity", or number, or a vector containing lower bounds for the linear constraints in the Multiple Linear Constraint; |
• | "U" equals to "Infinity", or number, or a vector containing upper bounds for the linear constraints in the Multiple Linear Constraint. |
Syntax
Full Format of Constraint section :
Constraint: <constraint name> [, lower_bound = <lower bound>] [, upper_bound = <upper bound>] [, linearize = 1 ] [<coefficient 1>*] <function 1> ............................... [<coefficient K>*] <function K>
|
Short Format of Constraint section :
Constraint: [{ == | >= | <= } <bound>] [, linearize = 1] [<coefficient 1>*] <function 1> ................................ [<coefficient K>*] <function K> |
Description
Every constraint is included in one Constraint section. Keyword "Constraint:" at the beginning of the section is mandatory.
In Full format the first line must also include Constraint name, and optionally bounds and parameter "linearize". The string "lower_bound =<lower bound>" specifies the Constraint lower bound (optional). If this string is skipped, it is considered that Constraint is unbounded from below. String in angle brackets "<lower bound>" denotes some number (positive or negative) or "-Infinity" (-) or name of a vector with lower bounds for Multiple Linear Constraint.
Similarly, the string "upper_bound = <upper bound>" specifies the Constraint upper bound (optional). If this string is skipped, it is considered that Constraint is unbounded from above. The string in angle brackets "<upper bound>" denotes some number (positive or negative) or "Infinity" (+) or name of a vector with upper bounds for Multiple Linear Constraint.
If linearize = 1 , then Constraint is linearized (if possible), i.e., a piecewise linear function is replaced by a system of linear Constraints The linearization option may speedup optimization if the number of scenarios in Matrices of Scenarios in all functions in the Constraint does not significantly exceeds the number of variables in the Constraint.
Each line in Constraint section describes only one function with a coefficient.
In Short Format Constraint name is skipped. Lower bound is defined by the string "<=" and Upper bound by ">=". The string "==" means that lower bound equals to upper bound.
The name of a Constraint may contain up to 128 symbols and should begin with the string “constraint_”. The name of the Constraint may include only alphabetic characters, numbers, and the underscore sign, “_”. The name of the Constraint is case "insensitive", i.e. there is no difference between low and upper case in the Constraint name.
The string in italics in angle brackets <constraint name> is the Constraint name which:
• | Contains up to 128 symbols; |
• | Begins with the string “constraint_”; |
• | Includes only alphabetic characters, numbers, and the underscore sign, “_”. |
The strings in italics in angle brackets <coefficient 1>,...,<coefficient K> are the coefficients . Values of coefficients less than -1020 are treated as -∞, and values larger than 1020 are treated as +∞.
Text string in square brackets "[]" with coefficient=1 can be skipped. For example, the text "<coefficient K>* " can be skipped if .
The strings in italics in angle brackets <function 1>,...,<function K> specify functions included in Constraint (for details see Function in Text Format).
Example
minimize
meanabs_dev(matrix_scenarios)
Constraint: <= 80, linearize = 1
polynom_abs(matrix_constraint_budget)
Box: >= point_lowerbounds, <= point_upperbounds
Solver: tank
See also