Basics of solution based report writing calculations

Top  Previous  Next

Information relative to the variable, equation and model solution is passed to GAMS from solvers.  These information are used in report writing computations (see the Calculating Items chapter for further discussion).

Variables and equations have attributes that contain the optimal level and marginal values for them in the current solution.

The level value attribute for a variable is the current optimal value in the solution.  The attribute is addressed using .L as follows

 

 Variablename.L(setdependency)

 

This may also be done implicitly using $Ondotl.

 

The level value attribute for an equation is the endogenous terms in the equation evaluated at the current solution value for the variables after a solution.  The attribute is addressed using .L as follows:

 

            Equationname.L(setdependency)

 

The marginal attribute for a variable is the current reduced cost to force a variable in the solution.  The attribute is addressed using .M as follows

 

            Variablename.M(setdependency)

 

The marginal value attribute for an equation is the dual value or shadow price for the equations after a solution.  The attribute is addressed using .M as follows:

 

           Equationname.M(setdependency)

 

The numerical values of these parameters are generally redefined every time a solve is executed.  In general, these items can be used in calculations just like any other parameter once a solve has been completed.

Note model solution attributes like modelname.modelstat can also be used to indicate whether an optimal solution was attained as discussed in the Model Attributes chapter.