Agricultural and Natural Resources Policy Internship Program

  • Display the structure of user selected equations and/or variables example
  • List the characteristics of selected groups of variables and equations example
  • List the characteristics of equation and variable blocks example
  • Examine a GAMS model to see whether any variables and equations contain specification errors example
  • Generate a schematic of the structure of the variable and equation blocks example
  • Examine the number of coeficients in the intersections of variable and equation blocks example
  • Look at the scaling characteristics of the variable and equation blocks example
  • Generate a schematic for small GAMS models or portions of larger models depicting the location of coefficients by sign and magnitude example
  • Reconstruct the reduced cost of variables after a model solution example
  • Reconstruct the activity within equations after a model solution example
  • Find variables or equations which could be causing unbounded or infeasible models example


Top of Document

Ask for a display of a variable or equation and you receive

—-## VAR MAKECHAIR
## MAKECHAIR(PLANT2,FUNCTIONAL,NORMAL)

OBJT15.000
RESOURCEQ(PLANT2,SMLLATHE)0.80000
RESOURCEQ(PLANT2,LRGLATHE)0.50000
TRNCHAIREQ(PLANT2,FUNCTIONAL)-1.0000
UPPER BOUND5000.0
or
—-## EQU LINKTABLE
## LINKTABLE(FANCY)
MAKETABLE(PLANT1,FANCY)-1.0000
TRANSPORT(PLANT3,TABLES,FANCY)-1.0000
SELL(PLANT1,DINSETS,FANCY)1.0000
=L=0.00000E+00

Top of Document

Ask about the characteristics of selected variables and equations and you get


 IsTotPosNegNlnMinimumMaximum
—-### Requested VariablesNonCofCofCofCofAbsoluteAbsolute
SELL(PLANT1,TABLES,021101.0001.000
FUNCTIONAL)
 IsTotPosNegNlnMinimumMaximum
—-### Requested EquationsNonCofCofCofCofAbsoluteAbsolute
RESOURCEQ(PLANT1,LABOR)033001.0005.000

Top of Document

Request a report of the characteristics of equation and variable blocks and you get

VariableSignNumbNumbPosNegNonMaximumMinimum
BlockResVarsNonlCoefCoefCoefAbsoluteAbsolute
MAKECHAIR>=0120601201.700.2000
MAKETABLE>=06016405.0001.000
EquationTypeNumbNumbPosNegNonPosNegMaximumMinimum
BlockResEqnsNonlCoefCoefCoefRHSRHSAbsoluteAbsolute
OBJT=E=1023100001100.5.000
RESOURCEQ=L=12060001105.000.2000

Top of Document

Examine a GAMS model to see whether any variables and equations contain specification errors and you get messages like the following

—-### Analysis of Variables ( nonlinear terms at current point)

**** Warning These variables will equal zero because they have a zero lower bound an undesirable object function coefficient all 0 or – coefficients in the =G= rows all 0 or + coefficients in the =L= rows and no coefficients in the =E= rows

## MAKETABLE(PLANT2,FUNCTIONAL)
MAKETABLE(PLANT2,FANCY)

—-### Analysis of Equations ( nonlinear terms at current point)

**** Warning This =L= constraint causes all variables in it to have a zero solution value since the nonnegative variables present have only 0 or + coefficients the nonpositive variables present have only 0 or – coefficients the unrestricted variables have only zero coefficients and the rhs is zero.

## RESOURCEQ(PLANT2,TOP)

Top of Document

You can generate a schematic of the structure of the variable and equation blocks and you get something like

 |MMT N|  
 |AAR E|  
 |KKA T|  
 |EEN I|  
 |CTS N|  
 |HAPSC|  
 |ABOEO| R
 |ILRLM| H
 |RETLE| S
OBJT|++++|E0
RESOURCEQ|++   |L+
LINKTABLE| + |L0
LINKCHAIR|  + |L0
TRNCHAIREQ| ++ |L0
TRNTABLEEQ| ++ |L0 
Variable Typ|++++u   

Top of Document

Ask for a block picture and you can examine the number of coefficients in the intersections of variable and equation blocks

 |     |  C#
 |MMT N|  o 
 |AAR E|  eo
 |KKA T|  ff
 |EEN I|  f 
 |CTS N|    
 |HAPSC|  CE
 |ABOEO| Rnq
 |ILRLM| Htn
 |RETLE| Sss
 ||
