Hi,
I would like to know if it is possible to exploit Benders decomposition contained in Cplex within a LP problem (not a MIP).
Attached you can find a super-simple code, wherein I don’t understand if GAMS is actually using the Benders decomposition using the information from the Cplex configuration file:
Variable
x
y
obj;
Equation
eq0
eq1
eq2
eq3
eq4
eq5
eq6
eq7;
eq0.. obj=e=-y-(0.25*x);
eq1.. y =l= 5+x;
eq2.. y =l= 7.5 +(0.5*x);
eq3.. y =l= 17.5 -(0.5*x);
eq4.. -y =l= 10-x;
eq5.. x =g= 0;
eq6.. x =l= 16;
eq7.. y =g= 0;
Model loc / all /;
$onEcho > cplex.opt
BendersStrategy 1
x.BendersPartition 0
obj.BendersPartition 0
y.BendersPartition 1
$offEcho
option solver = cplex;
loc.optFile=1;
solve loc minimizing obj using lp;
The output that I obtain contains the correct solution, but also a Cplex error (code 1217):
Version identifier: 20.1.0.1 | 2021-04-07 | 3a818710c
CPXPARAM_Advance 0
CPXPARAM_Simplex_Display 2
CPXPARAM_Threads 1
CPXPARAM_Benders_Strategy 1
CPXPARAM_MIP_Display 4
CPXPARAM_MIP_Tolerances_AbsMIPGap 0
Tried aggregator 1 time.
LP Presolve eliminated 3 rows and 1 columns.
Reduced LP has 4 rows, 2 columns, and 8 nonzeros.
Presolve time = 0.00 sec. (0.00 ticks)
It Primal bound Dual bound #ocuts #fcuts Itcnt Time
0 -10000000000000 1 0 0 0.00
--- LP status (1): optimal.
--- Cplex Time: 0.00sec (det. 0.02 ticks)
CPLEX Error 1217: No solution exists.
--- Returning a primal only solution to GAMS (marginals all set to NA).
Optimal solution found
Objective: -15.000000
--- Reading solution for model loc[LST:141]
***
*** Solver did not provide marginals for model loc
***
*** Status: Normal completion[LST:217]
--- Job Prova_S_opt.gms Stop 10/04/21 18:44:55 elapsed 0:00:00.232
Could you help me, please?