34 std::shared_ptr<CPS::SP::Ph1::VoltageSource>,
36 py::multiple_inheritance())
37 .def(py::init<std::string>())
38 .def(py::init<std::string, CPS::Logger::Level>())
39 .def(
"set_parameters",
40 py::overload_cast<CPS::Complex, CPS::Real>(
42 "V_ref"_a,
"f_src"_a = 0)
49 py::class_<CPS::SP::Ph1::Resistor, std::shared_ptr<CPS::SP::Ph1::Resistor>,
51 py::multiple_inheritance())
52 .def(py::init<std::string>())
53 .def(py::init<std::string, CPS::Logger::Level>())
59 py::class_<CPS::SP::Ph1::Capacitor, std::shared_ptr<CPS::SP::Ph1::Capacitor>,
61 py::multiple_inheritance())
62 .def(py::init<std::string>())
63 .def(py::init<std::string, CPS::Logger::Level>())
69 py::class_<CPS::SP::Ph1::Inductor, std::shared_ptr<CPS::SP::Ph1::Inductor>,
71 py::multiple_inheritance())
72 .def(py::init<std::string>())
73 .def(py::init<std::string, CPS::Logger::Level>())
80 std::shared_ptr<CPS::SP::Ph1::NetworkInjection>,
82 py::multiple_inheritance())
83 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
84 "loglevel"_a = CPS::Logger::Level::off)
85 .def(
"set_parameters",
86 py::overload_cast<CPS::Real>(
88 "voltage_set_point"_a)
89 .def(
"set_parameters",
90 py::overload_cast<CPS::Complex, CPS::Real>(
92 "V_ref"_a,
"f_src"_a = 0)
96 .def(
"modify_power_flow_bus_type",
100 py::class_<CPS::SP::Ph1::PiLine, std::shared_ptr<CPS::SP::Ph1::PiLine>,
102 py::multiple_inheritance())
103 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
104 "loglevel"_a = CPS::Logger::Level::off)
106 "C"_a = -1,
"G"_a = -1)
111 py::class_<CPS::SP::Ph1::Shunt, std::shared_ptr<CPS::SP::Ph1::Shunt>,
113 py::multiple_inheritance())
114 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
115 "loglevel"_a = CPS::Logger::Level::off)
121 py::class_<CPS::SP::Ph1::Load, std::shared_ptr<CPS::SP::Ph1::Load>,
123 py::multiple_inheritance())
124 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
125 "loglevel"_a = CPS::Logger::Level::off)
127 "active_power"_a,
"reactive_power"_a,
"nominal_voltage"_a)
128 .def(
"modify_power_flow_bus_type",
132 py::class_<CPS::SP::Ph1::Switch, std::shared_ptr<CPS::SP::Ph1::Switch>,
134 mSPPh1,
"Switch", py::multiple_inheritance())
135 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
136 "loglevel"_a = CPS::Logger::Level::off)
138 "open_resistance"_a,
"closed_resistance"_a,
146 std::shared_ptr<CPS::SP::Ph1::SynchronGenerator>,
148 py::multiple_inheritance())
149 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
150 "loglevel"_a = CPS::Logger::Level::off)
152 "rated_apparent_power"_a,
"rated_voltage"_a,
153 "set_point_active_power"_a,
"set_point_voltage"_a,
154 "powerflow_bus_type"_a,
"set_point_reactive_power"_a = 0,
155 "q_limit_max"_a = std::numeric_limits<double>::infinity(),
156 "q_limit_min"_a = -std::numeric_limits<double>::infinity())
160 .def(
"modify_power_flow_bus_type",
163 .def(
"get_apparent_power",
167 std::shared_ptr<CPS::SP::Ph1::varResSwitch>,
169 mSPPh1,
"varResSwitch", py::multiple_inheritance())
170 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
171 "loglevel"_a = CPS::Logger::Level::off)
173 "open_resistance"_a,
"closed_resistance"_a,
178 .def(
"set_init_parameters",
183 std::shared_ptr<CPS::SP::Ph1::SynchronGeneratorTrStab>,
185 py::multiple_inheritance())
186 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
187 "loglevel"_a = CPS::Logger::Level::off)
188 .def(
"set_standard_parameters_PU",
190 "nom_power"_a,
"nom_volt"_a,
"nom_freq"_a,
"Xpd"_a,
"inertia"_a,
191 "Rs"_a = 0,
"D"_a = 0)
192 .def(
"set_initial_values",
194 "elec_power"_a,
"mech_power"_a)
196 .def(
"set_model_flags",
198 "convert_with_omega_mech"_a)
200 "set_reference_omega",
203 std::string refDeltaName,
206 refOmegaComp->attributeTyped<
CPS::Real>(refOmegaName),
207 refDeltaComp->attributeTyped<
CPS::Real>(refDeltaName));
209 "ref_omega_name"_a =
"w_r",
"ref_omage_comp"_a,
210 "ref_delta_name"_a =
"delta_r",
"ref_delta_comp"_a);
213 std::shared_ptr<CPS::SP::Ph1::ReducedOrderSynchronGeneratorVBR>,
215 mSPPh1,
"ReducedOrderSynchronGeneratorVBR", py::multiple_inheritance());
218 std::shared_ptr<CPS::SP::Ph1::SynchronGenerator3OrderVBR>,
220 mSPPh1,
"SynchronGenerator3OrderVBR", py::multiple_inheritance())
221 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
222 "loglevel"_a = CPS::Logger::Level::off)
223 .def(
"set_operational_parameters_per_unit",
228 setOperationalParametersPerUnit),
229 "nom_power"_a,
"nom_voltage"_a,
"nom_frequency"_a,
"H"_a,
"Ld"_a,
230 "Lq"_a,
"L0"_a,
"Ld_t"_a,
"Td0_t"_a)
234 std::shared_ptr<CPS::SP::Ph1::SynchronGenerator4OrderVBR>,
236 mSPPh1,
"SynchronGenerator4OrderVBR", py::multiple_inheritance())
237 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
238 "loglevel"_a = CPS::Logger::Level::off)
239 .def(
"set_operational_parameters_per_unit",
244 setOperationalParametersPerUnit),
245 "nom_power"_a,
"nom_voltage"_a,
"nom_frequency"_a,
"H"_a,
"Ld"_a,
246 "Lq"_a,
"L0"_a,
"Ld_t"_a,
"Lq_t"_a,
"Td0_t"_a,
"Tq0_t"_a)
252 std::shared_ptr<CPS::SP::Ph1::SynchronGenerator5OrderVBR>,
254 mSPPh1,
"SynchronGenerator5OrderVBR", py::multiple_inheritance())
255 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
256 "loglevel"_a = CPS::Logger::Level::off)
257 .def(
"set_operational_parameters_per_unit",
263 setOperationalParametersPerUnit),
264 "nom_power"_a,
"nom_voltage"_a,
"nom_frequency"_a,
"H"_a,
"Ld"_a,
265 "Lq"_a,
"L0"_a,
"Ld_t"_a,
"Lq_t"_a,
"Td0_t"_a,
"Tq0_t"_a,
"Ld_s"_a,
266 "Lq_s"_a,
"Td0_s"_a,
"Tq0_s"_a,
"Taa"_a)
270 std::shared_ptr<CPS::SP::Ph1::SynchronGenerator6aOrderVBR>,
272 mSPPh1,
"SynchronGenerator6aOrderVBR", py::multiple_inheritance())
273 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
274 "loglevel"_a = CPS::Logger::Level::off)
275 .def(
"set_operational_parameters_per_unit",
281 setOperationalParametersPerUnit),
282 "nom_power"_a,
"nom_voltage"_a,
"nom_frequency"_a,
"H"_a,
"Ld"_a,
283 "Lq"_a,
"L0"_a,
"Ld_t"_a,
"Lq_t"_a,
"Td0_t"_a,
"Tq0_t"_a,
"Ld_s"_a,
284 "Lq_s"_a,
"Td0_s"_a,
"Tq0_s"_a,
"Taa"_a)
288 std::shared_ptr<CPS::SP::Ph1::SynchronGenerator6bOrderVBR>,
290 mSPPh1,
"SynchronGenerator6bOrderVBR", py::multiple_inheritance())
291 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
292 "loglevel"_a = CPS::Logger::Level::off)
293 .def(
"set_operational_parameters_per_unit",
299 setOperationalParametersPerUnit),
300 "nom_power"_a,
"nom_voltage"_a,
"nom_frequency"_a,
"H"_a,
"Ld"_a,
301 "Lq"_a,
"L0"_a,
"Ld_t"_a,
"Lq_t"_a,
"Td0_t"_a,
"Tq0_t"_a,
"Ld_s"_a,
302 "Lq_s"_a,
"Td0_s"_a,
"Tq0_s"_a,
"Taa"_a = 0)
306 std::shared_ptr<CPS::SP::Ph1::AvVoltageSourceInverterDQ>,
308 mSPPh1,
"AvVoltageSourceInverterDQ", py::multiple_inheritance())
309 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
310 "loglevel"_a = CPS::Logger::Level::off)
311 .def(py::init<std::string, std::string, CPS::Logger::Level, CPS::Bool>(),
312 "uid"_a,
"name"_a,
"loglevel"_a = CPS::Logger::Level::off,
314 "with_trafo"_a =
false)
315 .def(
"set_parameters",
317 "sys_omega"_a,
"sys_volt_nom"_a,
"p_ref"_a,
"q_ref"_a)
318 .def(
"set_filter_parameters",
320 "Lf"_a,
"Cf"_a,
"Rf"_a,
"Rc"_a)
321 .def(
"set_controller_parameters",
323 "Kp_pll"_a,
"Ki_pll"_a,
"Kp_power_ctrl"_a,
"Ki_power_ctrl"_a,
324 "Kp_curr_ctrl"_a,
"Ki_curr_ctrl"_a,
"omega_cutoff"_a)
325 .def(
"set_transformer_parameters",
327 "nom_voltage_primary"_a,
"nom_voltage_secondary"_a,
"rated_power"_a,
328 "ratio_abs"_a,
"ratio_phase"_a,
"resistance"_a,
"inductance"_a)
329 .def(
"set_initial_state_values",
331 "p_init"_a,
"q_init"_a,
"phi_d_init"_a,
"phi_q_init"_a,
332 "gamma_d_init"_a,
"gamma_q_init"_a)
338 std::shared_ptr<CPS::SP::Ph1::Transformer>,
340 py::multiple_inheritance())
341 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
342 "loglevel"_a = CPS::Logger::Level::off)
343 .def(py::init<std::string, std::string, CPS::Logger::Level, CPS::Bool>(),
344 "uid"_a,
"name"_a,
"loglevel"_a = CPS::Logger::Level::off,
346 "with_resistive_losses"_a =
false)
347 .def(
"set_parameters",
351 "nom_voltage_primary"_a,
"nom_voltage_secondary"_a,
"ratio_abs"_a,
352 "ratio_phase"_a,
"resistance"_a,
"inductance"_a)
353 .def(
"set_parameters",
357 "nom_voltage_primary"_a,
"nom_voltage_secondary"_a,
"rated_power"_a,
358 "ratio_abs"_a,
"ratio_phase"_a,
"resistance"_a,
"inductance"_a)
361 .def(
"set_reference_winding",
363 "reference_winding"_a)
368 .def(
"set_magnetizing_branch",
370 "no_load_current"_a,
"no_load_loss"_a)
376 std::shared_ptr<CPS::SP::Ph3::Transformer>,
378 py::multiple_inheritance())
379 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
380 "loglevel"_a = CPS::Logger::Level::off)
381 .def(py::init<std::string, std::string, CPS::Logger::Level, CPS::Bool>(),
382 "uid"_a,
"name"_a,
"loglevel"_a = CPS::Logger::Level::off,
384 "with_resistive_losses"_a =
false)
386 "nom_voltage_primary"_a,
"nom_voltage_secondary"_a,
"rated_power"_a,
387 "ratio_abs"_a,
"ratio_phase"_a,
"resistance"_a,
"inductance"_a)
388 .def(
"set_reference_winding",
390 "reference_winding"_a)
395 .def(
"set_magnetizing_branch",
397 "no_load_current"_a,
"no_load_loss"_a)
401 std::shared_ptr<CPS::SP::Ph3::VoltageSource>,
403 py::multiple_inheritance())
404 .def(py::init<std::string>())
405 .def(py::init<std::string, CPS::Logger::Level>())
414 py::class_<CPS::SP::Ph3::Resistor, std::shared_ptr<CPS::SP::Ph3::Resistor>,
416 py::multiple_inheritance())
417 .def(py::init<std::string>())
418 .def(py::init<std::string, CPS::Logger::Level>())
422 py::class_<CPS::SP::Ph3::Capacitor, std::shared_ptr<CPS::SP::Ph3::Capacitor>,
424 py::multiple_inheritance())
425 .def(py::init<std::string>())
426 .def(py::init<std::string, CPS::Logger::Level>())
430 py::class_<CPS::SP::Ph3::Inductor, std::shared_ptr<CPS::SP::Ph3::Inductor>,
432 py::multiple_inheritance())
433 .def(py::init<std::string>())
434 .def(py::init<std::string, CPS::Logger::Level>())