-
I created a model in code, and the solution is wrong. To debug the issue, I would like to print the model to the screen. When I write Is there a way to print the actual model (the constraints and objective) to the screen? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You can use |
Beta Was this translation helpful? Give feedback.
-
OK. This helps, but I think it would be better to be able to get the model as a string. This would allow e.g. to write the model to a log file using the standard |
Beta Was this translation helpful? Give feedback.
You can use
Model.write("problem.lp")
to write the problem to a file in the.lp
format, which is human-readable.