PowSyBl Logo

PowSyBl Metrix#

Presentation#

MappingTool provides a mapping configuration from csv timeseries to network. This configuration allows to generate iidm network at specified times. Furthermore, it allows using the second tool, MetrixTool.

MetrixTool can compute power load flow and optimal power load flow for the multi variant networks generated by the mapping tool. Its outputs are completed by synthesis.

MetrixTool calls metrix simulator as an external program. This program has its own requirements.

Installation#

PowSyBl-Metrix can be installed easily in just a few steps, so that you can use it in command line:

Downloads#

First, on the release page, you can download:

  • itools-metrix

  • metrix-simulator

itools-metrix is written in Java, so there is only one version per release, and it works for every OS. metrix-simulator however is written in C++ so you will need to choose the version corresponding to your OS.

Note: Current versions of metrix-simulator-ubuntu were compiled on Ubuntu 24. If you encounter issues regarding the compiler, don’t hesitate to use the metrix-simulator-centos version that has been compiled with an older version of the compiler.

Once the two zip files are downloaded, unzip them in a repository of your choosing.

Configuration#

itools command#

Now we need to make the itools command available. For this, you need to add itools to your PATH.

On Linux, you can for example do this by adding a few lines in your .bashrc file (or equivalent):

# PowSyBl-Metrix itools repository
export POWSYBL_METRIX_HOME=<repository_where_you_unzipped_itools-metrix>
# Add the repository to the path
export PATH=$POWSYBL_METRIX_HOME/bin:$PATH

On Windows, follow for example this guide.

To check if it works, open a new terminal and type the itools command. You should see the following answer:

$ itools
usage: itools [OPTIONS] COMMAND [ARGS]

Available options are:
    --config-name <CONFIG_NAME>   Override configuration file name

Available commands are:

Computation:
    loadflow                                 Run loadflow

Data conversion:
    convert-network                          convert a network from one format to another

Metrix:
    mapping                                  Time series to network mapping tool
    metrix                                   Run Metrix
    metrix-die                               Generate Metrix DIE files

Misc:
    generate-completion-script               Generates a bash autocompletion script
    plugins-info                             List the available plugins

Script:
    run-script                               run script (only groovy is supported)

Note: If you already have another version of itools installed (for example if you use powsybl-distribution), you may want to have another configuration to use a specific command so that you can use both independently:

alias itoolsmetrix='<repository_where_you_unzipped_itools-metrix>/bin/itools'

Metrix configuration#

Now you need to add some configuration to your PowSyBl config.yml file. By default, this file should be in the <USER_HOME>/.itools directory. Create the file if it does not already exist. Then add the following lines:

metrix:
  home-dir: <directory_where_you_unzipped_metrix-simulator> # required
  command: metrix-simulator
 
  iidm-export-version: "1.11" # default to latest available version
  constant-loss-factor: false # enable constant loss factor
  chunk-size: 10 # size of the batch processed by Metrix
  result-limit: 10000 # max allowed output count
  debug: false # enable debug mode
  log-level: 2 # Metrix log level, available values: 0 (trace), 1 (debug), 2 (info), 3 (warn), 4 (error), 5 (critical)
  debug-log-level: 0 # Metrix log level when debug mode is enabled, available values: 0 (trace), 1 (debug), 2 (info), 3 (warn), 4 (error), 5 (critical)
 
mapping-default-parameters:
  tolerance-threshold: 0.0001f
 
metrix-default-parameters:
  computation-type: LF # default computation type
  loss-factor: 0f # default loss factor value
  nominal-u: 100 # default nominal U