Skip to content
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

passing parameters #46

Open
stumarcus314 opened this issue Mar 8, 2018 · 7 comments
Open

passing parameters #46

stumarcus314 opened this issue Mar 8, 2018 · 7 comments

Comments

@stumarcus314
Copy link

How does one pass in time limit, absolute optimality gap, and relative optimality gap stopping condition parameters to GPLK when using const solver = GLPKSolverMIP() ?

@carlobaldassi
Copy link
Member

You should be able to pass options as keyword arguments to the constructor. The available ones are documented in the GLPK manual (available at http://www.gnu.org/software/glpk), section 2.10.5 "glp intopt — solve MIP problem with the branch-and-cut method", paragraph "Control parameters". For example, the time limit is tm_lim (passed as an integer number of milliseconds).

@stumarcus314
Copy link
Author

Great thanks a lot! Does GLPK have an absolute optimality gap? The user manual states that mip_gap is the relative optimality gap.

@carlobaldassi
Copy link
Member

Sorry, I don't know more that what's in the manual...

@rschwarz
Copy link
Contributor

Are there plans to implement methods setparameters! from MathProgBase as well?

This would mean handling the two cases of TimeLimit and Silent.

@mlubin
Copy link
Member

mlubin commented Jun 24, 2018

No plans I'm aware of; MPB is deprecated. A MOI wrapper for GLPK is not far off (jump-dev/GLPK.jl#53). It will then be a bit more work to expose these as MOI optimizer attributes.

@rschwarz
Copy link
Contributor

OK. I just saw that setparameters!(s::GLPKSolverMIP; mpboptions...) and setparameters!(m::GLPKMathProgModelMIP are implemented, but the corresponding methods for LP are not. I will try to add them in my own code.

Unfortunately, I will still need to run code based off MPB during the next couple months, because of callbacks and because I need it now 😏

@mlubin
Copy link
Member

mlubin commented Jun 24, 2018

I will still need to run code based off MPB during the next couple months, because of callbacks and because I need it now

That's understandable :). PRs accepted if you'd like to add setparameters! for the LP solver.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants