-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Add option to print the solvers in memory representation #3948
Comments
Should these users be printing out the internal model? I wouldn't really be in favor of them doing that. This is also quite solver-dependent. Maybe it just needs better documentation in each solver's README. Having said that, perhaps we could make |
I looked into this. The current isn't too bad: using JuMP, HiGHS
model = Model(HiGHS.Optimizer)
@variable(model, x >= 1)
optimize!(model)
Highs_writeModel(unsafe_backend(model), "model.mps") we could perhaps make it using JuMP, HiGHS
model = Model(HiGHS.Optimizer)
@variable(model, x >= 1)
optimize!(model)
MOI.write_to_file(unsafe_backend(model), "model.mps") I'm not really sure who this method is aimed at. Someone who wants to deeply introspect the solver's model, knowing that there is a bug somewhere between JuMP and the solver, so |
It's also sometimes useful when you're transitioning from ... to JuMP and get different answers and want to check what's the difference. |
I like: |
I think there's an argument for (3) and (4). Strong disagreement about (2), and moderate disagreement about (1). In almost every case, |
Re (4): I opened a PR do document how to write an MPS file for support in Gurobi: jump-dev/Gurobi.jl#613 My other issue with something generic is that it really applies only to Gurobi/CPLEX/Xpress/HiGHS/Mosek. It won't apply for Ipopt, or SCS, or any number of other solvers. |
Writing?
is hard for non-super-heavy users.
This is helpful for people with minimal understanding of solution methods.
The text was updated successfully, but these errors were encountered: