The OPTMILP Procedure

Example 7.2 MIPLIB Benchmark Instance

The following example illustrates the conversion of a standard MPS-format file into an MPS-format data table. The problem is re-solved several times, each time by using a different control option. For such a small example, it is helpful to disable cuts and heuristics in order to see the computational savings gained by using other options. For larger or more complex examples, the benefits of using the various control options are more pronounced.

The standard set of MILP benchmark cases are the various versions of MIPLIB (Bixby et al. 1998, Achterberg, Koch, and Martin 2003) and can be found at http://miplib.zib.de/. The following statement uses the %MPS2SASD macro to convert an example from MIPLIB to a data table:

%mps2sasd(mpsfile="bell3a.mps", outdata=mycas.mpsdata);

The problem can then be solved using PROC OPTMILP on the data table uploaded to CAS:

proc optmilp data=mycas.mpsdata allcuts=none heuristics=none;
run;

The resulting log is shown in Output 7.2.1.

Output 7.2.1: MIPLIB PROC OPTMILP Log

NOTE: The problem BELL3A has 133 variables (39 binary, 32 integer, 0 free, 0    
      fixed).                                                                   
NOTE: The problem has 123 constraints (123 LE, 0 EQ, 0 GE, 0 range).            
NOTE: The problem has 347 constraint coefficients.                              
NOTE: The MILP presolver value AUTOMATIC is applied.                            
NOTE: The MILP presolver removed 45 variables and 59 constraints.               
NOTE: The MILP presolver removed 144 constraint coefficients.                   
NOTE: The MILP presolver modified 25 constraint coefficients.                   
NOTE: The presolved problem has 88 variables, 64 constraints, and 203           
      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 32 threads.                   
          Node   Active   Sols    BestInteger      BestBound      Gap    Time   
             0        1      0              .         869515        .       0   
           343      306      1         881651         874001    0.88%       0   
          1033      339      3         881438         874303    0.82%       0   
          1215      471      4         881438         874458    0.80%       0   
          1497      128      5         878651         874753    0.45%       0   
          2143      365      6         878430         874753    0.42%       0   
          2164      365      7         878430         874753    0.42%       0   
          2224      378      8         878430         874753    0.42%       0   
          5534        0      8         878430         878430    0.00%       0   
NOTE: Optimal.                                                                  
NOTE: Objective = 878430.316.                                                   
NOTE: The Cloud Analytic Services server processed the request in 0.484878      
      seconds.                                                                  


If there is an objective value that, even if it is not optimal, satisfies your requirements, then you can save time by using the TARGET= option. The following PROC OPTMILP call solves the problem with a target value of 880,000:

proc optmilp data=mycas.mpsdata allcuts=none heuristics=none
   target=880000;
run;

The relevant results from this run are displayed in Output 7.2.2. In this case, there is a decrease in the number of nodes processed, but the objective value has increased.

Output 7.2.2: MIPLIB PROC OPTMILP Log with TARGET= Option

NOTE: The problem BELL3A has 133 variables (39 binary, 32 integer, 0 free, 0    
      fixed).                                                                   
NOTE: The problem has 123 constraints (123 LE, 0 EQ, 0 GE, 0 range).            
NOTE: The problem has 347 constraint coefficients.                              
NOTE: The MILP presolver value AUTOMATIC is applied.                            
NOTE: The MILP presolver removed 45 variables and 59 constraints.               
NOTE: The MILP presolver removed 144 constraint coefficients.                   
NOTE: The MILP presolver modified 25 constraint coefficients.                   
NOTE: The presolved problem has 88 variables, 64 constraints, and 203           
      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 32 threads.                   
          Node   Active   Sols    BestInteger      BestBound      Gap    Time   
             0        1      0              .         869515        .       0   
           343      306      1         881651         874001    0.88%       0   
          1033      339      3         881438         874303    0.82%       0   
          1215      471      4         881438         874458    0.80%       0   
          1497      128      5         878651         874753    0.45%       0   
NOTE: Target reached.                                                           
NOTE: Objective of the best integer solution found = 878651.068.                
NOTE: The Cloud Analytic Services server processed the request in 0.199423      
      seconds.                                                                  


When the objective value of a solution is within a certain relative gap of the optimal objective value, the procedure stops. The acceptable relative gap can be changed using the RELOBJGAP= option, as demonstrated in the following example:

proc optmilp data=mycas.mpsdata allcuts=none heuristics=none
   relobjgap=0.3;
run;

The relevant results from this run are displayed in Output 7.2.3. In this case, since the specified RELOBJGAP= value is larger than the default value, the number of nodes processed has decreased from their values in the original run. Note that these savings are possible because PROC OPTMILP makes a weaker statement about how good the solution found is, which is indicated by the decreased best bound value.

