-
Notifications
You must be signed in to change notification settings - Fork 0
Using SMS++ from Python
SMS++ is a C++ framework, but you don't have to write C++ to use it. Two Python packages let you build, run and post-process SMS++ models from Python, which is often the quickest way to get started.
These packages are developed and maintained by the SPSUnipi group; their documentation always reflects their latest version, so we link it directly instead of duplicating it here.
pySMSpp is a Python interface to
create SMS++ models with a simple, Pythonic API. It supports reading/writing
SMS++ models from/to netCDF4 files, adding/editing model components, running
SMS++ and reading the results back. It is also shipped as the
pySMSpp submodule of this project.
- 📖 Documentation: https://pysmspp.readthedocs.io
- 🧩 A complete, runnable example that builds a thermal UCBlock instance from scratch: Thermal UCBlock, 1 bus
Install it with pip install pysmspp and follow the docs above.
pypsa2smspp bridges PyPSA — the widely used energy-system modelling framework — and SMS++: it converts a PyPSA network into the corresponding SMS++ instance, so you can model an energy system in PyPSA and solve it with SMS++'s structure-exploiting algorithms.
- 📖 Documentation: https://pypsa2smspp.readthedocs.io
- 🧩 A worked capacity-expansion example built from a PyPSA network: Capacity expansion, 2 buses
- Start from pySMSpp if you want to assemble an SMS++ model directly (Blocks, variables, constraints) from Python.
- Start from pypsa2smspp if you already describe your energy system in PyPSA and want SMS++ to solve it.
Once you are comfortable, the Getting started guide shows the same concepts from the C++ side.