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

Customize solver preference order #2383

Open
warwickmm opened this issue Mar 14, 2024 · 3 comments
Open

Customize solver preference order #2383

warwickmm opened this issue Mar 14, 2024 · 3 comments

Comments

@warwickmm
Copy link

It would be nice if there was a way to customize the solver preference order. For example, with the existing definition,

CONIC_SOLVERS = [s.MOSEK, s.ECOS, s.SCS, s.CLARABEL, s.SDPA,
                 s.CPLEX, s.GUROBI, s.COPT, s.GLPK, s.NAG,
                 s.GLPK_MI, s.CBC, s.CVXOPT, s.XPRESS, s.DIFFCP,
                 s.SCIP, s.SCIPY, s.GLOP, s.PDLP, s.ECOS_BB]

MOSEK is the preferred solver for conic problems. However, if one has a limited number of MOSEK licenses compared to say, CPLEX, it would be nice to customize the order so that MOSEK isn't chosen when the user doesn't request a specific solver.

@SteveDiamond
Copy link
Collaborator

That's an interesting suggestion. I'm not sure what the interface would be, because we don't have an official way of changing globals now. You could monkey patch and change the CONIC_SOLVERS list. In my own codebase I will monkey patch things sometimes.

@PTNobel
Copy link
Collaborator

PTNobel commented May 23, 2024

Would #2450 work for your purpose?

@warwickmm
Copy link
Author

From a quick glance, I don't think so. We would like to customize the order in which CVXPY chooses the solver, i.e., when the user is not explicitly specifying the solver(s) themselves.

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

3 participants