Hi,
I'm new to using lazy constraints and am trying out this simple one with a multi-resource constrained scheduling problem. However, when I run the code to compute violations after getting the "optimal" solution, I find that more violations are still found. Any ideas why this could be? The code I'm using to compute violations both during the lazy constraint and after the solution are exactly the same.
def resource_constr(m,where):
if where == GRB.callback.MIPSOL or where== GRB.Callback.MIPNODE:
print "LAZY"
#Do some stuff to compute violations....
#Basically this set you found is not possible. S[a,t] is binary.
if len(violations)>0:
m.cbLazy(quicksum(S[a,t] for (a,t) in selected)<=len(selected)-1)
Thoughts on what could be breaking this? I really appreciate the help.
Thanks,
Andres