Output 7.2.3: MIPLIB PROC OPTMILP Log with RELOBJGAP= Option

NOTE: The problem BELL3A has 133 variables (39 binary, 32 integer, 0 free, 0    
      fixed).                                                                   
NOTE: The problem has 123 constraints (123 LE, 0 EQ, 0 GE, 0 range).            
NOTE: The problem has 347 constraint coefficients.                              
NOTE: The MILP presolver value AUTOMATIC is applied.                            
NOTE: The MILP presolver removed 45 variables and 59 constraints.               
NOTE: The MILP presolver removed 144 constraint coefficients.                   
NOTE: The MILP presolver modified 25 constraint coefficients.                   
NOTE: The presolved problem has 88 variables, 64 constraints, and 203           
      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 32 threads.                   
          Node   Active   Sols    BestInteger      BestBound      Gap    Time   
             0        1      0              .         869515        .       0   
           343      306      1         881651         874001    0.88%       0   
NOTE: Optimal within relative gap.                                              
NOTE: Objective = 881650.93.                                                    
NOTE: The Cloud Analytic Services server processed the request in 0.07347       
      seconds.                                                                  


The MAXTIME= option enables you to accept the best solution produced by PROC OPTMILP in a specified amount of time. The following example illustrates the use of the MAXTIME= option:

proc optmilp data=mycas.mpsdata allcuts=none heuristics=none
   maxtime=0.5;
run;

The relevant results from this run are displayed in Output 7.2.4. In this case the solution process stopped early because the time limit was reached.

Output 7.2.4: MIPLIB PROC OPTMILP Log with MAXTIME= Option

NOTE: The problem BELL3A has 133 variables (39 binary, 32 integer, 0 free, 0    
      fixed).                                                                   
NOTE: The problem has 123 constraints (123 LE, 0 EQ, 0 GE, 0 range).            
NOTE: The problem has 347 constraint coefficients.                              
NOTE: The remaining solution time after solver initialization is 0.48 seconds.  
NOTE: The MILP presolver value AUTOMATIC is applied.                            
NOTE: The MILP presolver removed 45 variables and 59 constraints.               
NOTE: The MILP presolver removed 144 constraint coefficients.                   
NOTE: The MILP presolver modified 25 constraint coefficients.                   
NOTE: The presolved problem has 88 variables, 64 constraints, and 203           
      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 32 threads.                   
          Node   Active   Sols    BestInteger      BestBound      Gap    Time   
             0        1      0              .         869515        .       0   
           343      306      1         881651         874001    0.88%       0   
          1033      339      3         881438         874303    0.82%       0   
          1215      471      4         881438         874458    0.80%       0   
          1497      128      5         878651         874753    0.45%       0   
          2143      365      6         878430         874753    0.42%       0   
          2164      365      7         878430         874753    0.42%       0   
          2224      378      8         878430         874753    0.42%       0   
          5534        0      8         878430         878430    0.00%       0   
NOTE: Optimal.                                                                  
NOTE: Objective = 878430.316.                                                   
NOTE: The Cloud Analytic Services server processed the request in 0.45822       
      seconds.                                                                  


The MAXNODES= option enables you to limit the number of nodes generated by PROC OPTMILP. The following example illustrates the use of the MAXNODES= option:

proc optmilp data=mycas.mpsdata allcuts=none heuristics=none
   maxnodes=1000;
run;

The relevant results from this run are displayed in Output 7.2.5. PROC OPTMILP displays the best objective value of all the solutions produced within the first 1000 nodes.

Output 7.2.5: MIPLIB PROC OPTMILP Log with MAXNODES= Option

NOTE: The problem BELL3A has 133 variables (39 binary, 32 integer, 0 free, 0    
      fixed).                                                                   
NOTE: The problem has 123 constraints (123 LE, 0 EQ, 0 GE, 0 range).            
NOTE: The problem has 347 constraint coefficients.                              
NOTE: The MILP presolver value AUTOMATIC is applied.                            
NOTE: The MILP presolver removed 45 variables and 59 constraints.               
NOTE: The MILP presolver removed 144 constraint coefficients.                   
NOTE: The MILP presolver modified 25 constraint coefficients.                   
NOTE: The presolved problem has 88 variables, 64 constraints, and 203           
      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 32 threads.                   
          Node   Active   Sols    BestInteger      BestBound      Gap    Time   
             0        1      0              .         869515        .       0   
           343      306      1         881651         874001    0.88%       0   
           999      315      2         881651         874303    0.84%       0   
NOTE: Node limit reached.                                                       
NOTE: Objective of the best integer solution found = 881650.93.                 
NOTE: The Cloud Analytic Services server processed the request in 0.15669       
      seconds.                                                                  


Last updated: June 14, 2018