After you have optimized an objective, you can add a constraint to fix it at
its optimal value, and then introduce other objectives to maximize
individual variables. The session below gives an example of this (showing
only two of the variables being maximized, but the others can be done in the
same way). Of course this becomes less practical as the problem gets larger
and harder.
Bob Fourer
4...@ampl.com
--
ampl: model multmip3.mod;
ampl: data multmip3.dat;
ampl: solve;
CPLEX 12.3.0.0: optimal integer solution; objective 235625
356 MIP simplex iterations
49 branch-and-bound nodes
ampl: param min_cost;
ampl: let min_cost := Total_Cost;
ampl: subj to Fix_Cost:
ampl? sum {i in ORIG, j in DEST, p in PROD} vcost[i,j,p]*Trans[i,j,p] +
ampl? sum{i in ORIG, j in DEST} fcost[i,j]*Use[i,j] = min_cost;
ampl: maximize Trans_Var {i in ORIG, j in DEST, p in PROD}: Trans[i,j,p];
ampl: objective Trans_Var['CLEV','FRA','plate'];
ampl: solve;
CPLEX 12.3.0.0: optimal integer solution; objective 100
0 MIP simplex iterations
0 branch-and-bound nodes
ampl: objective Trans_Var['PITT','FRA','plate'];
ampl: solve;
CPLEX 12.3.0.0: optimal integer solution; objective 50
531 MIP simplex iterations
18 branch-and-bound nodes
ampl: