Install¶
Requirements¶
Python 3.10 or newer
A fresh virtual environment is strongly recommended.
Install monee¶
pip install monee
Installs the core package with all required dependencies: GEKKO, Pyomo, NumPy, SciPy, pandas, NetworkX, Plotly, and geopy.
git clone https://github.com/Digitalized-Energy-Systems/monee.git
cd monee
pip install -e .
Editable install: changes to the source are reflected immediately without reinstalling.
Optional extras¶
Extra |
Install command |
What it adds |
|---|---|---|
|
|
In-process CasADi/IPOPT solver back-end (the default solver when present) |
|
|
Import networks from SimBench and convert pandapower networks |
Optional dependencies¶
Some features pull in extra packages on demand. monee imports them lazily and
raises an instructive ImportError when they are missing, so install them only
when you need the feature:
Package |
Install command |
Needed for |
|---|---|---|
|
|
CIM/CGMES import ( |
|
|
ESDL import ( |
|
|
SimBench and pandapower grid import |
|
|
Automatic graph layout in |
|
already included |
Geodesic branch lengths in the MES generators |
Note
SciPy (MATPOWER import), Plotly (visualization), and geopy ship with the core install, so no extra step is needed for those features.
Solver back-ends¶
The default solver is IPOPT. With the optional CasADi extra installed, IPOPT runs in-process through CasADi (no subprocess, typically much faster); without it, IPOPT falls back to the GEKKO binary that ships with the core install. For mixed-integer or conic problems you switch to Pyomo and add a solver binary.
CasADi builds the NLP as an in-memory expression graph and calls IPOPT in-process. It covers the smooth formulations, including temporal and multi-period coupling. Install it with the extra below; if it is absent, monee uses the GEKKO suite, which bundles its own APOPT, BPOPT and IPOPT binaries.
Best for: nonlinear energy-flow simulation and NLP optimisation.
pip install monee[casadi]
Translates the network model to a Pyomo
ConcreteModel. You install at least one solver binary separately.
Best for: MILP and MIQCP problems, for example MISOCP optimal power flow.
# SCIP: recommended non-commercial solver for MIQCP
conda install -y pyscipopt
See Use the Pyomo solver for a full walk-through.
Selection of available solver binaries for Pyomo¶
Solver |
Licence |
Problem types |
Install |
|---|---|---|---|
Open-source |
LP · MILP · MIQCP · MINLP |
|
|
Open-source |
LP · MILP · QP |
|
|
Open-source |
LP · MILP |
|
|
Open-source |
LP · MILP |
|
|
Commercial |
LP · MILP · MIQCP |
requires licence |
Pass the solver by name, e.g. run_energy_flow(net, solver="scip"). The name
chooses the back-end: ipopt routes to CasADi when installed (otherwise
GEKKO), apopt and bpopt route to GEKKO, and every other name is forwarded
to Pyomo. Override the back-end explicitly with backend=... if needed.