From 468d08ca42f2967b603c11de9792fa4f5c0bfc0f Mon Sep 17 00:00:00 2001 From: lisrte Date: Thu, 12 Dec 2024 12:26:30 +0100 Subject: [PATCH] Documentation update Signed-off-by: lisrte --- docs/reference/dynamic.rst | 13 +++++++------ docs/user_guide/dynamic.rst | 7 ++++--- .../python/dynamic/DynamicSimulationContext.java | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/docs/reference/dynamic.rst b/docs/reference/dynamic.rst index 413cad35d..ec01e4ade 100644 --- a/docs/reference/dynamic.rst +++ b/docs/reference/dynamic.rst @@ -47,16 +47,16 @@ EventMapping EventMapping.add_active_power_variation EventMapping.add_node_fault -CurveMapping +OutputVariableMapping ------------ .. autosummary:: :toctree: api/ - CurveMapping - CurveMapping.add_dynamic_model_curves - CurveMapping.add_standard_model_curves - CurveMapping.add_dynamic_model_final_state_values - CurveMapping.add_standard_model_final_state_values + OutputVariableMapping + OutputVariableMapping.add_dynamic_model_curves + OutputVariableMapping.add_standard_model_curves + OutputVariableMapping.add_dynamic_model_final_state_values + OutputVariableMapping.add_standard_model_final_state_values Simulation ---------- @@ -74,3 +74,4 @@ Results SimulationResult SimulationResult.status SimulationResult.curves + SimulationResult.final_state_values diff --git a/docs/user_guide/dynamic.rst b/docs/user_guide/dynamic.rst index 65baac143..7e51d07c8 100644 --- a/docs/user_guide/dynamic.rst +++ b/docs/user_guide/dynamic.rst @@ -46,7 +46,7 @@ To make a dynamic simulation, you need multiple things: 1. A dynamic mapping, it links the static elements (generators, loads, lines) to their dynamic behavior (alpha beta load) 2. A event mapping, it maps the different events. (e.g equipment disconnection) - 3. A curve mapping, it records the given values to be watch by the simulation tool. Curves are the output of the simulation + 3. A output variable mapping, it records the given values to be watch by the simulation tool (can be curves or final state values). There is a class for each of these elements. @@ -83,7 +83,7 @@ To run a Dynawo simulation: # curves mapping variables_mapping = dyn.OutputVariableMapping() variables_mapping.add_dynamic_model_curves("DM_LOAD", ["load_PPu", "load_QPu"]) - variables_mapping.add_standard_model_final_state_values('NGEN', 'Upu_value', False) # and so on + variables_mapping.add_standard_model_final_state_values('NGEN', 'Upu_value') # and so on # simulations parameters start_time = 0 @@ -93,4 +93,5 @@ To run a Dynawo simulation: results = sim.run(network, model_mapping, event_mapping, variables_mapping, start_time, end_time) # getting the results results.status() - results.curves() # dataframe containing the mapped curves \ No newline at end of file + results.curves() # dataframe containing the mapped curves + results.final_state_values() # dataframe containing the mapped final state values \ No newline at end of file diff --git a/java/src/main/java/com/powsybl/python/dynamic/DynamicSimulationContext.java b/java/src/main/java/com/powsybl/python/dynamic/DynamicSimulationContext.java index 17836790b..b5379a002 100644 --- a/java/src/main/java/com/powsybl/python/dynamic/DynamicSimulationContext.java +++ b/java/src/main/java/com/powsybl/python/dynamic/DynamicSimulationContext.java @@ -22,13 +22,13 @@ public class DynamicSimulationContext { public DynamicSimulationResult run(Network network, DynamicModelsSupplier dynamicModelsSupplier, EventModelsSupplier eventModelsSupplier, - OutputVariablesSupplier curvesSupplier, + OutputVariablesSupplier outputVariablesSupplier, DynamicSimulationParameters parameters, ReportNode reportNode) { return DynamicSimulation.find(DEFAULT_PROVIDER).run(network, dynamicModelsSupplier, eventModelsSupplier, - curvesSupplier, + outputVariablesSupplier, network.getVariantManager().getWorkingVariantId(), LocalComputationManager.getDefault(), parameters,