minimum of a MVar
AnsweredHi,
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
-
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
Please sign in to leave a comment.
Comments
1 comment