|
Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
|
Orchestrates JSON validation, network assembly, and post-build computations. More...
#include <simulation_builder.h>
Public Member Functions | |
| SimulationBuilder ()=default | |
| ~SimulationBuilder ()=default | |
| void | buildFromJSON (const JSON &simJSON, Network &network) |
Populate network from a full simulation JSON document. | |
| void | runComputations (const JSON &simJSON, Network &network, bool plottingEnabled=true) const |
| Run analyses selected in the simulation JSON (OPF, stability, etc.). | |
| int | runComputationsWithStatus (const JSON &simJSON, Network &network, bool plottingEnabled=true) const |
| const JSON & | getSimulationConfig () const |
Return the parsed simulation configuration object. | |
| void | validateJSON (const JSON &simJSON) const |
| Validate required top-level JSON sections and unique IDs. | |
Orchestrates JSON validation, network assembly, and post-build computations.
|
default |
|
default |
Populate network from a full simulation JSON document.
| simJSON | Root JSON object (simulation, buses, components, …). |
| network | Target network to populate. |
References Network::addElement(), ComponentBuilder::buildFromJSON(), JsonParameterTable::mergeFromObject(), and JsonValidator::validateRoot().
Referenced by runJsonSimulation().
|
inline |
Return the parsed simulation configuration object.
| void SimulationBuilder::runComputations | ( | const JSON & | simJSON, |
| Network & | network, | ||
| bool | plottingEnabled = true |
||
| ) | const |
Run analyses selected in the simulation JSON (OPF, stability, etc.).
| simJSON | Root JSON object (must contain a simulation section). |
| network | Assembled network to analyse. |
| plottingEnabled | When false, JSON plot / plot_result flags are ignored (CLI --no-plot). |
References runComputationsWithStatus().
| int SimulationBuilder::runComputationsWithStatus | ( | const JSON & | simJSON, |
| Network & | network, | ||
| bool | plottingEnabled = true |
||
| ) | const |
References ComputationRunner::runAll().
Referenced by runComputations(), and runJsonSimulation().
| void SimulationBuilder::validateJSON | ( | const JSON & | simJSON | ) | const |
Validate required top-level JSON sections and unique IDs.
| simJSON | Root JSON object. |
References j, and JsonValidator::validateRoot().