Skip to content

Make XpressSolver struct mutable for Alpine compatibility.#37

Merged
joaquimg merged 1 commit intojump-dev:masterfrom
hellemo:master
May 15, 2019
Merged

Make XpressSolver struct mutable for Alpine compatibility.#37
joaquimg merged 1 commit intojump-dev:masterfrom
hellemo:master

Conversation

@hellemo
Copy link
Copy Markdown
Contributor

@hellemo hellemo commented May 10, 2019

I''m working on support for Xpress as mip solver for Alpine, and this change seems to be necessary given the way Alpine sets the settings for the subsolvers. Any reason to keep it the way it is?

@joaquimg
Copy link
Copy Markdown
Member

I don´t see any specific reason. If cplex and gurobi are mutable, then xpress should also be, did you check them?

@mlubin
Copy link
Copy Markdown
Member

mlubin commented May 13, 2019

Modifying internal fields of the solver structs is not really what was intended. The RawParameter proposal would provide a much cleaner way to set parameters on a solver that's already constructed (jump-dev/MathOptInterface.jl#387 (comment)).

@hellemo
Copy link
Copy Markdown
Contributor Author

hellemo commented May 13, 2019

Thanks, I guess the RawParameter way is cleaner, but in the short/immediate term perhaps we could do like Cplex and Gurobi and make it mutable?

https://github.com/JuliaOpt/CPLEX.jl/search?q=AbstractMathProgSolver&unscoped_q=AbstractMathProgSolver
https://github.com/JuliaOpt/Gurobi.jl/search?q=abstractMathProgSolver&unscoped_q=abstractMathProgSolver

@blegat
Copy link
Copy Markdown
Member

blegat commented May 13, 2019

Let's make RawParameter part of MOI v0.9: jump-dev/MathOptInterface.jl#733 so that it can be added in the short term :)
It is already available in MosekTools, it will just be replaced by MOI.RawParameter: https://github.com/JuliaOpt/MosekTools.jl/blob/38f17977484ecaf381622ba32241377cde90c62c/src/MosekTools.jl#L166-L168

@hellemo
Copy link
Copy Markdown
Contributor Author

hellemo commented May 13, 2019

That's great, but Alpine still uses MPB. Maybe I'm confused, but that's why I propose to do like Cplex and Gurobi for now, and do it the proper way with MOI later.

@mlubin
Copy link
Copy Markdown
Member

mlubin commented May 13, 2019

I don't have an objection to the proposed change to the MPB interface.

@joaquimg joaquimg merged commit 2821389 into jump-dev:master May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants