How can I save the variable values after gurobi optimization calculation in matrix form?
Answered
I use gurobi function to get variable value in python,but I get some results as shown.Because there are many variables in my program, I wonder if there is any way I can save my result in matrix form. just like :
but I can only save the result like this:
When I create a variable, I can use matrix like:

so how can I save my value of variables in matrix form
0
-
Hi Zhao,
You can use the matrix API: Model.addMVar()
Example: matrix1.pyCheers,
David0
Please sign in to leave a comment.
Comments
1 comment