FICO
FICO Xpress Optimization Examples Repository
FICO Optimization Community FICO Xpress Optimization Home
Back to examples browserPrevious exampleNext example

Apply a binary fixing heuristic to an unpresolved MIP problem

Description

We take a production plan model and solve its LP relaxation.

Next we fix those binary variables that are very near zero to 0.0, and those that are almost one to 1.0, by changing their respective upper and lower bounds. Finally, we solve the modified problem as a MIP.

This heuristic will speed up solution - though may fail to optimse the problem.

The results are displayed on screen and the problem statistics stored in a log file.


fixvb_java.zip[download all files]

Source Files
By clicking on a file name, a preview is opened at the bottom of this page.
FixBV.java[download]

Data Files





coco.mps

NAME          COCO    
ROWS
 N  MaxProfi
 E  PBal_111
 E  PBal_112
 E  PBal_113
 E  PBal_114
 E  PBal_121
 E  PBal_122
 E  PBal_123
 E  PBal_124
 E  PBal_211
 E  PBal_212
 E  PBal_213
 E  PBal_214
 E  PBal_221
 E  PBal_222
 E  PBal_223
 E  PBal_224
 E  RBal_111
 E  RBal_112
 E  RBal_113
 E  RBal_114
 E  RBal_121
 E  RBal_122
 E  RBal_123
 E  RBal_124
 E  RBal_211
 E  RBal_212
 E  RBal_213
 E  RBal_214
 E  RBal_221
 E  RBal_222
 E  RBal_223
 E  RBal_224
 L  MxSe0101
 L  MxSe0102
 L  MxSe0103
 L  MxSe0104
 L  MxSe0201
 L  MxSe0202
 L  MxSe0203
 L  MxSe0204
 L  MxMa0101
 L  MxMa0102
 L  MxMa0103
 L  MxMa0104
 L  MxMa0201
 L  MxMa0202
 L  MxMa0203
 L  MxMa0204
 L  MxRS0102
 L  MxRS0103
 L  MxRS0104
 L  MxRS0105
 L  MxRS0202
 L  MxRS0203
 L  MxRS0204
 L  MxRS0205
 L  Clos0101
 L  Clos0102
 L  Clos0103
 L  Clos0201
 L  Clos0202
 L  Clos0203
