-
Notifications
You must be signed in to change notification settings - Fork 526
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 fails as LegacySolver is not available #2774
Comments
How did you install HiGHS? Did you install the python bindings as well? It does not look like highspy 1.5.1 is on PyPI yet, so we are not testing against it yet. I did install the latest version of HiGHS locally, and everything seems to be working. |
HiGHS was originally installed using: |
Can you try:
in a python console? |
After downgrading to 1.4.0dev I get this: After reinstalling 1.5.0dev I get this: |
If you look in the highspy directory in your python site-packages, do you see any dll files? |
No DLLs |
Sounds like the DLL is not getting copied from the wheel into your site-packages. I'll create an issue on the HiGHS repo. In the meantime, you can probably manually download the correct wheel from here (https://pypi.org/project/highspy/#files), unzip the wheel, and put the DLL in your site packages. |
Sorry - can you check one more thing? Are there any ".pyd" files in your site-packages? |
I think you need the ".pyd" rather than the DLL. I'm not sure though. |
I have .\Lib\site-packages\highspy\highs_bindings.cp39-win_amd64.pyd These appear to be the same filenames that v1.4.0dev has. |
Strange... |
It looks like there is also a highs-*.dll in the wheel under highspy.libs. Do you see anything like that? |
Yes, that's there too, along with .load-order-highspy-1.5.0.dev0 |
Then I am stumped. |
When I downgrade to 1.4.0dev my test model solves OK, but not with 1.5.0dev. I'll continuing using 1.4.0dev in the meantime. |
Given that this has been quiet for a year and a half (this sounds like an issue with the 1.5.0dev release and HiGHS is now up to 1.8.1; plus #3449 fixes some issues in the Pyomo HiGHS interface), I am going to close this. @SolverMax, if you are still seeing problems with the HiGHS distribution, please open a new issue. Thanks! |
Summary
Calling the solver appsi_highs produces the error message:
ApplicationError: Solver <class 'pyomo.contrib.appsi.base.SolverFactoryClass.register..decorator..LegacySolver'> is not available (NotFound).
Steps to reproduce the issue
Sample model at:
https://github.com/SolverMax/Random/tree/main/HiGHS-testing/Case-001
The sample model runs correctly when called using the cbc solver (specified in the data file), but fails when using appsi_highs. A few weeks ago it ran correctly with appsi_highs, but Pyomo and HiGHS versions have been upgraded since then.
Information on your system
Pyomo version: Pyomo 6.5.0 (CPython 3.9.7 on Windows 10)
Python version: 3.9.7
How Pyomo was installed (PyPI, conda, source): PyPI
Solver (if applicable): HiGHs v1.5.1
The text was updated successfully, but these errors were encountered: