Package com.powsybl.security.distributed
Class SecurityAnalysisExecutionHandler<R>
java.lang.Object
com.powsybl.computation.AbstractExecutionHandler<R>
com.powsybl.security.distributed.SecurityAnalysisExecutionHandler<R>
- All Implemented Interfaces:
com.powsybl.computation.ExecutionHandler<R>
public class SecurityAnalysisExecutionHandler<R>
extends com.powsybl.computation.AbstractExecutionHandler<R>
Base implementation for
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.
- Author:
- Sylvain Leclerc <sylvain.leclerc at rte-france.com>
-
Constructor Summary
ConstructorsConstructorDescriptionSecurityAnalysisExecutionHandler
(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. -
Method Summary
Modifier and TypeMethodDescriptionReads result from the working directory, as defined by the specified reader.List<com.powsybl.computation.CommandExecution>
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.Methods inherited from class com.powsybl.computation.AbstractExecutionHandler
onExecutionCompletion, onExecutionStart
-
Constructor Details
-
SecurityAnalysisExecutionHandler
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) Creates a new security analysis execution handler.- Parameters:
reader
- Defines how results should be read from working directory.optionsCustomizer
- If notnull
, defines additional command options.exceptionHandler
- Used to translate exceptions to aComputationException
.executionCount
- The number of executions of the command.input
- The execution input data.
-
-
Method Details
-
before
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.- Throws:
IOException
-
after
Reads result from the working directory, as defined by the specified reader.- Specified by:
after
in interfacecom.powsybl.computation.ExecutionHandler<R>
- Overrides:
after
in classcom.powsybl.computation.AbstractExecutionHandler<R>
- Throws:
IOException
-