Originally posted by: EdKlotz
>
> Hello!
>
> I'm working with a MILP and I want to get the presolved problem after the root node of the B&C tree is solved
with the cuts added by CPLEX. The way I've been doing this is using a (C callable library) solve callback (or a branch callback, the result is the same) and using the function CPXgetcallbacknodelp and changing the obtained problem to MILP, changing the type of the variables and adding the corresponding bounds.
The documentation indicates that the LP you get from CPXgetcallbacknodelp
should not be altered in any way. You can query it, but not change it.
So, if you modify the LP pointer you get from CPXgetcallbacknodelp, results
will be unpredictable. If you want to modify the model in this LP pointer,
first call CPXcloneprob to obtain a separate copy of the model, then
modify that LP pointer instead.
> The problem is that if I try to solve this MILP, I get that the problem is integer infeasible. I know the instance is feasible (is markshare_4_0.mps from Mittelmann's instances at
http://plato.asu.edu/ftp/milp/) .
Well, you can always run the conflict refiner on an infeasible model to get
a minimal explanation of the infeasibility. But, if you didn't make a separate
copy of the LP pointer, do that first, and hopefully you won't have to deal
with any infeasibility issues.
>
> One thing I've tried is comparing the problem I just mentioned with the problem obtained from calling CPXpresolve. They are exactly the same, except for the fact that the first one has additional constraints (CPLEX cuts) and some of the variables are fixed (by bounds) to zero.
>
> Obviously this could be due to an error in my code, but I would like to know if this approach is the right one to get the presolved problem with cuts.
>
First try using cloneprob as described above. If the problem remains infeasible, use the conflict refiner to get an explanation. That will
help shed light on the issue.
#CPLEXOptimizers#DecisionOptimization