-
Notifications
You must be signed in to change notification settings - Fork 2
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
Migrate to PyOptInterface #79
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #79 +/- ##
==========================================
+ Coverage 94.61% 95.71% +1.10%
==========================================
Files 13 9 -4
Lines 1448 1028 -420
==========================================
- Hits 1370 984 -386
+ Misses 78 44 -34
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Lines Of Code
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor comment on choice of method name. The code looks great and I am looking forward to testing it out!
Motivation 🎉
As discussed internally, this changes brings some important improvements:
Model(solver="highs")
andpip install highsbox
facility
benchmarks)io.py
,io_mappers.py
,solvers.py
, anduser_defined.py
!)Closes #57. Closes #75. Closes #60. Closes #19.
Thanks to @metab0t for the powerful PyOptInterface library, and the helpful responses!
Breaking changes⚠️ ⚠️
Model.to_file(file_path, use_var_names)
Model.write(file_path)
. Note:use_var_names
should now be set when initializing the model.Model.solve(solver, directory, use_var_names, log_fn, warmstart_fn, basis_fn, solution_file, log_to_console)
Model.optimize()
. Note: parameters should be set through other means (e.g.model.attr.Silent = True
instead oflog_to_console=False
)Expression.value
Expression.evaluate()
Config.print_float_precision
Config.float_to_str_precision
Constraint.slack
Constraint.attr.slack
(Gurobi only)Variable.RC
Variable.attr.RC
(Gurobi only)Constraint.relax(...)
Model.params
(Gurobi only)Model(solver_env={"server_name":"bla"})
.to_str(...)
and.to_str_table(...)
pf.Config
Also:
Todo
map_elements
warnings