COLUMNS
    make_111  MaxProfi   -150.000000   PBal_111     -1.000000
    make_111  RBal_111      1.000000   RBal_211       .500000
    make_111  MxMa0101      1.000000
    make_211  MaxProfi    -75.000000   PBal_211     -1.000000
    make_211  RBal_111      1.300000   RBal_211       .400000
    make_211  MxMa0101      1.000000
    make_121  MaxProfi   -153.000000   PBal_121     -1.000000
    make_121  RBal_121      1.000000   RBal_221       .500000
    make_121  MxMa0201      1.000000
    make_221  MaxProfi    -68.000000   PBal_221     -1.000000
    make_221  RBal_121      1.300000   RBal_221       .400000
    make_221  MxMa0201      1.000000
    make_112  MaxProfi   -150.000000   PBal_112     -1.000000
    make_112  RBal_112      1.000000   RBal_212       .500000
    make_112  MxMa0102      1.000000
    make_212  MaxProfi    -75.000000   PBal_212     -1.000000
    make_212  RBal_112      1.300000   RBal_212       .400000
    make_212  MxMa0102      1.000000
    make_122  MaxProfi   -153.000000   PBal_122     -1.000000
    make_122  RBal_122      1.000000   RBal_222       .500000
    make_122  MxMa0202      1.000000
    make_222  MaxProfi    -68.000000   PBal_222     -1.000000
    make_222  RBal_122      1.300000   RBal_222       .400000
    make_222  MxMa0202      1.000000
    make_113  MaxProfi   -150.000000   PBal_113     -1.000000
    make_113  RBal_113      1.000000   RBal_213       .500000
    make_113  MxMa0103      1.000000
    make_213  MaxProfi    -75.000000   PBal_213     -1.000000
    make_213  RBal_113      1.300000   RBal_213       .400000
    make_213  MxMa0103      1.000000
    make_123  MaxProfi   -153.000000   PBal_123     -1.000000
    make_123  RBal_123      1.000000   RBal_223       .500000
    make_123  MxMa0203      1.000000
    make_223  MaxProfi    -68.000000   PBal_223     -1.000000
    make_223  RBal_123      1.300000   RBal_223       .400000
    make_223  MxMa0203      1.000000
    make_114  MaxProfi   -150.000000   PBal_114     -1.000000
    make_114  RBal_114      1.000000   RBal_214       .500000
    make_114  MxMa0104      1.000000
    make_214  MaxProfi    -75.000000   PBal_214     -1.000000
    make_214  RBal_114      1.300000   RBal_214       .400000
    make_214  MxMa0104      1.000000
    make_124  MaxProfi   -153.000000   PBal_124     -1.000000
    make_124  RBal_124      1.000000   RBal_224       .500000
    make_124  MxMa0204      1.000000
    make_224  MaxProfi    -68.000000   PBal_224     -1.000000
    make_224  RBal_124      1.300000   RBal_224       .400000
    make_224  MxMa0204      1.000000
    sell_111  MaxProfi    400.000000   PBal_111      1.000000
    sell_111  MxSe0101      1.000000
    sell_211  MaxProfi    410.000000   PBal_211      1.000000
    sell_211  MxSe0201      1.000000
    sell_121  MaxProfi    400.000000   PBal_121      1.000000
    sell_121  MxSe0101      1.000000
    sell_221  MaxProfi    410.000000   PBal_221      1.000000
    sell_221  MxSe0201      1.000000
    sell_112  MaxProfi    380.000000   PBal_112      1.000000
    sell_112  MxSe0102      1.000000
    sell_212  MaxProfi    397.000000   PBal_212      1.000000
    sell_212  MxSe0202      1.000000
    sell_122  MaxProfi    380.000000   PBal_122      1.000000
    sell_122  MxSe0102      1.000000
    sell_222  MaxProfi    397.000000   PBal_222      1.000000
    sell_222  MxSe0202      1.000000
    sell_113  MaxProfi    405.000000   PBal_113      1.000000
    sell_113  MxSe0103      1.000000
    sell_213  MaxProfi    412.000000   PBal_213      1.000000
    sell_213  MxSe0203      1.000000
    sell_123  MaxProfi    405.000000   PBal_123      1.000000
    sell_123  MxSe0103      1.000000
    sell_223  MaxProfi    412.000000   PBal_223      1.000000
    sell_223  MxSe0203      1.000000
    sell_114  MaxProfi    350.000000   PBal_114      1.000000
    sell_114  MxSe0104      1.000000
    sell_214  MaxProfi    397.000000   PBal_214      1.000000
    sell_214  MxSe0204      1.000000
    sell_124  MaxProfi    350.000000   PBal_124      1.000000
    sell_124  MxSe0104      1.000000
    sell_224  MaxProfi    397.000000   PBal_224      1.000000
    sell_224  MxSe0204      1.000000
    buy__111  MaxProfi   -100.000000   RBal_111     -1.000000
    buy__211  MaxProfi   -200.000000   RBal_211     -1.000000
    buy__121  MaxProfi   -100.000000   RBal_121     -1.000000
    buy__221  MaxProfi   -200.000000   RBal_221     -1.000000
    buy__112  MaxProfi    -98.000000   RBal_112     -1.000000
    buy__212  MaxProfi   -195.000000   RBal_212     -1.000000
    buy__122  MaxProfi    -98.000000   RBal_122     -1.000000
    buy__222  MaxProfi   -195.000000   RBal_222     -1.000000
    buy__113  MaxProfi    -97.000000   RBal_113     -1.000000
    buy__213  MaxProfi   -198.000000   RBal_213     -1.000000
    buy__123  MaxProfi    -97.000000   RBal_123     -1.000000
    buy__223  MaxProfi   -198.000000   RBal_223     -1.000000
    buy__114  MaxProfi   -100.000000   RBal_114     -1.000000
    buy__214  MaxProfi   -200.000000   RBal_214     -1.000000
    buy__124  MaxProfi   -100.000000   RBal_124     -1.000000
    buy__224  MaxProfi   -200.000000   RBal_224     -1.000000
    pstoc111  PBal_111     -1.000000
    pstoc211  PBal_211     -1.000000
    pstoc121  PBal_121     -1.000000
    pstoc221  PBal_221     -1.000000
    pstoc112  MaxProfi     -2.000000   PBal_111      1.000000
    pstoc112  PBal_112     -1.000000
    pstoc212  MaxProfi     -2.000000   PBal_211      1.000000
    pstoc212  PBal_212     -1.000000
    pstoc122  MaxProfi     -2.000000   PBal_121      1.000000
    pstoc122  PBal_122     -1.000000
    pstoc222  MaxProfi     -2.000000   PBal_221      1.000000
    pstoc222  PBal_222     -1.000000
    pstoc113  MaxProfi     -2.000000   PBal_112      1.000000
    pstoc113  PBal_113     -1.000000
    pstoc213  MaxProfi     -2.000000   PBal_212      1.000000
    pstoc213  PBal_213     -1.000000
    pstoc123  MaxProfi     -2.000000   PBal_122      1.000000
    pstoc123  PBal_123     -1.000000
    pstoc223  MaxProfi     -2.000000   PBal_222      1.000000
    pstoc223  PBal_223     -1.000000
    pstoc114  MaxProfi     -2.000000   PBal_113      1.000000
    pstoc114  PBal_114     -1.000000
    pstoc214  MaxProfi     -2.000000   PBal_213      1.000000
    pstoc214  PBal_214     -1.000000
    pstoc124  MaxProfi     -2.000000   PBal_123      1.000000
    pstoc124  PBal_124     -1.000000
    pstoc224  MaxProfi     -2.000000   PBal_223      1.000000
    pstoc224  PBal_224     -1.000000
    pstoc115  MaxProfi     -2.000000   PBal_114      1.000000
    pstoc215  MaxProfi     -2.000000   PBal_214      1.000000
    pstoc125  MaxProfi     -2.000000   PBal_124      1.000000
    pstoc225  MaxProfi     -2.000000   PBal_224      1.000000
    rstoc111  RBal_111     -1.000000
    rstoc211  RBal_211     -1.000000
    rstoc121  RBal_121     -1.000000
    rstoc221  RBal_221     -1.000000
    rstoc112  MaxProfi     -1.000000   RBal_111      1.000000
    rstoc112  RBal_112     -1.000000   MxRS0102      1.000000
    rstoc212  MaxProfi     -1.000000   RBal_211      1.000000
    rstoc212  RBal_212     -1.000000   MxRS0102      1.000000
    rstoc122  MaxProfi     -1.000000   RBal_121      1.000000
    rstoc122  RBal_122     -1.000000   MxRS0202      1.000000
    rstoc222  MaxProfi     -1.000000   RBal_221      1.000000
    rstoc222  RBal_222     -1.000000   MxRS0202      1.000000
    rstoc113  MaxProfi     -1.000000   RBal_112      1.000000
    rstoc113  RBal_113     -1.000000   MxRS0103      1.000000
    rstoc213  MaxProfi     -1.000000   RBal_212      1.000000
    rstoc213  RBal_213     -1.000000   MxRS0103      1.000000
    rstoc123  MaxProfi     -1.000000   RBal_122      1.000000
    rstoc123  RBal_123     -1.000000   MxRS0203      1.000000
    rstoc223  MaxProfi     -1.000000   RBal_222      1.000000
    rstoc223  RBal_223     -1.000000   MxRS0203      1.000000
    rstoc114  MaxProfi     -1.000000   RBal_113      1.000000
    rstoc114  RBal_114     -1.000000   MxRS0104      1.000000
    rstoc214  MaxProfi     -1.000000   RBal_213      1.000000
    rstoc214  RBal_214     -1.000000   MxRS0104      1.000000
    rstoc124  MaxProfi     -1.000000   RBal_123      1.000000
    rstoc124  RBal_124     -1.000000   MxRS0204      1.000000
    rstoc224  MaxProfi     -1.000000   RBal_223      1.000000
    rstoc224  RBal_224     -1.000000   MxRS0204      1.000000
    rstoc115  MaxProfi     -1.000000   RBal_114      1.000000
    rstoc115  MxRS0105      1.000000
    rstoc215  MaxProfi     -1.000000   RBal_214      1.000000
    rstoc215  MxRS0105      1.000000
    rstoc125  MaxProfi     -1.000000   RBal_124      1.000000
    rstoc125  MxRS0205      1.000000
    rstoc225  MaxProfi     -1.000000   RBal_224      1.000000
    rstoc225  MxRS0205      1.000000
    open0101  MaxProfi  -50000.00000   MxMa0101   -400.000000
    open0101  Clos0101     -1.000000
    open0201  MaxProfi  -63000.00000   MxMa0201   -500.000000
    open0201  Clos0201     -1.000000
    open0102  MaxProfi  -50000.00000   MxMa0102   -400.000000
    open0102  Clos0101      1.000000   Clos0102     -1.000000
    open0202  MaxProfi  -63000.00000   MxMa0202   -500.000000
    open0202  Clos0201      1.000000   Clos0202     -1.000000
    open0103  MaxProfi  -50000.00000   MxMa0103   -400.000000
    open0103  Clos0102      1.000000   Clos0103     -1.000000
    open0203  MaxProfi  -63000.00000   MxMa0203   -500.000000
    open0203  Clos0202      1.000000   Clos0203     -1.000000
    open0104  MaxProfi  -50000.00000   MxMa0104   -400.000000
    open0104  Clos0103      1.000000
    open0204  MaxProfi  -63000.00000   MxMa0204   -500.000000
    open0204  Clos0203      1.000000
