File tree 2 files changed +14
-0
lines changed
iidm-network-api/src/main/java/eu/itesla_project/iidm/network
iidm-network-impl/src/main/java/eu/itesla_project/iidm/network/impl
2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -82,4 +82,12 @@ interface TemporaryLimit {
82
82
* @return the temporary limit
83
83
*/
84
84
TemporaryLimit getTemporaryLimit (int acceptableDuration );
85
+
86
+ /**
87
+ * Get a temporary limit value from its acceptable duration. Return NaN if there is non temporay limit with this
88
+ * acceptable duration.
89
+ * @param acceptableDuration acceptable duration in second
90
+ * @return the temporary limit value or NaN if there is no temporary limit for this acceptable duration
91
+ */
92
+ float getTemporaryLimitValue (int acceptableDuration );
85
93
}
Original file line number Diff line number Diff line change @@ -78,4 +78,10 @@ public Collection<TemporaryLimit> getTemporaryLimits() {
78
78
public TemporaryLimit getTemporaryLimit (int acceptableDuration ) {
79
79
return temporaryLimits .get (acceptableDuration );
80
80
}
81
+
82
+ @ Override
83
+ public float getTemporaryLimitValue (int acceptableDuration ) {
84
+ TemporaryLimit tl = getTemporaryLimit (acceptableDuration );
85
+ return tl != null ? tl .getValue () : Float .NaN ;
86
+ }
81
87
}
You can’t perform that action at this time.
0 commit comments