blob: d63a90665259307b686ba5fee4a82bc3dc877b07 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
/*
* Copyright (C) 2017 Thales Lima Oliveira <thales@ufu.br>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef PROPERTIESDATA_H
#define PROPERTIESDATA_H
#include "wx/language.h"
#include "Element.h"
#include "PowerElement.h"
enum PowerFlowMethod { GAUSS_SEIDEL = 0, NEWTON_RAPHSON };
enum GUITheme { THEME_LIGHT = 0, THEME_DARK };
struct SimulationData {
// General simulation data
double basePower = 100.0;
ElectricalUnit basePowerUnit = UNIT_MVA;
bool faultAfterPowerFlow = true;
bool scPowerAfterPowerFlow = true;
// Power flow
PowerFlowMethod powerFlowMethod = GAUSS_SEIDEL;
double accFator = 1.0;
double powerFlowTolerance = 1e-7;
int powerFlowMaxIterations = 5000;
// Stability
double stabilityFrequency = 60.0;
double timeStep = 1e-2;
double stabilitySimulationTime = 10.0;
double stabilityTolerance = 1e-8;
int stabilityMaxIterations = 100;
int controlTimeStepRatio = 10;
double plotTime = 1e-2;
bool useCOI = true;
};
struct GeneralData {
wxLanguage language = wxLANGUAGE_ENGLISH;
GUITheme theme = THEME_LIGHT;
};
class PropertiesData
{
public:
PropertiesData();
~PropertiesData();
SimulationData GetSimulationPropertiesData() const { return m_simulData; }
void SetSimulationPropertiesData(SimulationData simulationData) { m_simulData = simulationData; }
GeneralData GetGeneralPropertiesData() const { return m_genData; }
void SetGeneralPropertiesData(GeneralData generalData) { m_genData = generalData; }
protected:
SimulationData m_simulData;
GeneralData m_genData;
};
#endif // PROPERTIESDATA_H
|