Comments (6)
Aah, I think I see. Yes, what you suggested works. I guess it may be best for me to wait until there is a semi-stable version of highspy before I delve further into using callbacks via PuLP.
Thanks :)
from highs.
I've tested
python call_highs_from_python.py
this (on Linux) and it runs fine
from highs.
Can I ask what version of Python highspy you are testing this with? I just tried again on a different machine, and still get the initial ModuleNotFoundError: No module named 'highspy.cb'
error. I get this using Python 3.11, and with either highspy==1.7.1.dev1 or highspy==1.5.3.
Is it possible that this is happening because I'm installing highspy from pypi? Do I need to run call_highs_from_python.py
from a repository where I have built both highs and highspy from scratch?
from highs.
Let me test these on my linux as well. highspy.cb is the callback module, which we have yet to test more extensively.
from highs.
I tested this locally and, with the example code from our latest branch and highspy from pypi, I get a different error. It is best to use the examples/ code corresponding to the highspy version you are using.
If you want to install highspy from source, it is not necessary to install highs with cmake beforehand. It is enough to call pip install . from the HiGHS/ directory, and this would build highs and the bindings, wrapped up in the highspy package.
For call_highs_from_python.py, this example loads a file from the check/ subdir and it should be run from the root dir.
Would you please check if the following steps would work? I tested this on my linux and it resolved the issue.
python -m pip uninstall highspy
Check out our latest code from the latest branch on GitHub
And then, from the root directory, call
python -m pip install .
python examples/call_highs_from_python.py
from highs.
Yes, we are planing to include callbacks in the upcoming release of HiGHS, once we have tested a bit more and with documentation. Closing this for now, until further issues are encountered.
from highs.
Related Issues (20)
- Solving alternative systems using `Highs::basisSolve` and `Highs::basisTransposeSolve` HOT 1
- Fix the O(N^2) cost of passColName and passRowName when adding columns and rows one-by-one
- Re-solving many times with primal simplex can lead to basis issues (rare occurrence) HOT 1
- Evaluating model complexity in highs avoiding device related performance
- Add irreducible inconsistent system (IIS) identification for LP
- Build fails on macOS: `f951: Error: '-fno-fat-lto-objects' are supported only with linker plugin` HOT 3
- Get Column Cost HOT 1
- Spurious statement of Integer when writing model HOT 1
- primal_solution_status is reported as kSolutionStatusFeasible for infeasible model when solver=ipm and presolve=off
- How to Set a Partial MIP Solution using setSolution()? HOT 11
- Logging header not printed if `h.writeModel` or `h.writeSolution` called before a method using the HighsIO
- `Highs::writeModel("")` uses `HighsIO`, but `Highs::writeSolution("")` uses `fprintf` for stdout HOT 1
- HiGHS 1.7.1 HighsCallbackDataOut data type can no longer be accessed directly for mip_solution item. HOT 1
- Time limit solving Jeroslow MIP seems not to be triggered HOT 2
- Stop MIP solve on `simplex_iteration_limit` (or other LP iteration limit) - Access iteration count via callback? HOT 2
- CMake configuration fails with versions >3.23.0 and <3.24.0
- Longer runtimes for ILP models created with `addVariable` versus `addCol` HOT 4
- PInvokeStackImbalance exception when targetting .NET Framework (Windows)
- highspy API improvements and benchmark HOT 1
- Stream HiGHs solver output in pyomo HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from highs.