minimum of a MVar
回答済みHi,
I have an MVar names 'z' as below. I want to calculate the min of z after the solution is solved.
z=mod1.addMVar(N_u,lb=0,name='z')
I am using np.amin(z) but I face error. Can you please support?
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. -
Hi Afsoon,
You need to get the solution values from the MVar first. In this case, you can use np.amin(z.X) to find the minimum of all variable solution values in the array.
0
投稿コメントは受け付けていません。
コメント
2件のコメント