OBJT|12+4+6+ 1+|E023+1
 |   10- |  10-
RESOURCEQ|48+12+   |L11+60+12
 |     |   
LINKTABLE|   4+ |L04+2
 | 2-2-  |   4-
LINKCHAIR|   2+ |L02+2
 |  4-  |   4-
TRNCHAIREQ|  4+4+ |L08+4
 |12-    |   12-
TRNTABLEEQ|  2+2+ |L04+2
 | 2-   |   2-
 ||
Coeff Cnts|60+16+12+12+1+| 11+101+
 |12-4-6-10- | 32-
# of Vars|1266101|
Variable Typ|>=0>=0>=0>=0<0>

Top of Document

Ask for a block picture and you can look at the scaling characteristics of the variable and equation blocks

  |     |RE
  |MMT N|Hq
  |AAR E|Su
  |KKA T|  
  |EEN I|MM
  |CTS N|aa
  |HAPSC|xx
  |ABOEO|MM
  |ILRLM|ii
  |RETLE|nn
  ||
OBJTMax|26.61002011001|01100
 Min|15805821|01
RESOURCEQMax|1.75000|2105
 Min|0.21000|400.2
LINKTABLEMax|01110|01
 Min|01110|01
LINKCHAIRMax|00160|06
 Min|00140|01
TRNCHAIREQMax|10110|01
 Min|10110|01
TRNTABLEEQMax|01110|01
 Min|01110|01
  ||
Total VarMax|26.61002011001|210
 Min|0.21111|40

Top of Document

You can generate a schematic for small GAMS models or portions of larger models depicting the location of coefficients by sign and magnitude as follows

 |      R 
 |TTTTTTH 
 |RRRRRRSP N
 |AAAAAA O E R
 |NNNNNNCS G O
 |SSSSSSOIAAAW
 |PPPPPPETITIC
 |OOOOOOFIJIJN
 |RRRRRRFV V T
 |TTTTTTSESESS
 | 
 |123456
————
OBJT 1|DEEDD6= 0 11 1 12
LINKTABLE 1|  3   <0 0 1 1
LINKTABLE 2|   3  <0 0 1 1
LINKCHAIR 1|3   3 <0 0 2 2
LINKCHAIR 2| 3   3<0 0 2 2
TRNCHAIREQ 1|C     <0 1   1
————
LOWER BND|000000
UPPER BND|++++++
————
POSITIVE|303030
COLUMN CTS|030302
NEGATIVE|101010
COLUMN CTS|010102

Top of Document

Ask to reconstruct the reduced costs after a model solution and you get

—-### BUDGETING VARIABLES

—-## VAR MAKECHAIR
## MAKECHAIR(PLANT2,FANCY,NORMAL)
SOLUTION VALUE73.0195
UPPER BOUND5000.00
EQNAijUiAij*Ui
OBJT25.0001.000025.000
RESOURCEQ(PLANT2,SMLLATHE)1.200047.77057.324
RESOURCEQ(PLANT2,LRGLATHE).7000038.83027.181
RESOURCEQ(PLANT2,LABOR).8000019.36915.495
TRNCHAIREQ(PLANT2,FANCY)-1.0000125.00-125.00
TRUE REDUCED COST  .00000E+00

Top of Document

Ask to reconstruct the activity within equations after a model solution and you get

—-### ROW SUMMING EQUATIONS
—-## EQU RESOURCEQ
## RESOURCEQ(PLANT2,SMLLATHE)
VARAijXjAij*Xj
MAKECHAIR(PLANT2,FUNCTIONAL,.8000062.23349.787
NORMAL)
MAKECHAIR(PLANT2,FANCY,NORMAL)1.200073.02087.623
MAKECHAIR(PLANT2,FANCY,MAXLRG).500005.17982.5899
=L=  =L=
RHS COEFF  140.00
 
SLACK EQUALS  .00000E+00
SHADOW PRICE  47.770

Top of Document

Ask the program to find variables or equations which could be causing unbounded or infeasible models and you get

—-### THESE VARIABLES ARE POTENTIALLY UNBOUNDED

To find the cause of unboundedness bound them or the objective function variable at a large value. Then solve and manually or through GAMSCHK find large levels for variables in solution

SELL(PLANT1,TABLES,FUNCTIONAL)


—-### THESE EQUATIONS ARE POTENTIALLY INFEASIBLE

RESOUREQ(PLANT1,LABOR)

Top of Document