The com.powsybl.iidm.import_.GroovyScriptPostProcessor class is an implementation of the com.powsybl.iidm.import_.ImportPostProcessor interface that runs a Groovy script after an IIDM network is loaded.

The groovy script has access to two variables:

  • network : the IIDM network instance
  • computationManager : a computation manager instance to use to run simulations


To activate the GroovyScriptPostProcessor, add groovyScript to the postProcessors property of the import module.

Read the groovy-post-processor documentation to learn how to set the path of the groovy script.


    postProcessors: groovyScript
    script: /tmp/script.groovy



The following example prints meta-information from the network:

println "Network " + network.getId() + " (" + network.getSourceFormat()+ ") is imported"

Read this tutorial to learn how to write more complex groovy scripts.

Maven configuration

To use the Groovy post processor, add the following dependencies to the pom.xml file: