Skip to content

Commit 2004653

Browse files
committed
Addressing reviewer's comments.
1 parent 6324db8 commit 2004653

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

src/main/java/edu/ie3/datamodel/models/timeseries/repetitive/LoadProfileTimeSeries.java

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@
99
import edu.ie3.datamodel.models.value.PValue;
1010
import edu.ie3.datamodel.models.value.load.LoadValues;
1111
import edu.ie3.datamodel.utils.TimeSeriesUtils;
12-
import edu.ie3.util.quantities.PowerSystemUnits;
1312
import java.time.ZonedDateTime;
1413
import java.util.*;
1514
import java.util.stream.Collectors;
1615
import javax.measure.quantity.Energy;
1716
import javax.measure.quantity.Power;
1817
import 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}. */

src/main/java/edu/ie3/datamodel/models/value/load/RandomLoadValues.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* © 2024. TU Dortmund University,
2+
* © 2021. TU Dortmund University,
33
* Institute of Energy Systems, Energy Efficiency and Energy Economics,
44
* Research group Distribution grid planning and operation
55
*/

0 commit comments

Comments
 (0)