Skip to content

Make CVXOPT optional  #289

@robertmartin8

Description

@robertmartin8

@robertmartin8 That's a good point. When running the discrete allocation without any MI solvers (or only ECOS_BB), cvxpy raises a very informative error, detailing the issue. It also provides two quick fixes to the user:

Quick fix 1: if you install the python package CVXOPT (pip install cvxopt),
then CVXPY can use the open-source mixed-integer solver `GLPK`.

Quick fix 2: you can explicitly specify solver='ECOS_BB'. This may result
in incorrect solutions and is not recommended.

One could even go one step further and catch it early, but I do not think that would add a lot of value.

Another approach would be to switch the default MI solver to either CPLEX or XPRESS. Both run the tests just fine and I never had an issue with installation. Check the cvxpy Docs for the limitations. Even though they are installing the free editions by default, some users might have issues with closed source dependencies for various reasons.

Originally posted by @phschiele in #284 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenanceContinuous integration, unit testing & package distribution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions