How to get the Console output in C#
AnsweredI'm programming in C#.
If just using Console App, I can see quite some output in the console provided by `model.Optimize()`.
When embedding the optimization process into a GUI environment, it seems I can get variables, objectives, etc. using the `GetVars()`, etc. methods, but I cannot get the whole output similar in the console.
Is there a way to do it?
-
Hi,
See the article How do I instruct Gurobi to produce a log file?
When using one of Gurobi APIs, you would need to explicitly specify the log file name via setting the parameter LogFile. The Gurobi log file would be then written in the same directory as the one you are running the optimization script from.
Best regards,
Maliheh
1 -
Thanks.
For c#, I also found this:
which does not need a `LogFile`.
0
Please sign in to leave a comment.
Comments
2 comments