简体   繁体   中英

How to disable the generating gurobi.log file when using PuLP and Gurobi as solver?

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM