The Dantzig-Wolfe Decomposition Algorithm

Special Case: Identical Blocks and Ryan-Foster Branching

In the special case of a set partitioning master problem and identical blocks, the underlying algorithm is automatically adjusted to reduce symmetry and improve overall performance. Identical blocks are subproblems (see the section Overview: Dantzig-Wolfe Decomposition Algorithm) that have equivalent feasible regions (and optima) when they are projected. Algebraically, this means that

StartLayout 1st Row 1st Column bold upper A Superscript 1 2nd Column equals 3rd Column bold upper A squared 4th Column equals 5th Column midline-horizontal-ellipsis 6th Column equals 7th Column bold upper A Superscript kappa 2nd Row 1st Column bold upper D Superscript 1 2nd Column equals 3rd Column bold upper D squared 4th Column equals 5th Column midline-horizontal-ellipsis 6th Column equals 7th Column bold upper D Superscript kappa 3rd Row 1st Column bold c Superscript 1 2nd Column equals 3rd Column bold c squared 4th Column equals 5th Column midline-horizontal-ellipsis 6th Column equals 7th Column bold c Superscript kappa 4th Row 1st Column bold b Superscript 1 2nd Column equals 3rd Column bold b squared 4th Column equals 5th Column midline-horizontal-ellipsis 6th Column equals 7th Column bold b Superscript kappa 5th Row 1st Column bold x overbar Superscript 1 2nd Column equals 3rd Column bold x overbar squared 4th Column equals 5th Column ellipsis 6th Column equals 7th Column bold x overbar Superscript kappa 6th Row 1st Column bold x underbar Superscript 1 2nd Column equals 3rd Column bold x underbar squared 4th Column equals 5th Column ellipsis 6th Column equals 7th Column bold x underbar Superscript kappa EndLayout

A set partitioning problem is a specific type of integer programming model in which each constraint represents choosing exactly one member of a set. These constraints are often referred to as assignment constraints. The linear relaxation of a set partitioning problem enables an algorithm to choose fractional parts of several members of some set such that they sum to 1. Algebraically, this means bold upper A bold x equals bold 1, where all the coefficients in bold upper A are 0 or 1.

The performance of algorithms that use a branch-and-bound method can suffer when the formulation contains substructures that are symmetric. In this context, symmetric means that an assignment of solutions can be arbitrarily permuted for some component without affecting the optimality of that solution. For example, if

StartLayout 1st Row 1st Column x 11 equals 1 2nd Column x 12 equals 0 3rd Column x 21 equals 0 4th Column x 22 equals 1 EndLayout

and

StartLayout 1st Row 1st Column x 11 equals 0 2nd Column x 12 equals 1 3rd Column x 21 equals 1 4th Column x 22 equals 0 EndLayout

are both optimal, then these solutions, x Subscript i j, are considered symmetric on index j. That is, you can interchange j equals 1 and j equals 2 without affecting the optimality of the solution. The presence of identical blocks in a mathematical program is an obvious case in which symmetry can hurt performance. In order to overcome this handicap, the Dantzig-Wolfe decomposition algorithm aggregates the identical blocks into one block when it forms the Dantzig-Wolfe master problem. If the Dantzig-Wolfe master problem is a set partitioning model, the algorithm uses a specialized branching rule known as Ryan-Foster branching. If the original master model (after aggregation) is equivalent to the identity matrix, this guarantees that the Dantzig-Wolfe master problem is of the appropriate form. For more information about the aggregate formulation and Ryan-Foster branching, see Barnhart et al. (1998).

Suppose you want to solve the following problem:

