Apply lazy constraint on one constraint only
回答済みHi all,
I would like to apply the lazy constraint attribute on one constraint only but I'm not sure whether it is applied on the whole model or on the specified constraint(s).
Also, I'm wondering if the following syntax is correct (in the Python interface):
self.gurobi_model.setParam("Lazy", 1)
Many thanks for your help in advance.
Best,
Mirka
-
正式なコメント
This post is more than three 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 why not try our AI Gurobot?. -
Hi Mirka,
What you are trying to set is the Lazy Constraint parameter. This parameter tells Gurobi that you are going to add lazy constraints via a callback.
If you want to add a few constraints or just one upfront that should be used as a lazy constraint you need to set the lazy attribute of this specific constraint. Doing so for a constraint called cons1 could for example look like this:
cons1.lazy=1
Best,
Sonja
1
投稿コメントは受け付けていません。
コメント
2件のコメント