PyRAMSES Installation
PyRAMSES (Python-based RApid Multithreaded Simulation of Electric power Systems) is a time-domain dynamic simulator for electric power systems. It provides a Python interface to the RAMSES simulation engine, enabling users to define test cases, run simulations, extract results, and perform post-processing-all within Python scripts or Jupyter notebooks.
PyRAMSES supports Windows and Linux for dynamic simulation (the bundled Helios power-flow engine additionally runs on macOS) and integrates with standard scientific Python libraries (NumPy, SciPy, Matplotlib).
Installation
Section titled “Installation”Install PyRAMSES and all recommended dependencies via pip:
pip install jupyter ipython pyramsesRequired dependencies (matplotlib, scipy, numpy, and — on Windows/Linux — mkl) are installed automatically.
For a minimal installation (no plotting or notebook support):
pip install pyramsesLinux System Prerequisites
Section titled “Linux System Prerequisites”On Linux, the following system libraries must be installed before running PyRAMSES:
sudo apt install libopenblas0 libgfortran5 libgomp1These packages provide:
| Package | Purpose |
|---|---|
libopenblas0 | OpenBLAS BLAS/LAPACK routines used by the solver |
libgfortran5 | GNU Fortran runtime required by the Fortran components of RAMSES |
libgomp1 | OpenMP runtime for multi-core parallel execution |
On most desktop Linux distributions these are already present. If pyramses fails to import with a shared-library error, install the packages above and retry.
MKL Dependencies
Section titled “MKL Dependencies”The simulator depends on the Intel Math Kernel Library (MKL) for LAPACK/BLAS and OpenMP. These are automatically installed as dependencies when installing via pip.
To verify MKL is available, run:
python -c "import numpy; numpy.show_config()"Look for blas_mkl_info or lapack_mkl_info in the output confirming MKL is linked.
Optional: Gnuplot for Real-Time Plots
Section titled “Optional: Gnuplot for Real-Time Plots”PyRAMSES can display observables in real-time during simulation using Gnuplot. This is particularly useful for long simulations to monitor progress.
sudo apt-get install gnuplot-x11Download and install from gnuplot.info. Make sure the installation directory is added to your system PATH.
Platform Support
Section titled “Platform Support”| Platform | Library | Notes |
|---|---|---|
| Windows | ramses.dll | Primary platform, full support |
| Linux | ramses.so | Full support (requires the system libraries above) |
macOS is not supported: no RAMSES binary is bundled for it.
Next Steps
Section titled “Next Steps”- API Reference, Full API documentation
- Examples, Practical usage examples