Constraint has no bool value
AnsweredHi,
when I add a lazy constraint which is a variable less than a float number, I meet the error as follows:
print(ro[0])
print(model._eta[0])
model.cbLazy(ro[0] >= model._eta[0])


Please suggest.
0
-
Official comment
This post is more than two years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum, or try Gurobot, our chatbot interface offering instant, expert-level support. -
Please take a look at the article How do I resolve the error 'Constraint has no bool value (are you trying "lb <= expr <= ub"?)'?.
0
Post is closed for comments.
Comments
2 comments