RHS
    RHS00001  MxSe0101    650.000000   MxSe0102    600.000000
    RHS00001  MxSe0103    500.000000   MxSe0104    400.000000
    RHS00001  MxSe0201    600.000000   MxSe0202    500.000000
    RHS00001  MxSe0203    300.000000   MxSe0204    250.000000
    RHS00001  MxRS0102    300.000000   MxRS0103    300.000000
    RHS00001  MxRS0104    300.000000   MxRS0105    300.000000
    RHS00001  MxRS0202    300.000000   MxRS0203    300.000000
    RHS00001  MxRS0204    300.000000   MxRS0205    300.000000
BOUNDS
 FX BOUND001  pstoc111     50.000000
 FX BOUND001  pstoc211     50.000000
 FX BOUND001  pstoc121    100.000000
 FX BOUND001  pstoc221     50.000000
 FX BOUND001  rstoc111    100.000000
 FX BOUND001  rstoc211     50.000000
 FX BOUND001  rstoc121    150.000000
 FX BOUND001  rstoc221    100.000000
 BV BOUND001  open0101
 BV BOUND001  open0201
 BV BOUND001  open0102
 BV BOUND001  open0202
 BV BOUND001  open0103
 BV BOUND001  open0203
 BV BOUND001  open0104
 BV BOUND001  open0204
ENDATA

Back to examples browserPrevious exampleNext example