Assign MVar to ndarray
AnsweredHello,
I am solving a MIP containing variables z and B (Continuos) and F (Binary). I am running the optimization for 10 iterations and after each iteration, one of the parameters (xi) is being updated based on z and B. I am using below code but seems xi will not be a constant after this. Can you guide me how I can convert an MVar value to a constant np array?
zn=z.X
Bn=B.X
shi=np.divide(zn,Bn)
0
-
Official comment
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,
Can you please give a minimal, complete, working example here? I am not sure what xi is referring to and it's not clear what your expected result is.
0
Post is closed for comments.
Comments
2 comments