47{
51 for(unsigned int i = 0; i < busList.size(); ++i) {
52 Bus* bus = busList[i];
53 auto data = bus->GetElectricalData();
54 if(data.stabHasFault) {
55 AddEvent(data.stabFaultTime, _("Fault"),
56 _("Fault insertion at \"") + data.name + _("\" (Zf = ") +
59 m_redColour);
60 AddEvent(data.stabFaultTime + data.stabFaultLength, _("Fault"),
61 _("Fault removal at \"") + data.name + _("\" (Zf = ") +
64 m_blueColour);
65 }
66 }
68 for(unsigned int i = 0; i < capacitorList.size(); ++i) {
70 SetPowerElementSwitchingEvent(capacitor, capacitor->GetElectricalData().name);
71 }
73 for(unsigned int i = 0; i < indMotorList.size(); ++i) {
74 IndMotor* indMotor = indMotorList[i];
75 SetPowerElementSwitchingEvent(indMotor, indMotor->GetElectricalData().name);
76 }
78 for(unsigned int i = 0; i < inductorList.size(); ++i) {
79 Inductor* inductor = inductorList[i];
80 SetPowerElementSwitchingEvent(inductor, inductor->GetElectricalData().name);
81 }
83 for(unsigned int i = 0; i < lineList.size(); ++i) {
84 Line* line = lineList[i];
85 SetPowerElementSwitchingEvent(line, line->GetElectricalData().name);
86 }
88 for(unsigned int i = 0; i < loadList.size(); ++i) {
89 Load* load = loadList[i];
90 SetPowerElementSwitchingEvent(load, load->GetElectricalData().name);
91 }
93 for(unsigned int i = 0; i < syncGeneratorList.size(); ++i) {
95 SetPowerElementSwitchingEvent(syncGenerator, syncGenerator->GetElectricalData().name);
96 }
98 for(unsigned int i = 0; i < syncMotorList.size(); ++i) {
100 SetPowerElementSwitchingEvent(syncMotor, syncMotor->GetElectricalData().name);
101 }
103 for(unsigned int i = 0; i < transformerList.size(); ++i) {
105 SetPowerElementSwitchingEvent(transformer, transformer->GetElectricalData().name);
106 }
107}
Node for power elements. All others power elements are connected through this.
Shunt capactior power element.
Base class for electrical calculations providing general utility methods.
const std::vector< IndMotor * > GetIndMotorList() const
Get the induction motors of the system (use GetElementsFromList first).
const std::vector< Load * > GetLoadList() const
Get the loads of the system (use GetElementsFromList first).
const std::vector< SyncMotor * > GetSyncMotorList() const
Get the synchronous motors of the system (use GetElementsFromList first).
const std::vector< SyncGenerator * > GetSyncGeneratorList() const
Get the synchronous generators of the system (use GetElementsFromList first).
const std::vector< Transformer * > GetTransformerList() const
Get the transformers of the system (use GetElementsFromList first).
const std::vector< Capacitor * > GetCapacitorList() const
Get the capacitors of the system (use GetElementsFromList first).
const std::vector< Inductor * > GetInductorList() const
Get the inductors of the system (use GetElementsFromList first).
const std::vector< Line * > GetLineList() const
Get the lines of the system (use GetElementsFromList first).
const std::vector< Bus * > GetBusList() const
Get the buses of the system (use GetElementsFromList first).
virtual void GetElementsFromList(std::vector< Element * > elementList)
Separate the power elements from a generic list.
Induction motor power element.
Inductor shunt power element.
Loas shunt power element.
Synchronous generator power element.
Synchronous motor (synchronous compensator) power element.