StartLayout 1st Row 1st Column maximize 2nd Column x 11 3rd Column plus 4th Column 2 x 21 5th Column plus 6th Column x 31 7th Column plus 8th Column x 12 9th Column plus 10th Column 2 x 22 11th Column plus 12th Column x 32 2nd Row 1st Column subject to 2nd Column x 11 3rd Column Blank 4th Column Blank 5th Column Blank 6th Column Blank 7th Column plus 8th Column x 12 9th Column Blank 10th Column Blank 11th Column Blank 12th Column Blank 13th Column equals 14th Column 1 15th Column left-parenthesis m 1 right-parenthesis 3rd Row 1st Column Blank 2nd Column Blank 3rd Column Blank 4th Column x 21 5th Column Blank 6th Column Blank 7th Column Blank 8th Column Blank 9th Column plus 10th Column x 22 11th Column Blank 12th Column Blank 13th Column equals 14th Column 1 15th Column left-parenthesis m 2 right-parenthesis 4th Row 1st Column Blank 2nd Column 5 x 11 3rd Column plus 4th Column 7 x 21 5th Column plus 6th Column 4 x 31 7th Column Blank 8th Column Blank 9th Column Blank 10th Column Blank 11th Column Blank 12th Column Blank 13th Column less-than-or-equal-to 14th Column 11 15th Column left-parenthesis s 1 right-parenthesis 5th Row 1st Column Blank 2nd Column Blank 3rd Column Blank 4th Column Blank 5th Column Blank 6th Column Blank 7th Column Blank 8th Column 5 x 12 9th Column plus 10th Column 7 x 22 11th Column plus 12th Column 4 x 32 13th Column less-than-or-equal-to 14th Column 11 15th Column left-parenthesis s 2 right-parenthesis 6th Row 1st Column Blank 2nd Column Blank 3rd Column Blank 4th Column Blank 5th Column Blank 6th Column Blank 7th Column Blank 8th Column Blank 9th Column Blank 10th Column Blank 11th Column Blank 12th Column x Subscript i j 13th Column element-of 14th Column StartSet 0 comma 1 EndSet 15th Column i element-of StartSet 1 comma 2 comma 3 EndSet comma 7th Row 1st Column Blank 2nd Column Blank 3rd Column Blank 4th Column Blank 5th Column Blank 6th Column Blank 7th Column Blank 8th Column Blank 9th Column Blank 10th Column Blank 11th Column Blank 12th Column Blank 13th Column Blank 14th Column Blank 15th Column j element-of StartSet 1 comma 2 EndSet EndLayout

If constraints m1 and m2 are removed, then the remaining constraints s1 and s2 decompose into two independent and identical subproblems. In addition, constraints m1 and m2 form a set partitioning master problem.

The following statements use the OPTMODEL procedure and the Dantzig-Wolfe decomposition algorithm to solve the preceding problem:

proc optmodel;
   var x{i in 1..3, j in 1..2} binary;

   max f =    x[1,1] + 2*x[2,1] +   x[3,1] +
              x[1,2] + 2*x[2,2] +   x[3,2];

   con m1:    x[1,1] +   x[1,2]             =  1;
   con m2:    x[2,1] +   x[2,2]             =  1;
   con s1:  5*x[1,1] + 7*x[2,1] + 4*x[3,1] <= 11;
   con s2:  5*x[1,2] + 7*x[2,2] + 4*x[3,2] <= 11;

   s1.block = 0;
   s2.block = 1;

   solve with milp / presolver=none decomp=(logfreq=1);
   print x;
quit;

Here, the PRESOLVER=NONE option is used again, because otherwise the presolver solves this small instance without invoking any solver. The solution summary and optimal solution are displayed in Figure 3.

Figure 3: Solution Summary and Optimal Solution

The OPTMODEL Procedure

Solution Summary
SolverMILP
AlgorithmDecomposition
Objective Functionf
Solution StatusOptimal
Objective Value5
  
Relative Gap0
Absolute Gap0
Primal Infeasibility0
Bound Infeasibility0
Integer Infeasibility0
  
Best Bound5
Nodes1
Solutions Found1
Iterations1
Presolve Time0.00
Solution Time0.09

x
 12
110
201
311


The iteration log, which displays the problem statistics, the progress of the solution, and the optimal objective value, is shown in Figure 4.

Figure 4: Log

