{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Preamble\n", "\n", "The same installation strategy also works with Anaconda installations or any other Python distributions. Supported Python versions are 3.8 or later.\n", "\n", "By default MICOM will also install a linear and quadratic programming solver that will work for large problems. For this it leverages\n", "a custom hybrid solver that combines [HIGHS](https://highs.dev/) and [OSQP](https://osqp.org/). Those will be installed along with MICOM\n", "automatically.\n", "\n", "If you have several supported solvers installed you may later specify one with the `solver` argument in `micom.Community` or\n", "`micom.workflows.build`.\n", "\n", "## Install faster (optional non open source) solvers\n", "\n", "The following solvers are proprietary but offer free licenses for academic use. Both solvers are\n", "faster and more accurate for the multi-step LP/QP problems in MICOM than OSQP at the moment. So if\n", "yo have access to them obtaining a license is worthwhile for using MICOM. \n", "\n", "**CPLEX**\n", "\n", "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`).\n", "\n", "Now install the CPLEX python package into your activated environment:\n", "\n", "```bash\n", "pip install ibm/cplex/python/3.10/x86-64_linux\n", "```\n", "\n", "Substitute `3.10` with your Python version. Substitute `x86-64_linux` with the folder corresponding to your system (there will only be one subfolder in that directory).\n", "\n", "**Gurobi**\n", "\n", "Thanks to support from Richard Oberdieck from Gurobi, the Gurobi solvers now work excellently with MICOM.\n", "\n", "Gurobi can be installed with conda.\n", "\n", "```bash\n", "conda install -c gurobi gurobi\n", "```\n", "\n", "You will now have to register the installation using your license key.\n", "\n", "```bash\n", "grbgetkey YOUR-LICENSE-KEY\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.7" } }, "nbformat": 4, "nbformat_minor": 4 }