cplex diagnostic

67 views
Skip to first unread message

jshong

unread,
Oct 24, 2014, 1:31:59 PM10/24/14
to yal...@googlegroups.com
Hi. I am using Cplex to solve a MIP.
When I run my program it shows Best integer and Best node. I think it is best upper and lower bounds. 
The problem is it doesn't update for more than 20 hours. 
I want to know whether it is stuck at a point or is still solving it. 
Is there any handle that I can control the cplex diagnostics e.g. showing updates in every 10 min? 
When I using Gurobi, it shows the updated bounds in every 5 seconds. 
Can I do this in Cplex?
Thanks. 


Johan Löfberg

unread,
Oct 25, 2014, 1:43:50 PM10/25/14
to yal...@googlegroups.com
I cannot see any option to increase prints. However, if nothing is printed in 20h, I think it has died or stalled.

jshong

unread,
Oct 25, 2014, 2:54:18 PM10/25/14
to yal...@googlegroups.com
I think so. It is interesting that Gurobi is working but Cplex not. 
Thanks anyway. 
I always appreciate your kind reply to my silly question.
 

jshong

unread,
Oct 27, 2014, 2:24:20 AM10/27/14
to yal...@googlegroups.com
Actually, I have one more question. 

I wonder whether Cplex has this problem because of my modeling with Yalmip. 

It is quite embarrassing that Gurobi keeps updating the bounds and seems to find a solution. 

My problems is stochastic MIP with big M constraints. 

It only has 50-70 scenarios. 

Do you have any similar experience with Cplex?

I really want to use Cplex to expedite my work. Gurobi is not installed in our school server. 

Johan Löfberg

unread,
Oct 27, 2014, 2:49:30 AM10/27/14
to yal...@googlegroups.com
No, I would not say it is typical of cplex. Integer problems are intractable in theory, so you have to expect that some problems can be solved by some solvers, and some problems can't. When you say big-M, how big is M?

The following problem with only 4 integer variables is solved in no time using cplex, but goes on forever with other solvers

intvar x1 x2 x3 x4
sdpvar r1 r2 r3

obj
= 2*x1+2*x2+2*x3-3*x4;

C
= [2*x1+x2+x3-2*x4-2*r1 == .1;
     x1
+2*x2+x3-2*x4-2*r2 == .1;
     x1
+x2+2*x3-2*x4-2*r3 == .1;
     
2*x1+2*x2+2*x3 >= .1
     
0 <= [r1 r2 r3] <= .9];
 
 solvesdp
(C,obj)


Mark L. Stone

unread,
Oct 27, 2014, 8:46:21 AM10/27/14
to yal...@googlegroups.com
I "solved" the immediately above problem in no time using CPLEX 12.6.0.1 as infeasible.

Tried aggregator 1 time.
MIP Presolve eliminated 6 rows and 3 columns.
MIP Presolve modified 2 coefficients.
Reduced MIP has 4 rows, 4 columns, and 15 nonzeros.
Reduced MIP has 0 binaries, 4 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.00 sec. (0.01 ticks)
Presolve time = 0.00 sec. (0.06 ticks)
ans =
    yalmiptime: 0.2200
    solvertime: 0.0110
          info: 'Infeasible problem (CPLEX-IBM)'
       problem: 1

Johan Löfberg

unread,
Oct 27, 2014, 8:48:58 AM10/27/14
to yal...@googlegroups.com
Yup, and now reproduce this using some other solver.

jshong

unread,
Oct 27, 2014, 11:51:29 AM10/27/14
to yal...@googlegroups.com
Quite surprising to me. 

But in my problem, the integer variable is binary. 

So if you use branch and bound, MIP should be solved eventually, isn't it?

Johan Löfberg

unread,
Oct 27, 2014, 1:29:21 PM10/27/14
to yal...@googlegroups.com
Eventually, yes, but eventually might be in 10^150 years.
Reply all
Reply to author
Forward
0 new messages