NOTE: Problem generation will use 4 threads.                                                    
NOTE: The problem has 6 variables (0 free, 0 fixed).                                            
NOTE: The problem has 6 binary and 0 integer variables.                                         
NOTE: The problem has 4 linear constraints (2 LE, 2 EQ, 0 GE, 0 range).                         
NOTE: The problem has 10 linear constraint coefficients.                                        
NOTE: The problem has 0 nonlinear constraints (0 LE, 0 EQ, 0 GE, 0 range).                      
NOTE: The initial MILP heuristics are applied.                                                  
NOTE: The MILP presolver value NONE is applied.                                                 
NOTE: The MILP solver is called.                                                                
NOTE: The Decomposition algorithm is used.                                                      
NOTE: The Decomposition algorithm is executing in single-machine mode.                          
NOTE: The DECOMP method value USER is applied.                                                  
NOTE: All blocks are identical and the master model is set partitioning.                        
NOTE: The Decomposition algorithm is using an aggregate formulation and Ryan-Foster branching.  
NOTE: The number of block threads has been reduced to 1 threads.                                
NOTE: The problem has a decomposable structure with 2 blocks. The largest block covers 25% of   
      the constraints in the problem.                                                           
NOTE: The decomposition subproblems cover 6 (100%) variables and 2 (50%) constraints.           
NOTE: The deterministic parallel mode is enabled.                                               
NOTE: The Decomposition algorithm is using up to 4 threads.                                     
      Iter         Best       Master         Best       LP       IP  CPU Real                   
                  Bound    Objective      Integer      Gap      Gap Time Time                   
         .       6.0000       5.0000       5.0000   16.67%   16.67%    0    0                   
         1       5.0000       5.0000       5.0000    0.00%    0.00%    0    0                   
         Node  Active   Sols         Best         Best      Gap    CPU   Real                   
                                  Integer        Bound            Time   Time                   
            0       1      1       5.0000       5.0000    0.00%      0      0                   
NOTE: The Decomposition algorithm used 4 threads.                                               
NOTE: The Decomposition algorithm time is 0.09 seconds.                                         
NOTE: Optimal.                                                                                  
NOTE: Objective = 5.                                                                            


The decomposition solver recognizes that the original master model is of the appropriate form and that each block is identical. It formulates the aggregate master and uses Ryan-Foster branching to solve the model.

In the presence of identical blocks, under certain circumstances, the aggregate formulation can also be used with a set covering master formulation. A set covering problem is an integer programming model in which each constraint represents choosing at least one member of a set. Algebraically, this means bold upper A bold x greater-than-or-equal-to bold 1, where all the coefficients in bold upper A are 0 or 1. Aggregate formulation and Ryan-Foster branching can be used if there exists an optimal solution, bold x Superscript asterisk, that is binding at equality (bold upper A bold x Superscript bold asterisk Baseline equals bold 1). If you can guarantee such a condition, you can greatly improve performance by explicitly using VARSEL=RYANFOSTER as a MILP main solver option. The Dantzig-Wolfe decomposition algorithm usually performs better when it uses a set covering formulation as opposed to a set partitioning formulation, because it is usually easier to find integer feasible solutions. If the models are equivalent, using the set covering formulation is recommended. For two examples, see Example 18.6, which shows the bin packing problem, and Example 18.8, which shows the vehicle routing problem.

Similarly, a set packing problem is an integer programming model in which each constraint represents choosing at most one member of a set. Algebraically, this means bold upper A bold x less-than-or-equal-to bold 1, where all the coefficients in bold upper A are 0 or 1. Aggregate formulation and Ryan-Foster branching can be used if there exists an optimal solution, bold x Superscript asterisk, that is binding at equality (bold upper A bold x Superscript bold asterisk Baseline equals bold 1). In this case, using VARSEL=RYANFOSTER can improve performance. Alternatively, you can transform any set packing model into a set partitioning model by introducing a zero-cost slack variable for each packing constraint. See Example 18.11, which shows an application that optimizes a kidney donor exchange.

The Dantzig-Wolfe decomposition algorithm automatically searches for identical blocks and the appropriate set partitioning master formulation. If it finds this structure, the algorithm automatically generates the aggregate formulation and uses Ryan-Foster branching. The aggregate model needs to process only one block at each subproblem iteration. Therefore, parallel processing (in which multiple blocks are processed simultaneously), as described in the section Parallel Processing, cannot improve performance. For this reason, when the Dantzig-Wolfe decomposition algorithm runs in distributed mode, it does not create the aggregate formulation, nor does it use Ryan-Foster branching, even if the blocks are found to be identical.

Last updated: March 04, 2026