I am using PuLP and Gurobi to solve thousands of MILP problem. I don't want to generate gurobi.log file and delete it every time because that is time-consuming. And I found an question here How to disable the calculations log of pulp. This helps to stop printing log in the console. But I want to stop generating log files. Could anyone help me please? Thank you!
Asked
Active
Viewed 503 times
0
-
@m0_as sorry to bother, but I see your answer in another related question and I think maybe you can help me. Thanks. – Shengzhi Lai Jun 01 '21 at 01:59
-
2That's not how @-mentions work here. You can't ping someone unless they have already commented on, asked, or answered a question. – MattDMo Jun 01 '21 at 02:02
-
1Please take the [tour] and carefully read through the [help] to learn more about the site, including [what is on-topic](https://stackoverflow.com/help/on-topic) and [what is not](https://stackoverflow.com/help/dont-ask), as well as [ask]. Please also follow the [question checklist](https://meta.stackoverflow.com/q/260648). – MattDMo Jun 01 '21 at 02:03
1 Answers
2
I have found the answer. In fact, you can pass any Gurobi parameter using PuLP as an interface. So I checked Gurobi's official document stop gurobi.log.
So, model.solve(GUROBI_CMD(logPath = '', options = [('LogToConsole', 0)]))
or model.solve(GUROBI_CMD(options = [('OutputFlag', 0)]))
will work.

Nelewout
- 6,281
- 3
- 29
- 39

Shengzhi Lai
- 21
- 2