Dual Model
The third option of the Solver|Generate command, Dual Model, displays the dual formulation of the current model. Every linear programming model has a corresponding, mirror-image formulation called the dual. If the original model has M constraints and N variables, then its dual will have N constraints and M variables.
Some interesting properties of the dual are that any feasible solution to the dual model provides a bound on the objective to the original, primal model, while the optimal solution to the dual has the same objective value as the optimal solution to the primal problem. It's also true that the dual of the dual model is, once again, the original primal model. You may wish to refer to any good linear programming text for a further discussion of duality theory.
If you run the Solver|Generate|Dual Model command on the Widgets model shown above, you will receive the following formulation:
MODEL:
MAX = 35 * DEMAND_ROW_V1 + 37 * DEMAND_ROW_V2 + 22 *
DEMAND_ROW_V3 + 32 * DEMAND_ROW_V4 + 41 * DEMAND_ROW_V5 + 32 *
DEMAND_ROW_V6 + 43 * DEMAND_ROW_V7 + 38 * DEMAND_ROW_V8 + 60 *
CAPACITY_ROW_WH1 + 55 * CAPACITY_ROW_WH2 + 51 *
CAPACITY_ROW_WH3 + 43 * CAPACITY_ROW_WH4 + 41 *
CAPACITY_ROW_WH5 + 52 * CAPACITY_ROW_WH6;
[ VOLUME_WH1_V1] DEMAND_ROW_V1 + CAPACITY_ROW_WH1 <= 6;
[ VOLUME_WH1_V2] DEMAND_ROW_V2 + CAPACITY_ROW_WH1 <= 2;
[ VOLUME_WH1_V3] DEMAND_ROW_V3 + CAPACITY_ROW_WH1 <= 6;
[ VOLUME_WH1_V4] DEMAND_ROW_V4 + CAPACITY_ROW_WH1 <= 7;
[ VOLUME_WH1_V5] DEMAND_ROW_V5 + CAPACITY_ROW_WH1 <= 4;
[ VOLUME_WH1_V6] DEMAND_ROW_V6 + CAPACITY_ROW_WH1 <= 2;
[ VOLUME_WH1_V7] DEMAND_ROW_V7 + CAPACITY_ROW_WH1 <= 5;
[ VOLUME_WH1_V8] DEMAND_ROW_V8 + CAPACITY_ROW_WH1 <= 9;
[ VOLUME_WH2_V1] DEMAND_ROW_V1 + CAPACITY_ROW_WH2 <= 4;
[ VOLUME_WH2_V2] DEMAND_ROW_V2 + CAPACITY_ROW_WH2 <= 9;
[ VOLUME_WH2_V3] DEMAND_ROW_V3 + CAPACITY_ROW_WH2 <= 5;
[ VOLUME_WH2_V4] DEMAND_ROW_V4 + CAPACITY_ROW_WH2 <= 3;
[ VOLUME_WH2_V5] DEMAND_ROW_V5 + CAPACITY_ROW_WH2 <= 8;
[ VOLUME_WH2_V6] DEMAND_ROW_V6 + CAPACITY_ROW_WH2 <= 5;
[ VOLUME_WH2_V7] DEMAND_ROW_V7 + CAPACITY_ROW_WH2 <= 8;
[ VOLUME_WH2_V8] DEMAND_ROW_V8 + CAPACITY_ROW_WH2 <= 2;
[ VOLUME_WH3_V1] DEMAND_ROW_V1 + CAPACITY_ROW_WH3 <= 5;
[ VOLUME_WH3_V2] DEMAND_ROW_V2 + CAPACITY_ROW_WH3 <= 2;
[ VOLUME_WH3_V3] DEMAND_ROW_V3 + CAPACITY_ROW_WH3 <= 1;
[ VOLUME_WH3_V4] DEMAND_ROW_V4 + CAPACITY_ROW_WH3 <= 9;
[ VOLUME_WH3_V5] DEMAND_ROW_V5 + CAPACITY_ROW_WH3 <= 7;
[ VOLUME_WH3_V6] DEMAND_ROW_V6 + CAPACITY_ROW_WH3 <= 4;
[ VOLUME_WH3_V7] DEMAND_ROW_V7 + CAPACITY_ROW_WH3 <= 3;
[ VOLUME_WH3_V8] DEMAND_ROW_V8 + CAPACITY_ROW_WH3 <= 3;
[ VOLUME_WH4_V1] DEMAND_ROW_V1 + CAPACITY_ROW_WH4 <= 7;
[ VOLUME_WH4_V2] DEMAND_ROW_V2 + CAPACITY_ROW_WH4 <= 6;
[ VOLUME_WH4_V3] DEMAND_ROW_V3 + CAPACITY_ROW_WH4 <= 7;
[ VOLUME_WH4_V4] DEMAND_ROW_V4 + CAPACITY_ROW_WH4 <= 3;
[ VOLUME_WH4_V5] DEMAND_ROW_V5 + CAPACITY_ROW_WH4 <= 9;
[ VOLUME_WH4_V6] DEMAND_ROW_V6 + CAPACITY_ROW_WH4 <= 2;
[ VOLUME_WH4_V7] DEMAND_ROW_V7 + CAPACITY_ROW_WH4 <= 7;
[ VOLUME_WH4_V8] DEMAND_ROW_V8 + CAPACITY_ROW_WH4 <= 1;
[ VOLUME_WH5_V1] DEMAND_ROW_V1 + CAPACITY_ROW_WH5 <= 2;
[ VOLUME_WH5_V2] DEMAND_ROW_V2 + CAPACITY_ROW_WH5 <= 3;
[ VOLUME_WH5_V3] DEMAND_ROW_V3 + CAPACITY_ROW_WH5 <= 9;
[ VOLUME_WH5_V4] DEMAND_ROW_V4 + CAPACITY_ROW_WH5 <= 5;
[ VOLUME_WH5_V5] DEMAND_ROW_V5 + CAPACITY_ROW_WH5 <= 7;
[ VOLUME_WH5_V6] DEMAND_ROW_V6 + CAPACITY_ROW_WH5 <= 2;
[ VOLUME_WH5_V7] DEMAND_ROW_V7 + CAPACITY_ROW_WH5 <= 6;
[ VOLUME_WH5_V8] DEMAND_ROW_V8 + CAPACITY_ROW_WH5 <= 5;
[ VOLUME_WH6_V1] DEMAND_ROW_V1 + CAPACITY_ROW_WH6 <= 5;
[ VOLUME_WH6_V2] DEMAND_ROW_V2 + CAPACITY_ROW_WH6 <= 5;
[ VOLUME_WH6_V3] DEMAND_ROW_V3 + CAPACITY_ROW_WH6 <= 2;
[ VOLUME_WH6_V4] DEMAND_ROW_V4 + CAPACITY_ROW_WH6 <= 2;
[ VOLUME_WH6_V5] DEMAND_ROW_V5 + CAPACITY_ROW_WH6 <= 8;
[ VOLUME_WH6_V6] DEMAND_ROW_V6 + CAPACITY_ROW_WH6 <= 1;
[ VOLUME_WH6_V7] DEMAND_ROW_V7 + CAPACITY_ROW_WH6 <= 4;
[ VOLUME_WH6_V8] DEMAND_ROW_V8 + CAPACITY_ROW_WH6 <= 3;
@FREE( DEMAND_ROW_V1); @FREE( DEMAND_ROW_V2);
@FREE( DEMAND_ROW_V3); @FREE( DEMAND_ROW_V4);
@FREE( DEMAND_ROW_V5); @FREE( DEMAND_ROW_V6);
@FREE( DEMAND_ROW_V7); @FREE( DEMAND_ROW_V8);
@BND( -0.1E+31, CAPACITY_ROW_WH1, 0);
@BND( -0.1E+31, CAPACITY_ROW_WH2, 0);
@BND( -0.1E+31, CAPACITY_ROW_WH3, 0);
@BND( -0.1E+31, CAPACITY_ROW_WH4, 0);
@BND( -0.1E+31, CAPACITY_ROW_WH5, 0);
@BND( -0.1E+31, CAPACITY_ROW_WH6, 0);
END
Dual Formulation: WIDGETS
You will notice that in the dual formulation the variables from the primal model become the rows of the dual. Similarly, the rows in the primal become the variables in the dual.
Note: | The row names from the primal problem will become the variable names in the dual formulation. For this reason, it is strongly recommended that you name all the rows in the primal model. If a row is unnamed, then a default name will be generated for the corresponding dual variable. The default name will consist of an underscore followed by the row's internal index. These default names will not be very meaningful, and will make the dual formulation difficult to interpret. |