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

solver capabilities table #83

Closed
mlubin opened this issue Jan 4, 2014 · 23 comments
Closed

solver capabilities table #83

mlubin opened this issue Jan 4, 2014 · 23 comments
Milestone

Comments

@mlubin
Copy link
Member

mlubin commented Jan 4, 2014

We need a table (either here or in MathProgBase docs) with the capabilities of each of the different solver objects and the names of their corresponding packages.

@mlubin
Copy link
Member Author

mlubin commented Jan 4, 2014

It would actually be nice to make this programmatic as well. Choosing default solvers is getting a little hairy... we should be able to request a default solver from MathProgBase given a list of the required capabilities.

@IainNZ
Copy link
Collaborator

IainNZ commented Jan 5, 2014

I wonder what does AMPL do without a solver specified...

Baking in a capability matrix seems fine to me though.
Would it get as specific as user cuts support, lazy constraint support, etc?

@mlubin
Copy link
Member Author

mlubin commented Jan 5, 2014

The default solver for AMPL is MINOS (??): http://www.ampl.com/DOWNLOADS/ "The default solver will be MINOS"

I think the easiest way to build the capability matrix programmatically is by checking which MathProgBase tests pass. This might be a bit of an overhead, so we could cache or hardcode the result. We don't have any MathProgBase tests for callbacks, but we could.

@mlubin mlubin closed this as completed in b3c0d18 Jan 28, 2014
@mlubin
Copy link
Member Author

mlubin commented Jan 28, 2014

Oops, haven't addressed choosing default solvers.

@joehuchette
Copy link
Contributor

Looks like you meant to close this already.

@IainNZ IainNZ reopened this Mar 6, 2014
@IainNZ
Copy link
Collaborator

IainNZ commented Mar 6, 2014

Nope, still need the programmatic part of it I think

@joehuchette
Copy link
Contributor

Lol whoops. Is there a better way to do this than try/catch the MathProgBase tests? That seems really brittle.

@mlubin
Copy link
Member Author

mlubin commented Mar 6, 2014

This doesn't need to block the release, untagging.

@mlubin mlubin removed this from the 0.3.x milestone Mar 6, 2014
@IainNZ IainNZ added the solvers label Mar 23, 2014
@mlubin
Copy link
Member Author

mlubin commented Jun 26, 2014

With the recent changes in MPB, we can now do this programmatically using method_exists.

@joehuchette
Copy link
Contributor

This would be a nice addition.

@joehuchette
Copy link
Contributor

How would you update this table programmatically? Could we hook into Pkg.update or Pkg.build to recompute and recache this?

@mlubin
Copy link
Member Author

mlubin commented Aug 11, 2014

I was thinking that this could just be computed at runtime given an instance of an AbstractMathProgModel object.

@joehuchette
Copy link
Contributor

That's true, if it's just method_exists calls it should be pretty cheap.

@mlubin
Copy link
Member Author

mlubin commented Aug 11, 2014

The only issue I see with method_exists is that some feature might be poorly implemented by a solver and we don't yet want people to try using it.

@joehuchette
Copy link
Contributor

Well then it probably shouldn't be in a release for a JuliaOpt package :)

@joehuchette
Copy link
Contributor

We could also require solvers support a classes_supported method at the MPB level, and then it would just be a table lookup and completely unambiguous. We could even have a fallback that does the method_exists test.

@mlubin
Copy link
Member Author

mlubin commented Aug 11, 2014

That introduces an extra level of complexity in that we have to separately define what the problem "classes" are, which could be a bit hairy. Let's just go with method_exists, and if there's a feature that is poorly supported (like, QP in Clp/Cbc would be), then the solver can print a warning.

@joehuchette
Copy link
Contributor

I think the problem classes are pretty well-defined, at least at this point. We can probably wait until this actually is an issue in practice before we worry about it, though.

@mlubin mlubin modified the milestones: 0.7, 0.6 Sep 2, 2014
@karanveerm
Copy link

As Miles said at jump-dev/Convex.jl#32, for the conic interfaces it makes sense to implement 2 functions

# returns an array of cones supported by the solver
get_supported_cones(...)

# input is either a single cone such as :Free or an array like [:Free, :ExpPrimal]
# output is a boolean
supports_cones(...)

We are already checking if we support the cone in each solver:
https://github.com/JuliaOpt/ECOS.jl/blob/master/src/ECOSSolverInterface.jl#L190
https://github.com/karanveerm/SCS.jl/blob/master/src/SCSSolverInterface.jl#L333
https://github.com/JuliaOpt/Mosek.jl/blob/master/src/MosekConicInterface.jl#L2

We might as well expose this nicely.

As of now, Convex.jl has an ugly check here:
https://github.com/cvxgrp/Convex.jl/blob/master/src/solver_info.jl

As for default solver, as of now Convex checks for ECOS, SCS, Gurobi and Mosek in that order and throw an error if none are found.
I was planning to write a function for Convex that takes in the array of cones and returns some solver that

  1. the user has installed
  2. can support those cones

Perhaps, it would make sense to have that functionality in MPB?

@joehuchette
Copy link
Contributor

I agree that this would be nice to have at the MPB level. We've been toying around with a way to construct the lookup table programmatically, but the easy thing to do would just be to hardcode everything in MPB (i.e. not require solvers to implement anything new, at least at this point).

@mlubin
Copy link
Member Author

mlubin commented Nov 30, 2014

For the conic interface it makes a lot of sense just to ask solvers to implement supported_cones().

@mlubin
Copy link
Member Author

mlubin commented Jun 9, 2017

I think this can be largely addressed with traits at the MPB level.

@mlubin mlubin added this to the 1.0 milestone Jun 9, 2017
blegat pushed a commit that referenced this issue Oct 16, 2018
* Fix @unix_only and @windows_only depreciation

* Removing @static

* Added @static for runtime code
@mlubin
Copy link
Member Author

mlubin commented Feb 25, 2019

This discussion is completely stale after the transition to MOI. It could still be interesting to be able to identify which solvers are able to solve a given model (especially with bridges in the mix), but if someone is interested in this, it should be brought up in a new issue.

@mlubin mlubin closed this as completed Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants