Skip to content

Commit

Permalink
remove ph1 from pybind, remove ph1 from cmakelists
Browse files Browse the repository at this point in the history
Signed-off-by: Marvin Tollnitsch <marvin.tollnitsch@rwth-aachen.de>
  • Loading branch information
MarvinTollnitschRWTH committed Aug 11, 2024
1 parent 0bc0c7b commit cd66ce9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
1 change: 0 additions & 1 deletion dpsim/examples/cxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ set(CIRCUIT_SOURCES
Circuits/EMT_PiLine.cpp
Circuits/EMT_Ph3_LinearSampleCircuit.cpp
Circuits/EMT_Ph3_LinearSampleCircuitSSN.cpp
Circuits/EMT_Ph1_Switch_R1.cpp

# EMT examples with PF initialization
Circuits/EMT_Slack_PiLine_PQLoad_with_PF_Init.cpp
Expand Down
20 changes: 6 additions & 14 deletions dpsim/src/pybind/EMTComponents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,13 @@ void addEMTPh1Components(py::module_ mEMTPh1) {
.def("connect", &CPS::EMT::Ph1::Inductor::connect)
.def_property("L", createAttributeGetter<CPS::Real>("L"),
createAttributeSetter<CPS::Real>("L"));
py::class_<CPS::EMT::Ph1::SSN::Full_Serial_RLC, std::shared_ptr<CPS::EMT::Ph1::SSN::Full_Serial_RLC>, CPS::SimPowerComp<CPS::Real>>(mEMTPh1, "Full_Serial_RLC", py::multiple_inheritance())
.def(py::init<std::string>())
.def(py::init<std::string, CPS::Logger::Level>())
.def("set_parameters", &CPS::EMT::Ph1::SSN::Full_Serial_RLC::setParameters, "R"_a, "L"_a, "C"_a)
.def("connect", &CPS::EMT::Ph1::SSN::Full_Serial_RLC::connect)
.def_property("R", createAttributeGetter<CPS::Real>("R"), createAttributeSetter<CPS::Real>("R"))
.def_property("L", createAttributeGetter<CPS::Real>("L"), createAttributeSetter<CPS::Real>("L"))
.def_property("C", createAttributeGetter<CPS::Real>("C"), createAttributeSetter<CPS::Real>("C"));

py::class_<CPS::EMT::Ph1::Switch, std::shared_ptr<CPS::EMT::Ph1::Switch>, CPS::SimPowerComp<CPS::Real>, CPS::Base::Ph1::Switch>(mEMTPh1, "Switch", py::multiple_inheritance())
.def(py::init<std::string, CPS::Logger::Level>(), "name"_a, "loglevel"_a = CPS::Logger::Level::off)
.def("set_parameters", &CPS::EMT::Ph1::Switch::setParameters, "open_resistance"_a, "closed_resistance"_a, "closed"_a = false) // cppcheck-suppress assignBoolToPointer
.def("open", &CPS::EMT::Ph1::Switch::open)
.def("close", &CPS::EMT::Ph1::Switch::close)
.def("connect", &CPS::EMT::Ph1::Switch::connect);
py::class_<CPS::EMT::Ph1::Switch, std::shared_ptr<CPS::EMT::Ph1::Switch>, CPS::SimPowerComp<CPS::Real>, CPS::Base::Ph1::Switch>(mEMTPh1, "Switch", py::multiple_inheritance())
.def(py::init<std::string, CPS::Logger::Level>(), "name"_a, "loglevel"_a = CPS::Logger::Level::off)
.def("set_parameters", &CPS::EMT::Ph1::Switch::setParameters, "open_resistance"_a, "closed_resistance"_a, "closed"_a = false) // cppcheck-suppress assignBoolToPointer
.def("open", &CPS::EMT::Ph1::Switch::open)
.def("close", &CPS::EMT::Ph1::Switch::close)
.def("connect", &CPS::EMT::Ph1::Switch::connect);
}

void addEMTPh3Components(py::module_ mEMTPh3) {
Expand Down

0 comments on commit cd66ce9

Please sign in to comment.