The Decomposition Algorithm
Example 18.4 Block-Angular Structure in Single-Machine Mode
This example demonstrates how you can use the default automated method to run the decomposition algorithm in single-machine mode.
As in Example 18.3, consider a mixed integer linear program that is defined by the MPS data table mycas.mpsdata. In this case, the structure of the model is unknown and only the MPS data table is provided to you.
The following PROC OPTMILP statements attempt to solve the problem by using standard methods and a 120-second time limit. The DATA= option assumes that your CAS engine libref is named mycas, but you can substitute any appropriately defined CAS engine libref.
proc optmilp
nthreads = 4
maxtime = 120
data = mycas.mpsdata;
run;
The solution summary is shown in Output 18.4.1.
Output 18.4.1: Solution Summary
| Solution Summary | |
|---|---|
| Solver | MILP |
| Algorithm | Branch and Cut |
| Objective Function | Total_Profit |
| Solution Status | Time Limit Reached |
| Objective Value | 6151.1464478 |
| Relative Gap | 0.1273212537 |
| Absolute Gap | 897.43411372 |
| Primal Infeasibility | 0 |
| Bound Infeasibility | 0 |
| Integer Infeasibility | 0 |
| Best Bound | 7048.5805615 |
| Nodes | 1 |
| Solutions Found | 4 |
| Iterations | 136229 |
| Presolve Time | 0.31 |
| Solution Time | 120.04 |
The iteration log, which contains the problem statistics and the progress of the solution, is shown in Output 18.4.2.
Output 18.4.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 parallel Branch and Cut algorithm is used. |
| NOTE: The Branch and Cut algorithm is using up to 4 threads. |
| Node Active Sols BestInteger BestBound Gap Time |
| 0 1 4 6151.1464478 8590.4503506 28.40% 0 |
| 0 1 4 6151.1464478 7342.1209241 16.22% 0 |
| NOTE: The MILP solver's symmetry detection found 51226 orbits. The largest orbit contains 2 |
| variables. |
| 0 1 4 6151.1464478 7325.2309546 16.03% 2 |
| 0 1 4 6151.1464478 7285.8744051 15.57% 5 |
| 0 1 4 6151.1464478 7250.0626934 15.16% 10 |
| 0 1 4 6151.1464478 7211.9468745 14.71% 16 |
| 0 1 4 6151.1464478 7165.1727513 14.15% 24 |
| 0 1 4 6151.1464478 7132.7240482 13.76% 34 |
| 0 1 4 6151.1464478 7098.5096889 13.35% 43 |
| 0 1 4 6151.1464478 7077.7938690 13.09% 52 |
| 0 1 4 6151.1464478 7068.0194895 12.97% 60 |
| 0 1 4 6151.1464478 7061.7399382 12.89% 68 |
| 0 1 4 6151.1464478 7057.5031192 12.84% 77 |
| 0 1 4 6151.1464478 7054.3557230 12.80% 86 |
| 0 1 4 6151.1464478 7051.9114255 12.77% 94 |
| 0 1 4 6151.1464478 7050.0045715 12.75% 102 |
| 0 1 4 6151.1464478 7048.5805615 12.73% 110 |
| 0 1 4 6151.1464478 7048.5805615 12.73% 119 |
| NOTE: The MILP solver added 17137 cuts with 472498 cut coefficients at the root. |
| NOTE: Real time limit reached. |
| NOTE: Objective of the best integer solution found = 6151.1464478. |
| NOTE: The Cloud Analytic Services server processed the request in 120.338183 seconds. |
Standard MILP techniques struggle to solve the problem within the specified time limit. The default decomposition method attempts to find a block-angular structure by using the matrix-stretching techniques that are described in Grcar (1990) and Aykanat, Pinar, and Çatalyürek (2004) and techniques that are based on community detection and described in Khaniyev, Elhedhli, and Erenay (2018).
proc optmilp
nthreads = 4
data = mycas.mpsdata;
decomp
hybrid = false;
run;
The solution summary is displayed in Output 18.4.3.
Output 18.4.3: Solution Summary
| Solution Summary | |
|---|---|
| Solver | MILP |
| Algorithm | Decomposition |
| Objective Function | Total_Profit |
| Solution Status | Optimal within Relative Gap |
| Objective Value | 6972.3309347 |
| Relative Gap | 1.3964946E-8 |
| Absolute Gap | 0.0000973682 |
| Primal Infeasibility | 1.931788E-14 |
| Bound Infeasibility | 7.882583E-15 |
| Integer Infeasibility | 6.77236E-15 |
| Best Bound | 6972.331032 |
| Nodes | 1 |
| Solutions Found | 8 |
| Iterations | 6 |
| Presolve Time | 0.30 |
| Solution Time | 40.92 |
The iteration log, which contains the problem statistics and the progress of the solution, is shown in Output 18.4.4.
Output 18.4.4: 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 in |
| single-machine mode. |
| 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 CPU Real |
| Bound Objective Integer Gap Gap Time Time |
| . 7964.0286 6472.3607 6470.8744 18.73% 18.75% 14 9 |
| 2 7273.9736 6472.3607 6470.8744 11.02% 11.04% 26 14 |
| 3 7147.9543 6867.4012 6470.8744 3.92% 9.47% 42 22 |
| 4 6986.0610 6960.3223 6470.8744 0.37% 7.37% 64 32 |
| 5 6986.0610 6967.8235 6967.8235 0.26% 0.26% 76 37 |
| 6 6972.3310 6972.3309 6972.3309 0.00% 0.00% 85 40 |
| Node Active Sols Best Best Gap CPU Real |
| Integer Bound Time Time |
| 0 1 8 6972.3309 6972.3310 0.00% 85 40 |
| NOTE: The Decomposition algorithm used 4 threads. |
| NOTE: The Decomposition algorithm time is 40.92 seconds. |
| NOTE: Optimal within relative gap. |
| NOTE: Objective = 6972.3309347. |
| NOTE: The Cloud Analytic Services server processed the request in 41.203789 seconds. |
As stated in the log, the algorithm successfully finds a decomposition that contains 610 blocks and has more than 99% subproblem coverage.