Setup

Most of the integrations require the relevant software to be installed and licensed on the system. As some of the software is only available for Windows, instructions are tested on Windows 10 and 11 only. The tested versions of the software are listed below.

Software

Version

Python

3.10

Matlab

R2022b

Simulink

10.7

Simscape

5.5/Electrical 7.9

RSCAD FX

1.2

PowerFactory

2022 SP2

Installation

To install this project, perform the following steps:

  1. Clone the project repository

  2. cd into the cloned directory

  3. Install Python 3.10

  4. Create a virtual environment with <path to python 3.10>/python -m venv <path to virtual environment>

  5. Activate the virtual environment with <path to virtual environment>\Scripts\activate.bat or <path to virtual environment>\Scripts\activate.ps1

For Basic Usage

  1. pip install . or pip install -e . to install the project editable.

For Development

  1. pip install .[dev] or pip install -e .[dev] to install the project editable.

  2. pre-commit install to install the pre-commit hooks.

Matlab

Install the current Matlab version and the Simulink, Simscape and Simscape Electrical add-ons. The integration is provided by a pip package, no further configuration should be required. However, the package is not included in the default installation as not all users have the required Matlab license.

Use pip install .[simscape] to install the pinned version of the matlabengine package. If this version does not match your installed version of Matlab, use pip install matlabengine==<version> to install the appropriate version.

Note

matlabengine is the pip package that provides the integration with Matlab. Each version of matlabengine typically supports one specific version of MATLAB and requires one of the versions of Python current at release of the package. Please check compatibility at PyPI before upgrading.

matlabengine is pinned to 9.13.9 to support Matlab R2022b and Python 3.11.4.

RSCAD FX / pyapi_rts

The integration is provided by the pyapi_rts package, RSCAD FX does not need to be installed. pyapi_rts might need additional configuration before use, please consult the relevant documentation. Please also check compatibility with your version of RSCAD FX.

PowerFactory

PowerFactory requires the path to the module to be added to the python environment. Different methods are available to do this, the following have been tested:

  • In your Python environment, e.g. C:\Users\USERNAME\.conda\envs\ENVNAME

  • In the directory Lib\site-packages

  • Add a file called powerfactory.pth with the location of the required PowerFactory Python library in a single line - e.g. C:\Program Files\DIgSILENT\PowerFactory 2022\Python\3.10

eASiMOV

eASiMOV does not need to be installed for the integration to work. Compatibility is tested with the version mentioned above, but other versions might work as well.