16template <
typename VarType>
18 public std::enable_shared_from_this<SimNode<VarType>>,
32 typedef std::shared_ptr<SimNode<VarType>>
Ptr;
33 typedef std::vector<Ptr>
List;
102 :
Task(**node.
mName +
".MnaPostStepHarm"), mNode(node),
103 mLeftVectors(leftVectors) {
104 for (
UInt i = 0; i < mLeftVectors.size(); i++)
112 std::vector<Attribute<Matrix>::Ptr> mLeftVectors;
126template <
typename VarType>
AttributePointer< Attribute< T > > Ptr
String uid()
Returns unique id.
MnaPostStepHarm(SimNode &node, const std::vector< Attribute< Matrix >::Ptr > &leftVectors)
void execute(Real time, Int timeStepCount)
SimNode(String uid, String name, std::vector< UInt > matrixNodeIndex, PhaseType phaseType, const std::vector< Complex > &initialVoltage)
This very general constructor is used by other constructors.
std::shared_ptr< SimNode< VarType > > Ptr
void mnaUpdateVoltage(const Matrix &leftVector)
void setVoltage(VarType newVoltage)
void initialize()
Initialize mVoltage according to mInitialVoltage.
void setPower(VarType newPower)
void initialize(Matrix frequencies)
Initialize state matrices with size according to phase type and frequency number.
std::shared_ptr< TopologicalNode > clone(String name)
const Task::List & mnaTasks()
Return list of MNA tasks.
SimNode(String uid, String name, UInt matrixNodeIndex, PhaseType phaseType=PhaseType::Single, const std::vector< Complex > &initialVoltage={0, 0, 0})
UInt matrixNodeIndex(PhaseType phaseType=PhaseType::Single) override
MatrixVar< VarType > voltage()
void setMatrixNodeIndex(UInt phase, UInt matrixNodeIndex) override
const Attribute< MatrixVar< Complex > >::Ptr mVoltage
VarType singleVoltage(PhaseType phaseType=PhaseType::Single)
std::vector< UInt > matrixNodeIndices() override
Returns all matrix indices.
SimNode(String name, PhaseType phaseType=PhaseType::Single, const std::vector< Complex > &initialVoltage={0, 0, 0})
SimNode(PhaseType phaseType=PhaseType::Single)
Create ground node if no parameters are given.
void mnaUpdateVoltageHarm(const Matrix &leftVector, Int freqIdx)
void mnaInitializeHarm(std::vector< Attribute< Matrix >::Ptr > leftVector)
SimNode(UInt matrixNodeIndex, PhaseType phaseType=PhaseType::Single)
const Attribute< MatrixVar< Complex > >::Ptr mApparentPower
std::vector< UInt > mMatrixNodeIndex
std::vector< AttributeBase::Ptr > mModifiedAttributes
std::vector< AttributeBase::Ptr > mAttributeDependencies
PhaseType phaseType() const
MatrixComp initialVoltage() const
static std::shared_ptr< SimNode< VarType > > make(Args &&...args)
CPS::SimNode< Complex > SimNode
CPS::SimNode< Real > SimNode
CPS::SimNode< Complex > SimNode
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
Eigen::Matrix< VarType, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > MatrixVar
std::complex< Real > Complex