Installing MICOM

MICOM is present on PyPi (the Python Package Index), so it can be installed via pip with

pip install micom

The same installation strategy also works with Anaconda installations or any other Python distributions. Supported Python versions are 3.7 or any later.

By default MICOM will also install OSQP as a quadratic programming solver. MICOM employs a bunch of tricks to improve OSQP performance for linear programming problems, but will still only each accuracies in the order of 1e-4. You may install a commercial QP solver to improve the accuracy and speed (all of them offer free academic licenses).

If you have several supported solvers installed you may later specify one with the solver argument in micom.Community or

(Optional) Install another QP solver

CPLEX (recommended)

After registering and downloading the CPLEX studio for your OS unpack it (by running the provided installer) to a directory of your choice (we will assume it’s called ibm).

Now install the CPLEX python package into your activated environment:

pip install ibm/cplex/python/3.8/x86-64_linux

Substitute 3.8 with your Python version. Substitute x86-64_linux with the folder corresponding to your system (there will only be one subfolder in that directory).

Gurobi (works, but not recommended)

MICOM is not continuously tested against Gurobi. Consequently Gurobi support is often iffy and might break for periods of time. It will also be much slower than CPLEX or OSQP. Gurobi is fast in solving the problem but the Gurobi Python interface is very slow in returning the optimal values for all model variables.

You should only consider using Gurobi if: 1. You do not have access to CPLEX 2. You do need high accuracy solutions (tolerance of 1e-6 or lower)

Gurobi can be installed with conda.

conda install -c gurobi gurobi

You will now have to register the installation using your license key.

[ ]: