diff --git a/docs/index.md b/docs/index.md
index a5525d149..8aff74d9b 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -8,6 +8,7 @@ Powsybl-dynawo is an interface between PowSyBl and [Dynaωo](https://dynawo.gith
```{toctree}
:hidden:
load_flow/index.md
+security_analysis/index.md
dynamic_simulation/index.md
dynamic_security_analysis/index.md
```
diff --git a/docs/load_flow/configuration.md b/docs/load_flow/configuration.md
index 87d9907c3..c122cbed6 100644
--- a/docs/load_flow/configuration.md
+++ b/docs/load_flow/configuration.md
@@ -66,10 +66,6 @@ The default value is `100`.
**(TODO: description)**
The default value is `Nan`.
-**timeOfEvent**
-**(TODO: description)**
-The default value is `10`.
-
**chosenOutputs**
**(TODO: description)**
Available values **(TODO: describe them)**:
@@ -80,12 +76,14 @@ Available values **(TODO: describe them)**:
The default value is a list of all of them.
+(timeStepDef)=
+
**timeStep**
-**(TODO: description)**
+`timeStep` defines the maximum time solver step value (in s).
The default value is `10`.
**mergeLoads**
-`mergeLoads` is used to indicates if loads connected to the same bus are merged.
+`mergeLoads` indicates if loads connected to the same bus are merged.
The default value is `TRUE`.
**startingPointMode**
@@ -115,7 +113,6 @@ dynaflow-default-parameters:
startTime: 0.0
stopTime: 100.0
precision: 1.0
- timeOfEvent: 10.0
chosenOutputs: [ "STEADYSTATE", "LOSTEQ", "TIMELINE", "CONSTRAINTS" ]
timeStep: 2.6
mergeLoads: true
@@ -141,9 +138,6 @@ Alternatively, you can provide parameters as a JSON file where supported
"startTime" : 0.0,
"stopTime" : 100.0,
"precision" : 1.0,
- "sa" : {
- "timeOfEvent" : 10.0
- },
"chosenOutputs" : [ "STEADYSTATE", "LOSTEQ", "TIMELINE", "CONSTRAINTS" ],
"timeStep" : 2.6,
"mergeLoads" : true,
diff --git a/docs/security_analysis/configuration.md b/docs/security_analysis/configuration.md
new file mode 100644
index 000000000..1a8e2e7be
--- /dev/null
+++ b/docs/security_analysis/configuration.md
@@ -0,0 +1,29 @@
+# Configuration
+
+The security analysis reuse the `dynaflow` [module](../load_flow/configuration.md#dynaflow-configuration)
+and the `dynaflow-default-parameters` [module](../load_flow/configuration.md#default-parameters).
+
+## Default parameters
+The `dynaflow-security-analysis-default-parameters` module defines the default values for all specific parameters of a security analysis run with DynaFlow.
+
+### Optional parameters
+
+**contingenciesStartTime**
+`contingenciesStartTime` defines when the contingencies start, in seconds.
+If the start time occurs between two [time steps](timeStepDef) the contingencies will start on the next time step.
+The default value of this property is 10.
+
+### Examples
+
+**YAML configuration:**
+```yaml
+dynaflow-security-analysis-default-parameters:
+ contingenciesStartTime: 20
+```
+
+**XML configuration:**
+```xml
+
+ 20
+
+```
\ No newline at end of file
diff --git a/docs/security_analysis/index.md b/docs/security_analysis/index.md
new file mode 100644
index 000000000..9ecf9cd28
--- /dev/null
+++ b/docs/security_analysis/index.md
@@ -0,0 +1,12 @@
+# Security analysis
+
+```{toctree}
+:hidden:
+configuration.md
+```
+
+PowSyBl provides an implementation of the [SecurityAnalysis API from powsybl-core](inv:powsyblcore:*:*#simulation/security/index) with [DynaFlow](https://dynawo.github.io/about/dynaflow).
+
+## Installation
+
+Read this [documentation page](https://dynawo.github.io/about/dynaflow) to learn how to install and configure DynaFlow.
diff --git a/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowParameters.java b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowParameters.java
index 78314fe1f..8590bd7ff 100644
--- a/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowParameters.java
+++ b/dynaflow/src/main/java/com/powsybl/dynaflow/DynaFlowParameters.java
@@ -6,8 +6,6 @@
*/
package com.powsybl.dynaflow;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.core.JsonGenerator;
import com.google.common.base.MoreObjects;
import com.powsybl.commons.config.ModuleConfig;
import com.powsybl.commons.config.PlatformConfig;
@@ -24,59 +22,19 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.IOException;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
-import static com.powsybl.dynaflow.DynaFlowProvider.MODULE_SPECIFIC_PARAMETERS;
-
/**
* @author Guillaume Pernin {@literal }
*/
public class DynaFlowParameters extends AbstractExtension {
- private static final Logger LOGGER = LoggerFactory.getLogger(DynaFlowParameters.class);
-
- /**
- * Inner class dedicated to Security Analysis (SA) namespace
- */
- public static class Sa {
- private static final String SECURITY_ANALYSIS = "sa"; //Security analysis
- private static final double DEFAULT_TIME_OF_EVENT = 10d;
- protected static final String TIME_OF_EVENT = "timeOfEvent";
-
- private Double timeOfEvent = DEFAULT_TIME_OF_EVENT;
-
- public Double getTimeOfEvent() {
- return timeOfEvent;
- }
-
- public void setTimeOfEvent(Double timeOfEvent) {
- this.timeOfEvent = timeOfEvent;
- }
-
- @Override
- public String toString() {
- return MoreObjects.toStringHelper("").omitNullValues()
- .add(TIME_OF_EVENT, timeOfEvent).toString();
- }
-
- public static void writeJson(JsonGenerator jsonGenerator, DynaFlowParameters dynaFlowParameters) throws IOException {
- if (dynaFlowParameters.getSa().isSerializable()) {
- jsonGenerator.writeObjectFieldStart("sa");
- jsonGenerator.writeNumberField("TimeOfEvent", dynaFlowParameters.getTimeOfEvent());
- jsonGenerator.writeEndObject();
- }
- }
-
- @JsonIgnore
- public boolean isSerializable() {
- return timeOfEvent != null;
- }
- }
+ public static final String MODULE_SPECIFIC_PARAMETERS = "dynaflow-default-parameters";
+ private static final Logger LOGGER = LoggerFactory.getLogger(DynaFlowParameters.class);
private static final String CHOSEN_OUTPUT_STRING_DELIMITER = ",";
private static final String SVC_REGULATION_ON = "svcRegulationOn";
private static final String SHUNT_REGULATION_ON = "shuntRegulationOn";
@@ -122,7 +80,6 @@ private static > List