CPLEX options life range

22 views
Skip to first unread message

arr...@gmail.com

unread,
Apr 17, 2016, 6:20:57 PM4/17/16
to AMPL Modeling Language
Hi folks, 
           I have a simple question.  
           I'm solving two MIP problems sequentially in a .run file. I set up CPLEX options (such as solution pool) at the beginning of the run file. I'm wondering if both MIP will store feasible solutions or just the first MIP. In my experiment, I observed that only the first MIP stored feasible solutions. I was expecting the solution pool of the second MIP will overwrite the first MIP's. However, I didn't observe this. Could someone explain to me how the CPLEX option life range works?   Thanks in advance!


Feng

Robert Fourer

unread,
Apr 18, 2016, 11:49:28 AM4/18/16
to am...@googlegroups.com
The options set by AMPL for CPLEX, using a command like

option cplex_options 'mipdisplay 2 poolstub multi';

are in effect for all subsequent CPLEX solves -- unless the options are changed by a later command of this form. You can check which options were passed to CPLEX each time, because CPLEX echoes them at the beginning of its solver output. Also CPLEX displays a message when solutions are written to the solution pool, and returns the number of solutions in the pool in <yourobjectivename>.npool. For example, you might see

ampl: option cplex_options 'poolstub multi poolcapacity 5';
ampl: solve;

CPLEX 12.6.3.0: poolstub multi
poolcapacity 5

CPLEX 12.6.3.0: optimal integer solution; objective 235625
108 MIP simplex iterations
0 branch-and-bound nodes

Wrote 2 solutions in solution pool
to files multi1.sol and multi2.sol.
suffix npool OUT;

ampl: print Total_Cost.npool;
2

Bob Fourer
am...@googlegroups.com

=======

arr...@gmail.com

unread,
Apr 22, 2016, 5:52:21 PM4/22/16
to AMPL Modeling Language, 4...@ampl.com
Thank you Bob!  I was expecting the solution pool was overwritten by the second MIP. But that didn't happen. I guess there was something else wrong in my code.  I will check. 

Feng
Reply all
Reply to author
Forward
0 new messages