Originally posted by: igelkun
Dear Forum,
I'm having troubles using lazy constraints in C++ with concert. Basically, I use cplex to find some paths in a graph and want to forbid cycles as they turn up using lazy constraints. Thus, I implemented a callback that turns the given solution into a graph, finds a cycle and adds the representation as (4 different) lazy constraint(s). Now, the first time the callback is invokes seems fine: I find the cycle and add the lazy constraint using add(). However, the second time the callback is invoked, it is given a solution that violates one of the initial conditions given to the model.
What's a good way to debug this? Can I somehow get all constraints that the returned solution should satisfy? I also found the documentation a bit limited - is there a special way that I am supposed to add lazy constraints (what is "separation")?
thanks and kind regards
#CPLEXOptimizers#DecisionOptimization