the 'ratio constraints' that commonly
appear in blending and refining problems.
ratio constraints 转化成线性约束后 对偶解释的问题
____________________________________________
y(i,j)/q(j) =l= .26 ;
is equivalent to
y(i,j) - .25*q(j) =l= 0.01*q(j) ;
____________________________________________
2.10.2. TRANSFORMATION AND DISPLAY OF OPTIMAL VALUES
(This section can be skipped on first reading if desired.)
After the optimizer is called via the solve statement, the values it computes for the primal
and dual variables are placed in the database in the .l and .m fields. We can then read
these results and transform and display them with GAMS statements.
For example, in the transportation problem,. suppose we wish to know the percentage of
each market’s demand that is filled by each plant. After the solve statement, we would
enter
parameter pctx(i,j) perc of market j’s demand filled by plant i;
pctx(i,j) = 100.0*x.l(i,j)/b(j) ;
display pctx ;
Appending these commands to the original transportation problem input results in the
following output:
pctx percent of market j’s demand filled by plant i
new-york chicago topeka
seattle 15.385 100.000
san-diego 84.615 100.000
For an example involving marginal, we briefly consider the 'ratio constraints' that commonly
appear in blending and refining problems. These linear programming models are concerned
with determining the optimal amount of each of several available raw materials to put into
each of several desired finished products. Let y(i,j) be the variable for the number of
tons of product j produced. Suppose the 'ratio constraint' is that no product can consist of
more than 25 percent of one ingredient, that is,
y(i,j)/q(j) =l= .25 ;
for all i, j. To keep the model linear, the constraint is written as
ratio(i,j).. y(i,j) - .25*q(j) =l= 0.0 ;
rather than explicitly as a ratio.The problem here is that ratio.m(i,j), the marginal value associated with the linear
form of the constraint, has no intrinsic meaning. At optimality, it tells us by at most how
much we can benefit from relaxing the linear constraint to
y(i,j) - .25*q(j) =l= 1.0 ;
Unfortunately, this relaxed constraint has no realistic significance. The constraint we are
interested in relaxing (or tightening) is the nonlinear form of the ration constraint. For
example, we would like to know the marginal benefit arising from changing the ratio
constraint to
y(i,j)/q(j) =l= .26 ;
We can in fact obtain the desired marginals by entering the following transformation on the
undesired marginals:
parameter amr(i,j) appropriate marginal for ratio constraint ;
amr(i,j) = ratio.m(i,j)*0.01*q.l(j) ;
display amr ;
Notice that the assignment statement for amr accesses both .m and .l records from the
database. The idea behind the transformation is to notice that
y(i,j)/q(j) =l= .26 ;
is equivalent to
y(i,j) - .25*q(j) =l= 0.01*q(j) ;