coin-or / pulp

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

help needed with HiGHS solver #733

Closed d3netxer closed 5 months ago

d3netxer commented 7 months ago

What is your question

I am using Windows 10, and an anaconda python 3.10 environment.

I installed Pulp using python -m pip install pulp, and I also tried with installing it directly from the repo

I installed the HiGHS solver with pip install highspy

when I use the listSolvers(onlyAvailable=True) command, this is the result: ['PULP_CBC_CMD', 'HiGHS']

only HiGHS appears, is HiGHS_CMD supposed to appear as well?

if using the HiGHS solver, how is it supposed to work?

I am using this line: prob.solve(HiGHS)

but I am getting the following error:

TypeError: HiGHS.actualSolve() missing 1 required positional argument: 'lp'
d3netxer commented 7 months ago

I figured out that the line I need to have is: prob.solve(HiGHS())

However, I am getting this error:

AttributeError: 'Highs' object has no attribute 'setLogCallback'
pchtsp commented 7 months ago

It may be an issue with Anaconda. Running in my windows laptop (and in github's CI) it works correctly. Which version of HiGHS is installing in anaconda? in the CI it's using 1.5.3 with python 3.10 and the latest pulp version.

d3netxer commented 5 months ago

It seemed to have worked when I tried running it again. The issue might have been I had a phantom running jupyter notebook instance that I had to forcibly shut down. After I did that, I ran it again. It took a long time, but it finally finished, and I can see the final results in my terminal. I am running HiGHS ver 1.5.3. Thanks.

I used this line: prob.solve(HiGHS())