30{
34 for(unsigned int i = 0; i < busList.size(); ++i) {
35 Bus* bus = busList[i];
36 auto data = bus->GetElectricalData();
37 if(data.stabHasFault) {
38 AddEvent(data.stabFaultTime, _("Fault"),
39 _("Fault insertion at \"") + data.name + _("\" (Zf = ") +
42 m_redColour);
43 AddEvent(data.stabFaultTime + data.stabFaultLength, _("Fault"),
44 _("Fault removal at \"") + data.name + _("\" (Zf = ") +
47 m_blueColour);
48 }
49 }
51 for(unsigned int i = 0; i < capacitorList.size(); ++i) {
53 SetPowerElementSwitchingEvent(capacitor, capacitor->GetElectricalData().name);
54 }
56 for(unsigned int i = 0; i < indMotorList.size(); ++i) {
57 IndMotor* indMotor = indMotorList[i];
58 SetPowerElementSwitchingEvent(indMotor, indMotor->GetElectricalData().name);
59 }
61 for(unsigned int i = 0; i < inductorList.size(); ++i) {
62 Inductor* inductor = inductorList[i];
63 SetPowerElementSwitchingEvent(inductor, inductor->GetElectricalData().name);
64 }
66 for(unsigned int i = 0; i < lineList.size(); ++i) {
67 Line* line = lineList[i];
68 SetPowerElementSwitchingEvent(line, line->GetElectricalData().name);
69 }
71 for(unsigned int i = 0; i < loadList.size(); ++i) {
72 Load* load = loadList[i];
73 SetPowerElementSwitchingEvent(load, load->GetElectricalData().name);
74 }
76 for(unsigned int i = 0; i < syncGeneratorList.size(); ++i) {
78 SetPowerElementSwitchingEvent(syncGenerator, syncGenerator->GetElectricalData().name);
79 }
81 for(unsigned int i = 0; i < syncMotorList.size(); ++i) {
83 SetPowerElementSwitchingEvent(syncMotor, syncMotor->GetElectricalData().name);
84 }
86 for(unsigned int i = 0; i < transformerList.size(); ++i) {
88 SetPowerElementSwitchingEvent(transformer, transformer->GetElectricalData().name);
89 }
90}
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.