Meaning of "Lazy constraints" in the optimization log
AnsweredHello, I added lazy constraints to a model enumerating them using the Lazy property instead of doing it via callback. In the optimization logs, I see first:
Extracted 400 lazy constraints
and at the end:
Cutting planes:
Implied bound: 19
MIR: 23
Flow cover: 13
Relax-and-lift: 2
Lazy constraints: 6
What does the number 6 after "Lazy constraints:" mean? Is it the amount of lazy constraints that were pulled in (as explained here)?
By checking the "Slack" property of the enumerated lazy constraints, I see that 7 of them have a slack value of 0, three have a value of 1.42e-14 (thus, they can be regarded as 0, considering tolerances), and the rest has a non-zero value. Therefore, I assume that 10 out of the 400 constraints are active at the optimal solution. Shouldn't then the amount of lazy constraints used be 10 instead of 6? Or is it 6 because some of "missing" 4 constraints are already satisfied when pulling in some of the other 6, and as explained in the documentation, "With a value of 1, the constraint can be used to cut off a feasible solution, but it won’t necessarily be pulled in if another lazy constraint also cuts off the solution"?
Thanks in advance!
-
Hi Tomas,
The output means that there are 6 active lazy constraint at the optimal solution point.
Or is it 6 because some of "missing" 4 constraints are already satisfied when pulling in some of the other 6, and as explained in the documentation, "With a value of 1, the constraint can be used to cut off a feasible solution, but it won’t necessarily be pulled in if another lazy constraint also cuts off the solution"?
Correct, this is why you see 6 instead of 10.
Best regards,
Jaromił0
Please sign in to leave a comment.
Comments
1 comment