|
The next output item is the equation listing, which is marked with that subtitle on the output file and is controlled by Option Limrow. Once you succeed in building an input file devoid of compilation errors, GAMS is able to generate a model. The question remains -- and only you can answer it -- does GAMS generate the model you intended? The equation listing is a device for studying this extremely important question (as are many of the features of GAMSCHK). This component of the LST file shows specific equations generated within the model when the current values of the sets and parameters are plugged into the general algebraic form of the model. For the shortmodel.gms example it is
---- OBJT =E= OBJECTIVE FUNCTION ( PROFIT )
OBJT.. - 3*PRODUCTION(makechair) - 12*PRODUCTION(maketable)
- 0.5*PRODUCTION(makelamp) + PROFIT =E= 0 ; (LHS = 0)
---- AVAILABLE =L= RESOURCES AVAILABLE
AVAILABLE(plantcap).. 3*PRODUCTION(makechair) + 2*PRODUCTION(maketable)
+ 1.1*PRODUCTION(makelamp) =L= 10 ; (LHS = 0)
AVAILABLE(salecontrct).. PRODUCTION(makechair) - PRODUCTION(maketable) =L= 3
; (LHS = 0)
Notes:
| • | The equation listing shows the cases of each constraint, variables that appear, numerical values of the individual coefficients and the equation type. |
| • | The constant term on the right-hand-side value collapses all constants in the equation with appropriate sign alterations. |
| • | The equation listing for each equation block is set off with four dashes ---- to facilitate mechanical searching. |
| • | The coefficients are shown with four decimal places if needed, but trailing zeroes following the decimal point are suppressed. E-format is used to prevent small numbers being displayed as zero and to allow large numbers. |
| • | The default output is a maximum of three index cases for each equation block. To change the default, insert an option statement prior to the solve statement: option limrow = r ; where r is the desired number of equation cases in a block to be displayed. Equations that are infeasible at the starting point are marked with three asterisks (***) as in the NLP listing just below. |
| • | The order in which the equations and equation cases are listed depends on the form of the model statement. If /all/ was used then the order is determined by the entry order of the equations and the placement of set elements in the unique element list as discussed in the Rules for Item Capitalization and Ordering chapter. On the other hand if the equations are explicitly listed in the model statement, then the listing will be in the order in that list with elements listed according to the unique element list. |
| • | Nonlinear terms are also included here but are marked and are local evaluations. Namely, nonlinear coefficients are enclosed in parentheses, and the value of the coefficient depends on the level attributes (.l values) of the variables. The listing shows the partial derivative of each variable evaluated at their current level values and there is an implicit unlisted constant involved with the function evaluations. For the example simpnlp.gms with the equation |
Eq1.. 2*sqr(x)*power(y,3) + 5*x - 1.5/y =e= 2;
At the starting point
x.l = 2; y.l = 3 ;
The equation listing contains
Eq1.. (221)*x + (216.1667)*y =2= ; (lhs = 225.5 ***)
For further discussion see the NLP and MCP chapter.
|