Originally posted by: SystemAdmin
>
>
> Actually, we are old-schoolers: we still use the C API (since it was the only one around when we started writing our codes many years ago ...).
I go back to when there was a FORTRAN API (but no C++), so I sympathize.
>
> But the trick still works. We define a problem without integer variables, but we call CPXmipopt() to solve it. Then, magically, lazy constraints work the way we wanted.
>
> It's a bit counter-intuitive,
The entire business of lazy constraints causing an LP to be treated as a MIP is a trifle counter-intuitive to me, too.
> and it seems to contradict the manual, which explicitly says that lazy constraints are only applied to
integer solutions.
I'm not sure where it says that. I found the following in the C reference manual entry for CPXaddlazyconstraints:
The routine CPXaddlazyconstraints adds constraints to the list of constraints that should be added to the LP subproblem of a MIP optimization if they are violated. CPLEX handles addition of the constraints and makes sure that all integer solutions satisfy all the constraints. The constraints are added to those specified in prior calls to CPXaddlazyconstraints.
To me, that means they're added to the node LP if the
node LP solution violates them, rather than if an integer-feasible solution violates them.
> Your manual writers may consider rephrasing these sentences.
Well, they're not
my manual writers (I'm a civilian), but I'm sure someone from IBM will read this thread and pass the hint along to their documentation team.
> That having been said, I'm very glad it works for us. Thanks a lot.
You're welcome.
/Paul
Mathematicians are like Frenchmen: whenever you say something to them, they translate it into their own language, and at once it is something entirely different. (Goethe)
#CPLEXOptimizers#DecisionOptimization