public class SecurityAnalysisExecutionHandler<R> extends AbstractExecutionHandler<R>
ExecutionHandler
s which may execute one or multiple itools security-analysis command(s).
The exact behaviour is provided through the constructor argument.
Instances are provided by factory methods of SecurityAnalysisExecutionHandlers
.
Specified Network
variant is serialized as an XIIDM file.
Constructor and Description |
---|
SecurityAnalysisExecutionHandler(com.powsybl.security.distributed.SecurityAnalysisExecutionHandler.ResultReader<R> reader,
com.powsybl.security.distributed.SecurityAnalysisExecutionHandler.OptionsCustomizer optionsCustomizer,
int executionCount,
SecurityAnalysisExecutionInput input) |
Modifier and Type | Method and Description |
---|---|
R |
after(java.nio.file.Path workingDir,
ExecutionReport report)
Reads result from the working directory, as defined by the specified reader.
|
java.util.List<CommandExecution> |
before(java.nio.file.Path workingDir)
Copies case file, contingencies file, and parameters file to working directory,
and creates the itools security-analysis command(s) to be executed,
based on configuration and the optional options customizer.
|
onExecutionCompletion, onExecutionStart
public SecurityAnalysisExecutionHandler(com.powsybl.security.distributed.SecurityAnalysisExecutionHandler.ResultReader<R> reader, com.powsybl.security.distributed.SecurityAnalysisExecutionHandler.OptionsCustomizer optionsCustomizer, int executionCount, SecurityAnalysisExecutionInput input)
public java.util.List<CommandExecution> before(java.nio.file.Path workingDir) throws java.io.IOException
workingDir
- the working directory used for this computation. Input data may be written to it.CommandExecution
s to be executed.java.io.IOException
- when an error occurs while wirting to working directory.public R after(java.nio.file.Path workingDir, ExecutionReport report) throws java.io.IOException
after
in interface ExecutionHandler<R>
after
in class AbstractExecutionHandler<R>
workingDir
- the working directory used for this computation. Results may be read from it.report
- the execution report, in particular reporting command execution errors.java.io.IOException
- if and error occurs while reading results from the working directory.