Setting constraints on Mvar
回答済みHi, I have a Mvar:
V1 = m.addMVar(8,8), name='V1')
I want to set constraint to V1 such that the elements in V1 are all binary variable, how should I do that?
0
-
正式なコメント
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 try Gurobot, our chatbot interface offering instant, expert-level support. -
As shown in the addMVar documentation
V1 = m.addMVar((8,8),vtype=GRB.BINARY,name='V1')
Our matrix1.py example is a good point for getting started with the Python Matrix API. We also have a webinar recording teaching Python Matrix API basics.
Best regards,
Jaromił0
投稿コメントは受け付けていません。
コメント
2件のコメント