Originally posted by: MarkOpus
Hello,
I'm solving a milp using benders decomposition. I have multiple sub problems of the same form from which I want to add lazy constraints using callbacks. However, I can't figure out how to access the variables (constraints, objective) of the sub problem in question from the callback.
I have been trying to adapt the code in the ilobendersatsp.cpp example, but, if I'm not mistaken, there is only one sub problem and so they can simply always access the same variable arrays, objective, etc.
So my question would be: within the callback code, how do I know "which" sub problem I'm dealing with and how do I access its variables (etc.) ?
I'm using c++ and cplex version 12.7.1.0.
Thanks!
#CPLEXOptimizers#DecisionOptimization