-
Notifications
You must be signed in to change notification settings - Fork 3
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
WIP: scipy callback concept for IPX #60
base: main
Are you sure you want to change the base?
Conversation
@mdhaber This is what I meant by modifying our fork of HiGHS. This PR adds a SciPy-specific callback function that will be called every iteration of IPX. Questions:
|
Julian said he was willing to take a look. Could you submit a PR to HiGHS?
The methods are already deprecated. They can be removed as soon as
They currently run once every iteration of simplex/revised simplex. I think we need to continue to support that. I'd assume we'd do the same for MIP - every iteration of every LP subproblem. If there's something that happens once every MIP subproblem that isn't part of a regular LP iteration, we'd call it once during that, too, presumably with a different A few other thoughts:
When you're ready, could you add some minimal Python to |
@mdhaber Just created mckib2/scipy#34. I've been testing by running this based on an example in the docs: from scipy.optimize import linprog
c = [-1, 4]
A = [[-3, 1], [1, 2]]
b = [6, 4]
x0_bounds = (None, None)
x1_bounds = (-3, None)
clbk_fun = lambda res: print("clbk:", res)
linprog(c, A_ub=A, b_ub=b, bounds=[x0_bounds, x1_bounds], callback=clbk_fun, method="highs-ipm", options={"presolve": False}) The only information in the |
User callback run every iteration of IPX (excluding crossover)
TODO
scipy_clbk
scipy::clbk_t scipy_clbk
as data member if IPM to avoid needless method call-chain passingHighs
callback data member to consumers