99import edu .ie3 .datamodel .models .value .PValue ;
1010import edu .ie3 .datamodel .models .value .load .LoadValues ;
1111import edu .ie3 .datamodel .utils .TimeSeriesUtils ;
12- import edu .ie3 .util .quantities .PowerSystemUnits ;
1312import java .time .ZonedDateTime ;
1413import java .util .*;
1514import java .util .stream .Collectors ;
1615import javax .measure .quantity .Energy ;
1716import javax .measure .quantity .Power ;
1817import tech .units .indriya .ComparableQuantity ;
19- import tech .units .indriya .quantity .Quantities ;
2018
2119/**
2220 * Describes a load profile time series with repetitive values that can be calculated from a pattern
@@ -30,10 +28,10 @@ public class LoadProfileTimeSeries<V extends LoadValues>
3028 * The maximum average power consumption per quarter-hour calculated over all seasons and weekday
3129 * types of given load profile.
3230 */
33- public final ComparableQuantity <Power > maxPower ;
31+ private final ComparableQuantity <Power > maxPower ;
3432
3533 /** The profile energy scaling in kWh. */
36- public final ComparableQuantity <Energy > profileEnergyScaling ;
34+ private final ComparableQuantity <Energy > profileEnergyScaling ;
3735
3836 public LoadProfileTimeSeries (
3937 UUID uuid ,
@@ -48,13 +46,21 @@ public LoadProfileTimeSeries(
4846 .collect (
4947 Collectors .toMap (LoadProfileEntry ::getQuarterHour , LoadProfileEntry ::getValue ));
5048
51- // use default value is null value is given
52- this .maxPower =
53- Optional .ofNullable (maxPower )
54- .orElseGet (() -> Quantities .getQuantity (0d , PowerSystemUnits .KILOWATT ));
55- this .profileEnergyScaling =
56- Optional .ofNullable (profileEnergyScaling )
57- .orElseGet (() -> Quantities .getQuantity (1000d , PowerSystemUnits .KILOWATTHOUR ));
49+ this .maxPower = maxPower ;
50+ this .profileEnergyScaling = profileEnergyScaling ;
51+ }
52+
53+ /**
54+ * Returns the maximum average power consumption per quarter-hour calculated over all seasons and
55+ * weekday types of given load profile in Watt.
56+ */
57+ public Optional <ComparableQuantity <Power >> maxPower () {
58+ return Optional .ofNullable (maxPower );
59+ }
60+
61+ /** Returns the profile energy scaling in kWh. */
62+ public Optional <ComparableQuantity <Energy >> loadProfileScaling () {
63+ return Optional .ofNullable (profileEnergyScaling );
5864 }
5965
6066 /** Returns the {@link LoadProfile}. */
0 commit comments