10 #include <dpsim-models/CSVReader.h>
11 #include <dpsim-models/IdentifiedObject.h>
12 #include <dpsim/RealTimeSimulation.h>
13 #include <dpsim/Simulation.h>
14 #include <dpsim/pybind/BaseComponents.h>
15 #include <dpsim/pybind/Utils.h>
17 namespace py = pybind11;
18 using namespace pybind11::literals;
20 void addBaseComponents(py::module_ mBase) {
21 py::class_<CPS::Base::Ph1::Switch, std::shared_ptr<CPS::Base::Ph1::Switch>>(
23 py::class_<CPS::Base::Ph3::Switch, std::shared_ptr<CPS::Base::Ph3::Switch>>(
27 std::shared_ptr<CPS::MNASyncGenInterface>>(
28 mBase,
"MNASyncGenInterface", py::multiple_inheritance())
31 .def(
"set_tolerance", &CPS::MNASyncGenInterface::setTolerance,
36 std::shared_ptr<CPS::Base::ReducedOrderSynchronGenerator<CPS::Complex>>,
38 mBase,
"ReducedOrderSynchronGeneratorComplex", py::multiple_inheritance())
39 .def(
"set_base_parameters",
41 CPS::Complex>::setBaseParameters,
42 "nom_power"_a,
"nom_voltage"_a,
"nom_frequency"_a)
43 .def(
"set_initial_values",
45 CPS::Complex>::setInitialValues,
46 "init_complex_electrical_power"_a,
"init_mechanical_power"_a,
47 "init_complex_terminal_voltage"_a)
48 .def(
"scale_inertia_constant",
50 CPS::Complex>::scaleInertiaConstant,
52 .def(
"set_model_as_norton_source",
54 CPS::Complex>::setModelAsNortonSource,
55 "model_as_norton_source"_a);
59 std::shared_ptr<CPS::Base::ReducedOrderSynchronGenerator<CPS::Real>>,
61 py::multiple_inheritance())
62 .def(
"set_base_parameters",
64 CPS::Real>::setBaseParameters,
65 "nom_power"_a,
"nom_voltage"_a,
"nom_frequency"_a)
66 .def(
"set_initial_values",
68 CPS::Real>::setInitialValues,
69 "init_complex_electrical_power"_a,
"init_mechanical_power"_a,
70 "init_complex_terminal_voltage"_a)
71 .def(
"scale_inertia_constant",
73 CPS::Real>::scaleInertiaConstant,
75 .def(
"set_model_as_norton_source",
77 CPS::Real>::setModelAsNortonSource,
78 "model_as_norton_source"_a);
Interface to be used by synchronous generators.
void setMaxIterations(Int maxIterations)
Base class for all components that are transmitting power.