Originally posted by: SystemAdmin
[chicoscience said:]
Hello Daniel, thank you for your answer.
The cplex.solve() method returns TRUE.
If I import the extended model to cplex, the output is this one:
Tried aggregator 1 time.
LP Presolve eliminated 38 rows and 1 columns.
Reduced LP has 694 rows, 629 columns, and 12580 nonzeros.
Presolve time = 0.02 sec.
Initializing dual steep norms . . .
Iteration log . . .
Iteration: 1 Dual objective = 0.000000
Perturbation started.
Iteration: 52 Dual objective = 0.000000
Iteration: 114 Dual objective = 0.000001
Iteration: 178 Dual objective = 0.000002
Iteration: 246 Dual objective = 0.000003
Iteration: 322 Dual objective = 0.000009
Iteration: 402 Dual objective = 3.865699
Iteration: 464 Dual objective = 4.636635
Iteration: 526 Dual objective = 6.825656
Iteration: 590 Dual objective = 7.172383
Iteration: 652 Dual objective = 8.882960
Iteration: 714 Dual objective = 10.249329
Iteration: 776 Dual objective = 13.320844
Iteration: 838 Dual objective = 21.465574
Iteration: 900 Dual objective = 42.040640
Iteration: 969 Dual objective = 141.000191
Removing perturbation.
Dual simplex - Optimal: Objective = 1.4100000000e+02
Solution time = 0.16 sec. Iterations = 1015 (0)
However, if I solve my extended model after adding a new variable, a new constraint and setting linear coefficients, I get this output:
Tried aggregator 1 time.
MIP Presolve eliminated 39 rows and 1 columns.
MIP Presolve modified 312 coefficients.
Reduced MIP has 693 rows, 629 columns, and 12163 nonzeros.
Presolve time = 0.00 sec.
MIP emphasis: balance optimality and feasibility
Root relaxation solution time = 0.15 sec.
It returns the same objective value to me, however I do not have access to dual variables since exception 1217 is throwed when trying to read them.
It is very odd, I must be doing something wrong. In summary, the first time I solve the model, I can get the dual variables. The second time, I get optimal status, I get the right objective value, but the output is different and I can't get the duals. I am even declaring a new IloCplex object in concert to solve the model. The first output was run in cplex environment, the second output with concert technology.
#CPLEXOptimizers#DecisionOptimization