I'm not sure about that last part. When the user cut callback is invoked, you are not
guaranteed that a new solution has been found, but it could have been. For instance, if the node LP has an integral solution, I think that will be detected before the user cut callback is called.
------------------------------
Paul Rubin
Professor Emeritus
Michigan State University
------------------------------
Original Message:
Sent: Thu May 27, 2021 08:07 PM
From: Eduardo Moreno
Subject: Getting bounds from LazyConstraint callback with heuristic solutions
Very interesting. Thanks! That explains my problem...
I assume that this applies only to LazyCutCallbacks, not UserCutCallbacks (since in this case, no new solution has been found).
Best!
------------------------------
Eduardo Moreno
Original Message:
Sent: Thu May 27, 2021 05:24 PM
From: Paul Rubin
Subject: Getting bounds from LazyConstraint callback with heuristic solutions
Quoting the documentation for the Java API getLBs() method:
<quote>"The bounds may be different from the bounds the variables have in the active model, since branching or bound strengthening may have been applied to them. The corresponding solution values from getValues may violate these bounds at a node where a new incumbent has been found because the bounds are tightened when an incumbent is found."
So if the inconsistencies are that the solution to the node LP relaxation does not conform to the bounds at a node where a heuristic solution was found, I think it is to be expected.
</quote>
------------------------------
Paul Rubin
Professor Emeritus
Michigan State University
Original Message:
Sent: Thu May 27, 2021 01:05 PM
From: Eduardo Moreno
Subject: Getting bounds from LazyConstraint callback with heuristic solutions
Hi all.. I'm coding a LazycutCallback using DOcplex.MP v2.11 from CPLEX Studio v12.10.
For the callback, I need the current lower/upper bound at the node for the integer variables, to construct a local cut (using get_lower_bounds() and get_upper_bounds() functions. However, I'm getting some inconsistent results for these bounds. I just noticed that these inconsistencies occur only when the current solution comes from CPLEX internal heuristic solution (get_solution_source() == heuristic_solution ).
My question: Is this a expected result? Can you get the node upper/lower bounds when the current solution is an heuristic solution? Or these bounds are only valid for node_solution solutions?
------------------------------
Eduardo Moreno
------------------------------
#DecisionOptimization