public class SecurityAnalysisExecutionHandler<R>
extends com.powsybl.computation.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,
com.powsybl.security.distributed.SecurityAnalysisExecutionHandler.ExceptionHandler exceptionHandler,
int executionCount,
SecurityAnalysisExecutionInput input)
Creates a new security analysis execution handler.
|
Modifier and Type | Method and Description |
---|---|
R |
after(Path workingDir,
com.powsybl.computation.ExecutionReport report)
Reads result from the working directory, as defined by the specified reader.
|
List<com.powsybl.computation.CommandExecution> |
before(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.
|
public SecurityAnalysisExecutionHandler(com.powsybl.security.distributed.SecurityAnalysisExecutionHandler.ResultReader<R> reader, com.powsybl.security.distributed.SecurityAnalysisExecutionHandler.OptionsCustomizer optionsCustomizer, com.powsybl.security.distributed.SecurityAnalysisExecutionHandler.ExceptionHandler exceptionHandler, int executionCount, SecurityAnalysisExecutionInput input)
reader
- Defines how results should be read from working directory.optionsCustomizer
- If not null
, defines additional command options.exceptionHandler
- Used to translate exceptions to a ComputationException
.executionCount
- The number of executions of the command.input
- The execution input data.public List<com.powsybl.computation.CommandExecution> before(Path workingDir) throws IOException
IOException
public R after(Path workingDir, com.powsybl.computation.ExecutionReport report) throws IOException
after
in interface com.powsybl.computation.ExecutionHandler<R>
after
in class com.powsybl.computation.AbstractExecutionHandler<R>
IOException
Copyright © 2020. All rights reserved.