Power System Blocks

run-script

The run-script command is used to run scripts based on powsybl. So far, only Groovy is supported.

Usage

$> itools run-script --help
usage: itools [OPTIONS] run-script --file <FILE> [--help]

Available options are:
    --config-name <CONFIG_NAME>   Override configuration file name
    --parallel                    Run command in parallel mode

Available arguments are:
    --file <FILE>   the script file
    --help          display the help and quit

Required parameters

file

Use the --file parameter to specify the path of the script.

Example

The following example shows how to run a simple HelloWorld script:

$> cat hello.groovy
print 'Hello ' + args[0]
$> itools run-script hello.groovy John
Hello John

Maven configuration

To use run-script command, add the following dependencies to the pom.xml file:

<dependency>
    <groupId>com.powsybl</groupId>
    <artifactId>powsybl-scripting</artifactId>
    <version>${powsybl.version}</version>
</dependency>