blob: 1dadccec2e5408514601a3393561e9e566133e80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef ELECTROMECHANICAL_H
#define ELECTROMECHANICAL_H
#include "ElectricCalculation.h"
class ControlElementSolver;
class Electromechanical : public ElectricCalculation
{
public:
Electromechanical(wxWindow* parent, std::vector<Element*> elementList);
~Electromechanical();
bool RunStabilityCalculation();
wxString GetErrorMessage() const { return m_errorMsg; }
protected:
void SetEventTimeList();
bool HasEvent(double currentTime);
void SetEvent(double currentTime);
inline bool EventTrigger(double eventTime, double currentTime);
void InsertSyncMachinesOnYBus();
std::complex<double> GetSyncMachineAdmittance(SyncGenerator* generator);
bool InitializeDynamicElements();
wxWindow* m_parent = NULL;
wxString m_errorMsg = _("Unknown error");
std::vector<std::vector<std::complex<double> > > m_yBus;
double m_powerSystemBase = 100e6;
double m_timeStep = 1e-3;
std::vector<double> m_eventTimeList;
std::vector<bool> m_eventOccurrenceList;
};
#endif // ELECTROMECHANICAL_H
|