Gurobi Results display and export
回答済みHello!
I have a Gurobi optimization model, which has around 130 binary decision variables, and more than 4000 continuous decision variables.
After optimizing the model:
How do I retrieve and export all the results (selected binary variables and values of continuous variables) in a presentable and understandable way to a .csv or .pkl or .py file?
Thank you for the assistance!
Kind Regards,
Mohammed.
-
正式なコメント
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 Mohammed,
How do I retrieve and export all the results (selected binary variables and values of continuous variables) in a presentable and understandable way to a .csv or .pkl or .py file?
You can either let Gurobi write a SOL or JSON file automatically by usage of the write method. If you need to write the solution to any other file format, you can retrieve all solution information via variable attributes and adjust them to your file format as you wish. A simple example of how to access and print variable names and solution values can be found in the mip1.py example.
Best regards,
Jaromił0
投稿コメントは受け付けていません。
コメント
2件のコメント