13 #include <dpsim-models/DP/DP_Ph1_CurrentSource.h>
14 #include <dpsim-models/DP/DP_Ph1_Resistor.h>
15 #include <dpsim-models/SimPowerComp.h>
16 #include <dpsim-models/SimSignalComp.h>
17 #include <dpsim-models/Task.h>
26 Real mInductance, mCapacitance;
29 std::shared_ptr<DP::SimNode> mNode1, mNode2;
30 std::shared_ptr<DP::Ph1::Resistor> mRes1, mRes2;
31 std::shared_ptr<DP::Ph1::CurrentSource> mSrc1, mSrc2;
36 std::vector<Complex> mVolt1, mVolt2, mCur1, mCur2;
41 Complex interpolate(std::vector<Complex> &data);
44 typedef std::shared_ptr<DecouplingLine> Ptr;
55 Logger::Level logLevel = Logger::Level::info);
57 DecouplingLine(String name, Logger::Level logLevel = Logger::Level::info);
60 Real resistance, Real inductance, Real capacitance);
61 void initialize(Real omega, Real timeStep);
62 void step(Real time, Int timeStepCount);
64 Task::List getTasks();
65 IdentifiedObject::List getLineComponents();
70 :
Task(**line.
mName +
".MnaPreStep"), mLine(line) {
71 mPrevStepDependencies.push_back(mLine.
mStates);
72 mModifiedAttributes.push_back(mLine.mSrc1->mCurrentRef);
73 mModifiedAttributes.push_back(mLine.mSrc2->mCurrentRef);
76 void execute(Real time, Int timeStepCount);
85 :
Task(**line.
mName +
".PostStep"), mLine(line) {
86 mAttributeDependencies.push_back(mLine.mRes1->mIntfVoltage);
87 mAttributeDependencies.push_back(mLine.mRes1->mIntfCurrent);
88 mAttributeDependencies.push_back(mLine.mRes2->mIntfVoltage);
89 mAttributeDependencies.push_back(mLine.mRes2->mIntfCurrent);
90 mModifiedAttributes.push_back(mLine.
mStates);
93 void execute(Real time, Int timeStepCount);
const Attribute< String >::Ptr mName
Human readable name.
const Attribute< Matrix >::Ptr mStates
FIXME: workaround for dependency analysis as long as the states aren't attributes.
Tasks to be defined by every component.