-
-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HiGHS solver appears but does not work, HiGHS_CMD does not appear at all #727
Comments
Hello, thanks for reporting. I have a few questions:
|
Hi, Thanks for responding,
|
I have the same issue going on now. I had to delete and reinstall Anaconda and now I can't use HiGHS. As my friend case, I was also using HiGHS_CMD solver which I have installed through: conda install -c conda-forge highs I have tried in several different laptops: windows and mac. I have installed anaconda, installed PuLP's latest version. And installed HiGHS. I can also see it in available solvers list but I get same errors trying to run. In my case I can see both HiGHS and HiGHS_CMD. I receive different errors when I try to use them: In HiGHS_CMD: File ~/Desktop/yagmurdangelenler/loopui3.py:191 in run_optimization File ~/anaconda3/lib/python3.11/site-packages/pulp/pulp.py:1872 in solve File ~/anaconda3/lib/python3.11/site-packages/pulp/apis/highs_api.py:152 in actualSolve File ~/anaconda3/lib/python3.11/subprocess.py:548 in run File ~/anaconda3/lib/python3.11/subprocess.py:992 in init File ~/anaconda3/lib/python3.11/subprocess.py:1723 in _get_handles File ~/anaconda3/lib/python3.11/site-packages/ipykernel/iostream.py:356 in fileno UnsupportedOperation: fileno In HiGHS: result = model.solve(solver) File ~/anaconda3/lib/python3.11/site-packages/pulp/pulp.py:1872 in solve File ~/anaconda3/lib/python3.11/site-packages/pulp/apis/highs_api.py:481 in actualSolve File ~/anaconda3/lib/python3.11/site-packages/pulp/apis/highs_api.py:329 in createAndConfigureSolver AttributeError: 'Highs' object has no attribute 'setLogCallback' |
Sorry to hear. Do you have a reproducible example that I can test? Thanks. |
Hello, Python version: Python 3.11.5 model = LpProblem("The_Production_Maximization_Problem", LpMaximize)
solver = HiGHS_CMD() I have taken out intermediate steps but basically this is what I try to run. Thank you again for your interest. |
Can you export your model following some of these instructions? https://coin-or.github.io/pulp/guides/how_to_export_models.html#example-1-json Can you tell me how (I.e. Which steps) did you install highs? And how do you know it's correctly installed? Thanks |
Hello, I have tried to export .json file I wish it would work. I'm using excel to import data, if .json doesn't work for this reason I can supply some other files. I'm also not sure whether I have installed HiGHS correctly because I remember when HiGHS was working for me I was able to locate HiGHS.exe file and run it. Now I try to find it inside Anaconda3 folder and I can't find it. I might have made mistake while installing HiGHS. The step I have done to install highs is to run below code in terminal: conda install -c conda-forge highs MaximizationModel-guncel-github2.json I really appreciate your help! |
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. |
Details for the issue
What did you do?
Having just updated PuLP to use the HiGHS_CMD warmstart option, I am now unable to use HiGHS (but it appears when calling pl.listSolvers(onlyAvailable=True)) and I cannot see the HiGHS_CMD solver anymore when listing all solvers. As far as I understand the issue (which is not that much) it does not make sense that the API version of a solver appears without the CMD version appearing. Before updating, there was no problem with using HiGHS.
I'm currently using the version 1.5.3 from HiGHS which was installed using pip.
What did you expect to see?
I was hoping to use the warmstart features that were mentioned in the changelog of 2.8.0
What did you see instead?
When trying to use HiGHS I get the following error messages:
line 1883, in solve ... status = solver.actualSolve(self, **kwargs)
line 481, in actualSolve ... self.createAndConfigureSolver(lp)
line 329, in createAndConfigureSolver ... lp.solverModel.setLogCallback(*callbackTuple)
AttributeError: 'Highs' object has no attribute 'setLogCallback'
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
The text was updated successfully, but these errors were encountered: