pulp icon indicating copy to clipboard operation
pulp copied to clipboard

help needed with HiGHS solver

Open d3netxer opened this issue 1 year ago • 2 comments

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 avatar Mar 02 '24 16:03 d3netxer

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'

d3netxer avatar Mar 02 '24 16:03 d3netxer

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.

pchtsp avatar Mar 02 '24 18:03 pchtsp

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())

d3netxer avatar May 08 '24 16:05 d3netxer