How to print solution with variable names
ユーザーの入力を待っています。I used model.x, to save the variables and print them, but this doesn't include variable names.
Also, I need to only print variables>0.
And I have too many variables in the magnitude of 100K, so I will need to process the solution from gurobi to actually get useful results. To do so I will need clear and easy to process results from gurobi, is there a way I can also print indices for variable?
Say get a matrix like this for example.
Variable | index 1 | index 2| index 3| value
X | 1 | 1 | 1 | 1
X | 2 | 1 | 1 | 1
-
正式なコメント
This post is more than two 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. -
Which programming language are you using? In your other posts it seems like you are using \(\texttt{C}\) but here you are refering to \(\texttt{model.x}\) which looks more like Python.
Could you please share a minimal reproducible example of how you add your variables to the model?
0
投稿コメントは受け付けていません。
コメント
2件のコメント