Originally posted by: maiklb2005
I have a clarifying question with respect to p. 1. If the integer feasible region is not modified and previously obtained cuts are not modified but kept "as is", then cuts are still valid.
In my implementation, I add cuts by using
cplex.importModel(model,"ProbWithCuts.lp", obj, var, rng); \\ ProbWithCuts.lp is an output file that contains CPLEX-generated cuts that are extracted by using admipex1.c
model.remove(obj);
model.add(rng);
model.remove(var);
I assume that rng is where constraints and cuts are.
Then I add the objective function and declare constraints. The constraints are the same as those used in generation of cuts in "ProbWithCuts.lp."
After extracting the model, and exporting the model, I can see the .lp file. The .lp file seems to contain all the original constraints and the cuts.
However, it seems that constraints and cuts in rng are not really added to the model. Attached are two screenshots. "CutsAreGenerated.jpg" shows the optimization and it is clear the that lower bound is driven by the cuts only (you can see that there are not branching operations). After the optimization is finished, cuts are saved to "ProbWithCuts.lp." "CutsAreAddedAndProblemIsSolved.jpg" shows the optimization with the cuts that are imported from "ProbWithCuts.lp." However, we can see that the initial lower bound is not the lower bound that was obtained by the cuts. It appears to me that model.add(rng) does not really add cuts to the formulation.
When I run a formulation that was output to an .lp file (it contains the original formulation + the cuts), the same situation occurs as shown in "CutsAreAddedAndProblemIsSolved.jpg." Based on this, I can also conclude that while cuts are added to the .lp file, the are ignored.
I use Cplex 12.5.1. Thank you.
P.S. I also merged .lp files with the original formulation and with the cuts manually. I pasted the cuts from "ProbWithCuts.lp" and gave then a unique identifier starting with the letter "c." In doing so, I imposed the cuts as constraints. The result is a little better, but still not as expected. Please see the "CutsAreAddedManuallyAndProblemIsSolve.lp." On an unrelated note, is there a way to impose CPLEX-generated cuts as constraints and give them unique names automatically? Thank you.
#CPLEXOptimizers#DecisionOptimization