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)
250 std::shared_ptr<CPS::SP::Ph1::SynchronGenerator5OrderVBR>,
252 mSPPh1,
"SynchronGenerator5OrderVBR", py::multiple_inheritance())
253 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
254 "loglevel"_a = CPS::Logger::Level::off)
255 .def(
"set_operational_parameters_per_unit",
261 setOperationalParametersPerUnit),
262 "nom_power"_a,
"nom_voltage"_a,
"nom_frequency"_a,
"H"_a,
"Ld"_a,
263 "Lq"_a,
"L0"_a,
"Ld_t"_a,
"Lq_t"_a,
"Td0_t"_a,
"Tq0_t"_a,
"Ld_s"_a,
264 "Lq_s"_a,
"Td0_s"_a,
"Tq0_s"_a,
"Taa"_a)
268 std::shared_ptr<CPS::SP::Ph1::SynchronGenerator6aOrderVBR>,
270 mSPPh1,
"SynchronGenerator6aOrderVBR", py::multiple_inheritance())
271 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
272 "loglevel"_a = CPS::Logger::Level::off)
273 .def(
"set_operational_parameters_per_unit",
279 setOperationalParametersPerUnit),
280 "nom_power"_a,
"nom_voltage"_a,
"nom_frequency"_a,
"H"_a,
"Ld"_a,
281 "Lq"_a,
"L0"_a,
"Ld_t"_a,
"Lq_t"_a,
"Td0_t"_a,
"Tq0_t"_a,
"Ld_s"_a,
282 "Lq_s"_a,
"Td0_s"_a,
"Tq0_s"_a,
"Taa"_a)
286 std::shared_ptr<CPS::SP::Ph1::SynchronGenerator6bOrderVBR>,
288 mSPPh1,
"SynchronGenerator6bOrderVBR", py::multiple_inheritance())
289 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
290 "loglevel"_a = CPS::Logger::Level::off)
291 .def(
"set_operational_parameters_per_unit",
297 setOperationalParametersPerUnit),
298 "nom_power"_a,
"nom_voltage"_a,
"nom_frequency"_a,
"H"_a,
"Ld"_a,
299 "Lq"_a,
"L0"_a,
"Ld_t"_a,
"Lq_t"_a,
"Td0_t"_a,
"Tq0_t"_a,
"Ld_s"_a,
300 "Lq_s"_a,
"Td0_s"_a,
"Tq0_s"_a,
"Taa"_a = 0)
304 std::shared_ptr<CPS::SP::Ph1::AvVoltageSourceInverterDQ>,
306 mSPPh1,
"AvVoltageSourceInverterDQ", py::multiple_inheritance())
307 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
308 "loglevel"_a = CPS::Logger::Level::off)
309 .def(py::init<std::string, std::string, CPS::Logger::Level, CPS::Bool>(),
310 "uid"_a,
"name"_a,
"loglevel"_a = CPS::Logger::Level::off,
312 "with_trafo"_a =
false)
313 .def(
"set_parameters",
315 "sys_omega"_a,
"sys_volt_nom"_a,
"p_ref"_a,
"q_ref"_a)
316 .def(
"set_filter_parameters",
318 "Lf"_a,
"Cf"_a,
"Rf"_a,
"Rc"_a)
319 .def(
"set_controller_parameters",
321 "Kp_pll"_a,
"Ki_pll"_a,
"Kp_power_ctrl"_a,
"Ki_power_ctrl"_a,
322 "Kp_curr_ctrl"_a,
"Ki_curr_ctrl"_a,
"omega_cutoff"_a)
323 .def(
"set_transformer_parameters",
325 "nom_voltage_end_1"_a,
"nom_voltage_end_2"_a,
"rated_power"_a,
326 "ratio_abs"_a,
"ratio_phase"_a,
"resistance"_a,
"inductance"_a)
327 .def(
"set_initial_state_values",
329 "p_init"_a,
"q_init"_a,
"phi_d_init"_a,
"phi_q_init"_a,
330 "gamma_d_init"_a,
"gamma_q_init"_a)
336 std::shared_ptr<CPS::SP::Ph1::Transformer>,
338 py::multiple_inheritance())
339 .def(py::init<std::string, CPS::Logger::Level>(),
"name"_a,
340 "loglevel"_a = CPS::Logger::Level::off)
341 .def(py::init<std::string, std::string, CPS::Logger::Level, CPS::Bool>(),
342 "uid"_a,
"name"_a,
"loglevel"_a = CPS::Logger::Level::off,
344 "with_resistive_losses"_a =
false)
345 .def(
"set_parameters",
349 "nom_voltage_end_1"_a,
"nom_voltage_end_2"_a,
"ratio_abs"_a,
350 "ratio_phase"_a,
"resistance"_a,
"inductance"_a)
351 .def(
"set_parameters",
355 "nom_voltage_end_1"_a,
"nom_voltage_end_2"_a,
"rated_power"_a,
356 "ratio_abs"_a,
"ratio_phase"_a,
"resistance"_a,
"inductance"_a)