-
Notifications
You must be signed in to change notification settings - Fork 5
/
VoltageLevel.java
63 lines (55 loc) · 1.73 KB
/
VoltageLevel.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
/*
* © 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.voltagelevels;
import java.io.Serializable;
import javax.measure.quantity.ElectricPotential;
import tech.units.indriya.ComparableQuantity;
/**
* Definition of a concrete voltage level. Here, only voltage levels with one rated voltage are
* covered. Don't mix it up with "Netzebenen" in D-A-CH area, which also cover the transformation
* levels.
*/
public class VoltageLevel implements Serializable {
protected final String id;
protected final ComparableQuantity<ElectricPotential> nominalVoltage;
/**
* Constructs a concrete voltage level
*
* @param id Identifier
* @param nominalVoltage nominal voltage of the voltage level
*/
public VoltageLevel(String id, ComparableQuantity<ElectricPotential> nominalVoltage) {
this.id = id;
this.nominalVoltage = nominalVoltage;
}
/**
* Get the identifier of the voltage level
*
* @return The identifier
*/
public String getId() {
return id;
}
/**
* Get the nominal voltage of the voltage level
*
* @return The nominal voltage of the voltage level
*/
public ComparableQuantity<ElectricPotential> getNominalVoltage() {
return nominalVoltage;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
VoltageLevel that = (VoltageLevel) o;
return this.nominalVoltage.isEquivalentTo(that.nominalVoltage);
}
@Override
public String toString() {
return "VoltageLevel{" + "id='" + id + '\'' + ", nominalVoltage=" + nominalVoltage + '}';
}
}