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

cvxpy interface works #2

Open
SteveDiamond opened this issue Jan 11, 2016 · 7 comments
Open

cvxpy interface works #2

SteveDiamond opened this issue Jan 11, 2016 · 7 comments

Comments

@SteveDiamond
Copy link
Contributor

I got the cvxpy to call ECOS and SCS via this package in the cvxpy julia_opt branch. The tests are in cvxpy/tests/test_julia_opt.py.

Let me know if it works for you guys.

@mlubin
Copy link
Owner

mlubin commented Jan 13, 2016

Looks great! Only syntax issue that might need a bit more thought is for when we compose solvers. For example the conic <-> nonlinear wrapper at https://github.com/mlubin/ConicNonlinearBridge.jl (which is still a bit broken) requires more than one julia package to be imported before being used, e.g.,

using ConicNonlinearBridge, Ipopt

and then the "name" of the conic solver is ConicNLPWrapper(IpoptSolver()). Similarly, for Pajarito the MILP and conic solvers are also input options.
You could hack around this by first calling

mpb_new_solver("Gurobi","GurobiSolver()", &solver);

and then calling

mpb_new_solver("Pajarito","PajaritoSolver(milp_solver=GurobiSolver())", &solver);

but that's a bit ugly. A better approach would probably be to have a function in the API just to import julia packages without creating a solver. Another solution which isn't too weird is to just do:

mpb_new_solver("Gurobi, Pajarito","PajaritoSolver(milp_solver=GurobiSolver())", &solver);

@mlubin
Copy link
Owner

mlubin commented Jan 13, 2016

Ok, with 26c2b6a the comma-separated syntax above should work just fine. No need to change anything else.

@SteveDiamond
Copy link
Contributor Author

Is the cvxpy interface to Pajarito working for you? I was testing it out and had some issues.

@mlubin
Copy link
Owner

mlubin commented May 4, 2016

Currently at a conference but I'll try it out later this week

@mlubin
Copy link
Owner

mlubin commented May 11, 2016

Sorry, will definitely get to it this week.

@mlubin
Copy link
Owner

mlubin commented May 15, 2016

Ok, got most everything set up but running into:

SolverError: The solver JULIA_OPT is not installed.

How do I point it to the libcmpb.so file?

An obvious reason why Pajarito wouldn't be working yet is that there's no API in cmpb to pass in variable categories (binary, int, etc.), but that should be easy to do once everything else is going.

@SteveDiamond
Copy link
Contributor Author

That error means import cmpb failed in Python. Did you run python setup.py install for cmpb?

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

2 participants