-
Notifications
You must be signed in to change notification settings - Fork 5
/
Transformer2WTypeInput.java
219 lines (200 loc) · 6.31 KB
/
Transformer2WTypeInput.java
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
/*
* © 2021. TU Dortmund University,
* Institute of Energy Systems, Energy Efficiency and Energy Economics,
* Research group Distribution grid planning and operation
*/
package edu.ie3.datamodel.models.input.connector.type;
import edu.ie3.datamodel.models.StandardUnits;
import edu.ie3.datamodel.models.input.AssetTypeInput;
import java.util.Objects;
import java.util.UUID;
import javax.measure.quantity.*;
import tech.units.indriya.ComparableQuantity;
/** Describes the type of a {@link edu.ie3.datamodel.models.input.connector.Transformer2WInput} */
public class Transformer2WTypeInput extends AssetTypeInput {
/** Short circuit resistance (typically in Ohm) */
private final ComparableQuantity<ElectricResistance> rSc;
/** Short circuit reactance (typically in Ohm) */
private final ComparableQuantity<ElectricResistance> xSc;
/** Rated apparent power (typically in kVA) */
private final ComparableQuantity<Power> sRated;
/** Rated voltage of the high voltage winding (typically in kV) */
private final ComparableQuantity<ElectricPotential> vRatedA;
/** Rated voltage of the low voltage winding (typically in kV) */
private final ComparableQuantity<ElectricPotential> vRatedB;
/** Phase-to-ground conductance (typically in nS) */
private final ComparableQuantity<ElectricConductance> gM;
/** Phase-to-ground susceptance (typically in nS) */
private final ComparableQuantity<ElectricConductance> bM;
/** Voltage magnitude deviation per tap position (typically in %) */
private final ComparableQuantity<Dimensionless> dV;
/** Voltage angle deviation per tap position (typically in °) */
private final ComparableQuantity<Angle> dPhi;
/** Selection of winding, where the tap changer is installed. Low voltage, if true */
private final boolean tapSide;
/** Neutral tap position */
private final int tapNeutr;
/** Minimum available tap position */
private final int tapMin;
/** Maximum available tap position */
private final int tapMax;
/**
* @param uuid of the input entity
* @param id of the type
* @param rSc Short circuit resistance
* @param xSc Short circuit reactance
* @param sRated Rated apparent power (typically in kVA)
* @param vRatedA Rated voltage of the high voltage winding
* @param vRatedB Rated voltage of the low voltage winding
* @param gM Phase-to-ground conductance
* @param bM Phase-to-ground susceptance
* @param dV Voltage magnitude deviation per tap position
* @param dPhi Voltage angle deviation per tap position
* @param tapSide Selection of winding, where the tap changer is installed. Low voltage, if true
* @param tapNeutr Neutral tap position
* @param tapMin Minimum available tap position
* @param tapMax Maximum available tap position
*/
public Transformer2WTypeInput(
UUID uuid,
String id,
ComparableQuantity<ElectricResistance> rSc,
ComparableQuantity<ElectricResistance> xSc,
ComparableQuantity<Power> sRated,
ComparableQuantity<ElectricPotential> vRatedA,
ComparableQuantity<ElectricPotential> vRatedB,
ComparableQuantity<ElectricConductance> gM,
ComparableQuantity<ElectricConductance> bM,
ComparableQuantity<Dimensionless> dV,
ComparableQuantity<Angle> dPhi,
boolean tapSide,
int tapNeutr,
int tapMin,
int tapMax) {
super(uuid, id);
this.rSc = rSc.to(StandardUnits.RESISTANCE);
this.xSc = xSc.to(StandardUnits.REACTANCE);
this.sRated = sRated.to(StandardUnits.S_RATED);
this.vRatedA = vRatedA.to(StandardUnits.RATED_VOLTAGE_MAGNITUDE);
this.vRatedB = vRatedB.to(StandardUnits.RATED_VOLTAGE_MAGNITUDE);
this.gM = gM.to(StandardUnits.CONDUCTANCE);
this.bM = bM.to(StandardUnits.SUSCEPTANCE);
this.dV = dV.to(StandardUnits.DV_TAP);
this.dPhi = dPhi.to(StandardUnits.DPHI_TAP);
this.tapSide = tapSide;
this.tapNeutr = tapNeutr;
this.tapMin = tapMin;
this.tapMax = tapMax;
}
public ComparableQuantity<ElectricResistance> getrSc() {
return rSc;
}
public ComparableQuantity<ElectricResistance> getxSc() {
return xSc;
}
public ComparableQuantity<Power> getsRated() {
return sRated;
}
public ComparableQuantity<ElectricPotential> getvRatedA() {
return vRatedA;
}
public ComparableQuantity<ElectricPotential> getvRatedB() {
return vRatedB;
}
public ComparableQuantity<ElectricConductance> getgM() {
return gM;
}
public ComparableQuantity<ElectricConductance> getbM() {
return bM;
}
public ComparableQuantity<Dimensionless> getdV() {
return dV;
}
public ComparableQuantity<Angle> getdPhi() {
return dPhi;
}
public boolean isTapSide() {
return tapSide;
}
public int getTapNeutr() {
return tapNeutr;
}
public int getTapMin() {
return tapMin;
}
public int getTapMax() {
return tapMax;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Transformer2WTypeInput that)) return false;
if (!super.equals(o)) return false;
return tapSide == that.tapSide
&& tapNeutr == that.tapNeutr
&& tapMin == that.tapMin
&& tapMax == that.tapMax
&& rSc.equals(that.rSc)
&& xSc.equals(that.xSc)
&& sRated.equals(that.sRated)
&& vRatedA.equals(that.vRatedA)
&& vRatedB.equals(that.vRatedB)
&& gM.equals(that.gM)
&& bM.equals(that.bM)
&& dV.equals(that.dV)
&& dPhi.equals(that.dPhi);
}
@Override
public int hashCode() {
return Objects.hash(
super.hashCode(),
rSc,
xSc,
sRated,
vRatedA,
vRatedB,
gM,
bM,
dV,
dPhi,
tapSide,
tapNeutr,
tapMin,
tapMax);
}
@Override
public String toString() {
return "Transformer2WTypeInput{"
+ "uuid="
+ getUuid()
+ ", id="
+ getId()
+ ", rSc="
+ rSc
+ ", xSc="
+ xSc
+ ", sRated="
+ sRated
+ ", vRatedA="
+ vRatedA
+ ", vRatedB="
+ vRatedB
+ ", gM="
+ gM
+ ", bM="
+ bM
+ ", dV="
+ dV
+ ", dPhi="
+ dPhi
+ ", tapSide="
+ tapSide
+ ", tapNeutr="
+ tapNeutr
+ ", tapMin="
+ tapMin
+ ", tapMax="
+ tapMax
+ '}';
}
}