coin-or / pulp

A python Linear Programming API
http://coin-or.github.io/pulp/
Other
2.01k stars 376 forks source link

HiGHS Log File Not Found/Created #739

Open jlalbers opened 4 months ago

jlalbers commented 4 months ago

Details for the issue

What did you do?

Modeled a MILP problem with PuLP and attempted to solve with the HiGHS_CMD solver. Defined a basic problem and solver as follows:

import pulp as pl

prob = pl.LpProblem("Name", pl.LpMaximize)
solver = pl.HiGHS_CMD()
...
result = prob.solve(solver)
print(result)

What did you expect to see?

I expected to see the result assigned to result and printed to the command line.

What did you see instead?

I get a FileNotFoundError with the following message: [Errno 2] No such file or directory: '/var/folders/qc/sgm9_xyx4t7c_t01c_1klnkc0000gn/T/df3e5a7bf9d04d15b4bba49ee31da6f5-pulp.HiGHS_log'

I checked the directory and found the equivalent .mps and .HiGHS files, but the HiGHS_log file was not created.

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

I'm using python version:

I installed PuLP via:

Did you also

RicardoEGFSilva commented 4 months ago

I'm facing the exact same issue apart from using Windows. Have you found a solution for this problem in the meantime?

pchtsp commented 4 months ago

Thanks for reporting. Unfortunately, I cannot reproduce this error as we do not have HiGHS_CMD in the CI.

Is there any instructions to download and install highs? Extra points if it's cross-platform and does not require user interaction.

jlalbers commented 4 months ago

@pchtsp for the command line version, you can download a pre-compiled binary or build it from source with CMake:

https://ergo-code.github.io/HiGHS/dev/installation/

DavideTr8 commented 3 months ago

Hi! I had the same problem in Linux (Ubuntu) and to me it was solved by running sudo ldconfig in the terminal after installing HiGHS.

I don't know for other OS, but maybe this can help someone else with the same issue on Linux