Originally posted by: SystemAdmin
I want to obtain a solution of the relaxed problem. I do not want my program runs so long so I set the time limit is , for example, 60 seconds.
cplex.setParam(IloCplex::TiLim,60); //60 seconds
//cplex.setParam(IloCplex::NodeLim,1); //for some instances, execution time for node 0 is too much.
cplex.solve();
env.out()<<"Best lower bound = "<<cplex.getBestObjValue();
//The lines of codes are not executed??? I see nothing in the console.
if (cplex.getStatus() == IloAlgorithm::Infeasible)
{
env.out() << "No Solution" << endl;
}
else
{
env.out()<<" Objective value = " << cplex.getObjValue()<<endl;
}
I run the model:
C:\ILOG\CPLEX121\examples\x86_windows_vs2008\stat_mta>warehouse.exe 1
Tried aggregator 1 time.
MIP Presolve eliminated 0 rows and 1 columns.
Reduced MIP has 4248 rows, 45828 columns, and 137484 nonzeros.
Reduced MIP has 228 binaries, 0 generals, 0 SOSs, and 0 indicators.
Presolve time = 0.17 sec.
MIP emphasis: balance optimality and feasibility.
MIP search method: dynamic search.
Parallel mode: deterministic, using up to 2 threads.
Root relaxation solution time = 4.42 sec.
Nodes Cuts/
Node Left Objective IInf Best Integer Best Node ItCnt Gap
0 0 103342.8956 145 103342.8956 8366
0 0 121204.0740 169 Cuts: 735 11181
0 0 128232.6272 149 Cuts: 905 13970
0 0 131384.5147 160 Cuts: 708 16704
Flow cuts applied: 752
Flow path cuts applied: 467
Multi commodity flow cuts applied: 3
Root node processing (before b&c):
Real time = 59.91
Parallel b&c, 2 threads:
Real time = 0.00
Sync time (average) = 0.00
Wait time (average) = 0.00
Total (root+branch&cut) = 59.91 sec.
Best lower bound = 131385
bold This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
bold And these lines of code do not run:
if (cplex.getStatus() == IloAlgorithm::Infeasible)
{
env.out() << "No Solution" << endl;
}
else
{
env.out()<<" Objective value = " << cplex.getObjValue()<<endl;
}
Could you explain for me the reasons which lead to the unwanted behavior. It runs well (no error messages) if I do not set the time limit.
Thanks for your explanation.
Lessi.
#CPLEXOptimizers#DecisionOptimization