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
-
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
サインインしてコメントを残してください。
コメント
1件のコメント