Originally posted by: lbr33
First, I declare the variables as follows:
y = IloNumVarArray(env, SIZE_y, 0.0, 1.0, ILOFLOAT);
x = IloNumVarArray(env, SIZE_x, 0.0, +IloInfinity, ILOFLOAT);
The .lp file follows attached (PM-continuous.lp).
Then, when I solve the model I obtain the output below:
CPXPARAM_Threads 1
Tried aggregator 1 time.
No LP presolve or aggregator reductions.
Presolve time = 0.00 sec. (1.50 ticks)
Initializing dual steep norms . . .
Iteration log . . .
Iteration: 1 Dual objective = 0.000000
Iteration: 81 Dual objective = 22000.000000
Iteration: 158 Dual objective = 41277.661327
of , 41277.6613
time , 0.1100
status = Optimal
In sequence, I integralize the variables as follows:
for(int i = 0; i < y.getSize(); i++) {
mod.add(IloConversion(env, y[i],ILOINT));
}
for(int i = 0; i < x.getSize(); i++) {
mod.add(IloConversion(env, x[i],ILOINT));
}
The .lp file follows attached (PM-integer.lp).
If I directly give CPLEX this .lp file, I get the answer.
But when my code in c++/Concert tries to solve it, I get the output below:
CPXPARAM_Threads 1
MIP emphasis: balance optimality and feasibility.
MIP search method: dynamic search.
Parallel mode: none, using 1 thread.
Root relaxation solution time = 0.00 sec. (4.13 ticks)
Nodes Cuts/
Node Left Objective IInf Best Integer Best Bound ItCnt Gap
0 0 41277.6613 14 41277.6613 0
* 0+ 0 47132.6225 41277.6613 12.42%
0 0 45038.2373 3 47132.6225 Cuts: 2 12 4.44%
0 0 45038.2373 4 47132.6225 MIRcuts: 8 27 4.44%
0 0 45038.2373 6 47132.6225 MIRcuts: 4 35 4.44%
0 2 45038.2373 6 47132.6225 45038.2373 35 4.44%
Elapsed time = 0.06 sec. (67.45 ticks, tree = 0.01 MB, solutions = 1)
418 306 45038.2373 2 47132.6225 45038.2373 1085 4.44%
933 684 45038.2373 3 47132.6225 45038.2373 2608 4.44%
1510 1180 45038.2373 2 47132.6225 45038.2373 4028 4.44%
2095 1698 45038.2373 4 47132.6225 45038.2373 5667 4.44%
2731 2263 45038.2373 2 47132.6225 45038.2373 6987 4.44%
3370 2828 45038.2373 2 47132.6225 45038.2373 8420 4.44%
4000 3377 46085.4299 1 47132.6225 45038.2373 10005 4.44%
4628 3928 46085.4299 1 47132.6225 45038.2373 11568 4.44%
5332 4533 45038.2373 2 47132.6225 45038.2373 13476 4.44%
8238 6621 46085.4299 2 47132.6225 45038.2373 22129 4.44%
Elapsed time = 2.32 sec. (3173.27 ticks, tree = 15.98 MB, solutions = 1)
#CPLEXOptimizers#DecisionOptimization