How do I model complex conditional statements in Gurobi?
回答済みI have read the article How do I model conditional statements in Gurobi? – Gurobi Help Center
this question concern about two possibilities, so it can made a binary variable b thus indicates if () is true (b=1) or false (b=0).
I want to ask if the question is more complex how can i model it?
for example:

thanks very much
-
正式なコメント
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. -
Hi 舒杨 钱,
Gurobi has an interface for modelling piecewise-linear objective functions. The linked section explains in detail how to define piecewise-linear functions in Gurobi. The method Model.setPWLObj() can be used in Python to set a piecewise-linear objective function, for example. Check the piecewise.py example for how to define piecewise-linear objective functions.
Gurobi also has an interface to define piecewise-linear constraints. The method Model.addGenConstrPWL() can be used in Python. Examples gc_pwl.py() and gc_pwl_func() are relevant examples that you might want to check.Related articles:
How do I model piecewise-linear functions?
Step Functions and Mixed Functions (OR in an OB World)- Riley
0
投稿コメントは受け付けていません。
コメント
2件のコメント