manpagez: man pages & more
info gmpl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.5 Objective statement

minimize name alias domain : expression ;

maximize name alias domain : expression ;

Where:

name is the symbolic name of the objective;

alias is an optional string literal which specifies the alias of the objective;

domain is an optional indexing expression which specifies the subscript domain of the objective;

expression is an linear expression for computing the linear form of the objective

Examples

 
minimize obj: x + 1.5 * (y + z);
maximize total_profit: sum{p in prd} profit[p] * make[p];

The objective statement declares an objective. If the subscript domain is not specified, the objective is a simple (scalar) objective. Otherwise it is a n-dimensional array of elemental objectives.

Elemental objective(s) associated with the model objective (if it is a simple objective) or its members (if it is an array) correspond to general linear constraints in the LP/MIP problem formulation (see Section “Linear programming problem”). However, unlike constraints the corresponding linear forms are free (unbounded).

Constructing the actual linear constraint included in the problem instance, which (constraint) corresponds to a particular elemental objective, is performed as follows. The linear expression specified in the objective statement is evaluated that gives the resultant linear form:

f = a1 x1 + a2 x2 + … + an xn + a0,

where x1, x2, …, xn are elemental variables, a1, a2, …, an are numeric coefficients, a0 is the constant term. Then the linear form is used to construct the final elemental constraint in the standard form:

-inf < a1 x1 + a2 x2 + … + an xn + a0 < +inf.

As a rule the model description contains only one objective statement that defines the objective function (1) used in the problem instance. However, it is allowed to declare arbitrary number of objectives, in which case the actual objective function is the first objective encountered in the model description. Other objectives are also included in the problem instance, but they do not affect the objective function.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2024
Individual documents may contain additional copyright information.