Harmony
HARMONic stabilitY assessment of PE-penetrated power systems
Loading...
Searching...
No Matches
computation_runner.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <functional>
6#include <string>
7#include <unordered_map>
8
15public:
16 using Handler = std::function<void(const JSON&, Network&, const JSON& simulationConfig)>;
17
18 explicit ComputationRunner(bool plottingEnabled = true);
19
21 int runAll(const JSON& sim, Network& network, const JSON& simulationConfig) const;
22
23private:
24 bool plottingEnabled_;
25 std::unordered_map<std::string, Handler> handlers_;
26
27 void registerBuiltins();
28 static std::string normalizeType(const JSON& calc);
29};
Definition computation_runner.h:14
int runAll(const JSON &sim, Network &network, const JSON &simulationConfig) const
Definition computation_runner.cpp:254
std::function< void(const JSON &, Network &, const JSON &simulationConfig)> Handler
Definition computation_runner.h:16
Root network model holding buses, elements, and AC/DC grid hierarchy.
Definition network.h:36
nlohmann::json JSON
Definition component_builder.h:6
Builds a Network from a JSON simulation file and runs configured analyses.