-
Notifications
You must be signed in to change notification settings - Fork 5
/
FlexOptionsResult.java
130 lines (115 loc) · 3.96 KB
/
FlexOptionsResult.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
/*
* © 2022. TU Dortmund University,
* Institute of Energy Systems, Energy Efficiency and Energy Economics,
* Research group Distribution grid planning and operation
*/
package edu.ie3.datamodel.models.result.system;
import edu.ie3.datamodel.models.result.ResultEntity;
import java.time.ZonedDateTime;
import java.util.Objects;
import java.util.UUID;
import javax.measure.quantity.Power;
import tech.units.indriya.ComparableQuantity;
/** Represents results of flexibility request */
public class FlexOptionsResult extends ResultEntity {
/**
* Active power (might be negative, thus feed-in) that was suggested for regular usage by the
* system participant connected to the EmAgent
*/
private final ComparableQuantity<Power> pRef;
/**
* Minimal active power to which the system participant can be reduced (might be negative, thus
* feed-in) that was determined by the system. Therefore equates to lower bound of possible
* flexibility provision. participant connected to the EmAgent
*/
private final ComparableQuantity<Power> pMin;
/**
* Maximum active power to which the system participant can be increased (might be negative, thus
* feed-in) that was determined by the system. Therefore equates to upper bound of possible
* flexibility provision. participant connected to the EmAgent
*/
private final ComparableQuantity<Power> pMax;
/**
* Standard constructor with automatic uuid generation.
*
* @param time date and time when the result is produced
* @param inputModel uuid of the input model that produces the result
* @param pRef active power that was suggested for regular usage by the system participant
* @param pMin active minimal power that was determined by the system participant
* @param pMax active maximum power that was determined by the system participant
*/
public FlexOptionsResult(
ZonedDateTime time,
UUID inputModel,
ComparableQuantity<Power> pRef,
ComparableQuantity<Power> pMin,
ComparableQuantity<Power> pMax) {
super(time, inputModel);
this.pRef = pRef;
this.pMin = pMin;
this.pMax = pMax;
}
/**
* Standard constructor without uuid generation.
*
* @param uuid uuid of this result entity, for automatic uuid generation use primary constructor
* above
* @param time date and time when the result is produced
* @param inputModel uuid of the input model that produces the result
* @param pRef active power that was suggested for regular usage by the system participant
* @param pMin active minimal power that was determined by the system participant
* @param pMax active maximum power that was determined by the system participant
*/
public FlexOptionsResult(
UUID uuid,
ZonedDateTime time,
UUID inputModel,
ComparableQuantity<Power> pRef,
ComparableQuantity<Power> pMin,
ComparableQuantity<Power> pMax) {
super(uuid, time, inputModel);
this.pRef = pRef;
this.pMin = pMin;
this.pMax = pMax;
}
public ComparableQuantity<Power> getpRef() {
return pRef;
}
public ComparableQuantity<Power> getpMin() {
return pMin;
}
public ComparableQuantity<Power> getpMax() {
return pMax;
}
@Override
public String toString() {
return "EmResult{"
+ "uuid="
+ getUuid()
+ ", time="
+ getTime()
+ ", inputModel="
+ getInputModel()
+ ", pRef="
+ getpRef()
+ ", pMin="
+ getpMin()
+ ", pMax="
+ getpMax()
+ '}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
FlexOptionsResult that = (FlexOptionsResult) o;
if (!pRef.equals(that.pRef)) return false;
if (!pMin.equals(that.pMin)) return false;
return pMax.equals(that.pMax);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), pRef, pMin, pMax);
}
}