Wednesday, February 18, 2009

Basis information in GAMS

> How do I found out which variables and slacks are basic and non-basic.

Look at the marginals.  Nonzero or EPS marginals means non-basic and zero marginals means basic. In GAMS marginals are duals for the rows and reduced costs for the columns. Of course row duals can be interpreted as reduced costs for the corresponding slacks. For instance when looking at the solution from the trnsport model we see:


                           LOWER          LEVEL          UPPER         MARGINAL

---- EQU cost . . . 1.0000 Non-basic

---- EQU supply observe supply limit at plant i

LOWER LEVEL UPPER MARGINAL

seattle -INF 350.0000 350.0000 EPS Non-basic
san-diego -INF 550.0000 600.0000 . Basic

---- EQU demand satisfy demand at market j

LOWER LEVEL UPPER MARGINAL

new-york 325.0000 325.0000 +INF 0.2250 Non-basic
chicago 300.0000 300.0000 +INF 0.1530 Non-basic
topeka 275.0000 275.0000 +INF 0.1260 Non-basic

---- VAR x shipment quantities in cases

LOWER LEVEL UPPER MARGINAL

seattle .new-york . 50.0000 +INF . Basic
seattle .chicago . 300.0000 +INF . Basic
seattle .topeka . . +INF 0.0360 Non-basic
san-diego.new-york . 275.0000 +INF . Basic
san-diego.chicago . . +INF 0.0090 Non-basic
san-diego.topeka . 275.0000 +INF . Basic

LOWER LEVEL UPPER MARGINAL

---- VAR z -INF 153.6750 +INF . Basic




This model has 6 equations and 7 variables. So we expect 6 basic rows/columns and 7 non-basic ones. This indeed is the case.

Note: this model is dual degenerate as it has an EPS marginal. This means the dual of equation supply('seattle') is numerically zero but non-basic nevertheless. This indicates presence of alternative optimal solutions.

No comments:

Post a Comment