The Decomposition Algorithm

Example 18.5 Block-Angular Structure in Distributed Mode

This example demonstrates how you can use the default automated method to run the decomposition algorithm in distributed mode.

Consider again the mixed integer linear program that is defined by the MPS data table mycas.mpsdata. The following PROC OPTMILP statements run the decomposition algorithm in distributed mode. The DATA= option assumes that your CAS engine libref is named mycas, but you can substitute any appropriately defined CAS engine libref.

proc optmilp
   distributed = true
   nthreads    = 4
   data        = mycas.mpsdata;
   decomp
      hybrid   = false;
run;

The solution summary is displayed in Output 18.5.1.

Output 18.5.1: Solution Summary

The OPTMILP Procedure

Solution Summary
SolverMILP
AlgorithmDecomposition
Objective FunctionTotal_Profit
Solution StatusOptimal within Relative Gap
Objective Value6972.3309347
  
Relative Gap1.3964946E-8
Absolute Gap0.0000973682
Primal Infeasibility1.931788E-14
Bound Infeasibility7.882583E-15
Integer Infeasibility6.77236E-15
  
Best Bound6972.331032
Nodes1
Solutions Found8
Iterations6
  
Presolve Time0.29
Solution Time22.80


The iteration log, which contains the problem statistics and the progress of the solution, is shown in Output 18.5.2. When you specify DISTRIBUTED=TRUE and NTHREADS=4 in the OPTMILP statement, the blocks are processed using all the machines in your configured session (four machines in this case). Each machine uses four threads.

Output 18.5.2: Log

NOTE: The problem MPSDATA has 52638 variables (16038 binary, 0 integer, 0 free, 0 fixed).       
NOTE: The problem has 3949 constraints (3339 LE, 0 EQ, 610 GE, 0 range).                        
NOTE: The problem has 148866 constraint coefficients.                                           
NOTE: The initial MILP heuristics are applied.                                                  
NOTE: The MILP presolver value AUTOMATIC is applied.                                            
NOTE: The MILP presolver removed 0 variables and 734 constraints.                               
NOTE: The MILP presolver removed 17616 constraint coefficients.                                 
NOTE: The MILP presolver modified 0 constraint coefficients.                                    
NOTE: The presolved problem has 52638 variables, 3215 constraints, and 131250 constraint        
      coefficients.                                                                             
NOTE: The MILP solver is called.                                                                
NOTE: The Decomposition algorithm is used.                                                      
NOTE: The Decomposition algorithm is executing in the distributed computing environment with 4  
      worker nodes.                                                                             
NOTE: The DECOMP method value DEFAULT is applied.                                               
NOTE: The decomposition identification used 0.16 (cpu: 0.19) seconds.                           
NOTE: The problem has a decomposable structure with 610 blocks. The largest block covers        
      0.2488% of the constraints in the problem.                                                
NOTE: The decomposition subproblems cover 52638 (100%) variables and 3207 (99.75%) constraints. 
NOTE: The deterministic parallel mode is enabled.                                               
NOTE: The Decomposition algorithm is using up to 4 threads.                                     
      Iter         Best       Master         Best       LP       IP Real                        
                  Bound    Objective      Integer      Gap      Gap Time                        
         .    7964.0286    6472.3607    6470.8744   18.73%   18.75%    6                        
         2    7273.9736    6472.3607    6470.8744   11.02%   11.04%    9                        
         3    7147.9543    6867.4012    6470.8744    3.92%    9.47%   13                        
         4    6986.0610    6960.3223    6470.8744    0.37%    7.37%   17                        
         5    6986.0610    6967.8235    6967.8235    0.26%    0.26%   20                        
         6    6972.3310    6972.3309    6972.3309    0.00%    0.00%   22                        
         Node  Active   Sols         Best         Best      Gap   Real                          
                                  Integer        Bound            Time                          
            0       1      8    6972.3309    6972.3310    0.00%     22                          
NOTE: The Decomposition algorithm used 4 threads.                                               
NOTE: The Decomposition algorithm time is 22.80 seconds.                                        
NOTE: Optimal within relative gap.                                                              
NOTE: Objective = 6972.3309347.                                                                 
NOTE: The Cloud Analytic Services server processed the request in 23.167277 seconds.            


In this case, the automated method successfully finds a decomposition that contains 610 blocks and has more than 99% subproblem coverage, as in Example 18.4.

Last updated: May 11, 2023