Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix update of `gradle` [#1529](https://github.com/ie3-institute/PowerSystemDataModel/issues/1529)
- Reintroduce `gradlew.bat` [#1531](https://github.com/ie3-institute/PowerSystemDataModel/issues/1531)
- Remove snapshot repository [#1538](https://github.com/ie3-institute/PowerSystemDataModel/issues/1538)
- Refactored the handling of power profiles [#1514](https://github.com/ie3-institute/PowerSystemDataModel/issues/1514)

## [8.1.0] - 2025-07-25

Expand Down
222 changes: 125 additions & 97 deletions docs/uml/main/TimeSeriesDatamodelConcept.puml
Original file line number Diff line number Diff line change
Expand Up @@ -22,90 +22,36 @@ package models {
childNote .. input
childNote .. voltagelevels

interface LoadProfile {
+ getKey: String
+ {static} parse(String): LoadProfile
+ {static} getAllProfiles: LoadProfile[]
+ {static} getProfile(T[], String): T
+ enum DefaultLoadProfiles
+ enum RandomLoadProfile
interface PowerProfileKey {
- value: String
- noKeyAssigned: boolean
}

DefaultLoadProfiles --|> LoadProfile
RandomLoadProfile --|> LoadProfile
interface PowerProfile {
+ getKey(): PowerProfileKey
}
PowerProfile *-- PowerProfileKey

interface StandardLoadProfile {
+ {static} parse(String): StandardLoadProfile
interface LoadProfile {
+ enum RandomLoadProfile
}
LoadProfile ..|> PowerProfile

interface StandardLoadProfile {}
StandardLoadProfile ..|> LoadProfile

interface TemperatureDependantLoadProfile {}
TemperatureDependantLoadProfile ..|> LoadProfile

enum BdewLoadProfile {
- key: String
+ {static} get(String): BdewLoadProfile
- key: PowerProfileKey
}
BdewLoadProfile ..|> StandardLoadProfile

package value {
interface Value

class EnergyPriceValue {
- price: ComparableQuantity<SpecificCurrency> [€/MWh]
}
EnergyPriceValue ..|> Value

class HeatDemandValue {
- heatDemand : ComparableQuantity<Power> [kW]
}
HeatDemandValue ..|> Value

class PValue {
- p: ComparableQuantity<Power> [kW]
}
PValue ..|> Value

class HeatAndPValue {
- heatDemand: ComparableQuantity<Power> [kW]
}
HeatAndPValue --|> PValue

class SValue {
- q: ComparableQuantity<Power> [kVAr]
}
SValue --|> PValue

class HeatAndSValue {
- heatDemand: ComparableQuantity<Power> [kW]
}
HeatAndSValue --|> SValue

class SolarIrradianceValue {
- directIrradiance: ComparableQuantity<Irradiance> [W/m²]
- diffuseIrradiance: ComparableQuantity<Irradiance> [W/m²]
}
SolarIrradianceValue ..|> Value

class TemperatureValue {
- temperature: ComparableQuantity<Temperature> [°C]
}
TemperatureValue ..|> Value

class WindValue {
- direction: ComparableQuantity<Angle> [°]
- velocity: ComparableQuantity<Speed> [m/s]
}
WindValue ..|> Value

class WeatherValue {
- coordinate: Point
- solarIrradiance: SolarIrradianceValue
- temperature: TemperatureValue
- wind: WindValue
}
WeatherValue ..|> Value
WeatherValue *-- SolarIrradianceValue
WeatherValue *-- TemperatureValue
WeatherValue *-- WindValue
enum NbwTemperatureDependantLoadProfile {
- key: PowerProfileKey
}
NbwTemperatureDependantLoadProfile ..|> TemperatureDependantLoadProfile

package timeseries {
abstract class TimeSeries<E extends Entry<V>, V extends Value> {
Expand All @@ -131,22 +77,21 @@ package models {
}
RepetitiveTimeSeries --|> TimeSeries

abstract class LoadProfileTimeSeries<E extends LoadProfileEntry> {
- loadProfile: StandardLoadProfile
- valueMapping: Map<Key, Map<Integer, E>>
+ getLoadProfile(): LoadProfile
# fromTime(ZonedDateTime): Key
abstract class LoadProfileTimeSeries<V extends LoadValues> {
- powerProfileKey: PowerProfileKey
- valueMapping: Map<Integer, V>
+ maxPower(): Optional<ComparableQuantity<Power>>
+ loadProfileScaling(): Optional<ComparableQuantity<Energy>>
+ supplyValue(ZonedDateTime): Supplier<Optional<PValue>>
}
LoadProfileTimeSeries --|> RepetitiveTimeSeries
LoadProfileTimeSeries *-- LoadProfile
LoadProfileTimeSeries *-- PowerProfileKey

class BDEWLoadProfileTimeSeries {}
BDEWLoadProfileTimeSeries --|> LoadProfileTimeSeries
BDEWLoadProfileTimeSeries *-- BdewLoadProfileEntry

class RandomLoadProfileTimeSeries {}
RandomLoadProfileTimeSeries --|> LoadProfileTimeSeries
RandomLoadProfileTimeSeries *-- RandomLoadProfileEntry

abstract class TimeSeriesEntry <V extends Value> {
# value: V
Expand All @@ -160,25 +105,108 @@ package models {
TimeBasedValue --|> TimeSeriesEntry
TimeBasedValue ..|> Comparable: <<bind>>:<TimeBasedValue>

class LoadProfileEntry {
- dayOfWeek: DayOfWeek
- quarterHourOfDay: int
+ getDayOfWeek(): DayOfWeek
+ getQuarterHourOfDay(): Integer
class LoadProfileEntry<L extends LoadValues> {
- quarterHour: int
}
LoadProfileEntry --|> TimeSeriesEntry: <<bind>>:PValue

class BdewLoadProfileEntry {
- season: Season
+ getSeason(): Season
}
BdewLoadProfileEntry --|> LoadProfileEntry

class RandomLoadProfileEntry {
- gev: GeneralizedExtremeValueDistribution
}
RandomLoadProfileEntry --|> LoadProfileEntry
}

package value {
interface Value

class EnergyPriceValue {
- price: ComparableQuantity<SpecificCurrency> [€/MWh]
}
EnergyPriceValue ..|> Value

class HeatDemandValue {
- heatDemand : ComparableQuantity<Power> [kW]
}
HeatDemandValue ..|> Value

class PValue {
- p: ComparableQuantity<Power> [kW]
}
PValue ..|> Value

class HeatAndPValue {
- heatDemand: ComparableQuantity<Power> [kW]
}
HeatAndPValue --|> PValue

class SValue {
- q: ComparableQuantity<Power> [kVAr]
}
SValue --|> PValue

class HeatAndSValue {
- heatDemand: ComparableQuantity<Power> [kW]
}
HeatAndSValue --|> SValue

class SolarIrradianceValue {
- directIrradiance: ComparableQuantity<Irradiance> [W/m²]
- diffuseIrradiance: ComparableQuantity<Irradiance> [W/m²]
}
SolarIrradianceValue ..|> Value

class TemperatureValue {
- temperature: ComparableQuantity<Temperature> [°C]
}
TemperatureValue ..|> Value

class WindValue {
- direction: ComparableQuantity<Angle> [°]
- velocity: ComparableQuantity<Speed> [m/s]
}
WindValue ..|> Value

class WeatherValue {
- coordinate: Point
- solarIrradiance: SolarIrradianceValue
- temperature: TemperatureValue
- wind: WindValue
}
WeatherValue ..|> Value
WeatherValue *-- SolarIrradianceValue
WeatherValue *-- TemperatureValue
WeatherValue *-- WindValue

interface LoadValues {
+ getValue(ZonedDateTime, PowerProfileKey): PValue
+ getScheme(): Optional<Scheme>

+ interface Scheme {}
}
LoadValues ..|> Value

class BdewLoadValues {
- scheme: BdewScheme
- values: Map<BdewKey, Double>
+ getPower(ZonedDateTime): double
+ get(BdewKey): double
+ getMaxValue(boolean): double
+ {static} dynamization(double, int): double
+ interface BdewKey
+ enum BdewSeason
+ enum BdewScheme
+ class BdewMap
}
BdewLoadValues --|> LoadValues

class RandomLoadValues {
- kSa: double
- kSu: double
- kWd: double
- mySa: double
- mySu: double
- myWd: double
- sigmaSa: double
- sigmaSu: double
- sigmaWd: double
}
RandomLoadValues --|> LoadValues
}
}

@enduml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,21 @@
*/
package edu.ie3.datamodel.io.factory.input.participant;

import edu.ie3.datamodel.exceptions.ParsingException;
import edu.ie3.datamodel.models.OperationTime;
import edu.ie3.datamodel.models.StandardUnits;
import edu.ie3.datamodel.models.input.EmInput;
import edu.ie3.datamodel.models.input.NodeInput;
import edu.ie3.datamodel.models.input.OperatorInput;
import edu.ie3.datamodel.models.input.system.LoadInput;
import edu.ie3.datamodel.models.input.system.characteristic.ReactivePowerCharacteristic;
import edu.ie3.datamodel.models.profile.LoadProfile;
import edu.ie3.datamodel.models.profile.PowerProfileKey;
import java.util.UUID;
import javax.measure.quantity.Energy;
import javax.measure.quantity.Power;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import tech.units.indriya.ComparableQuantity;

public class LoadInputFactory
extends SystemParticipantInputEntityFactory<LoadInput, SystemParticipantEntityData> {
private static final Logger logger = LoggerFactory.getLogger(LoadInputFactory.class);

private static final String LOAD_PROFILE = "loadProfile";
private static final String E_CONS_ANNUAL = "eConsAnnual";
private static final String S_RATED = "sRated";
Expand All @@ -48,16 +43,8 @@ protected LoadInput buildModel(
ReactivePowerCharacteristic qCharacteristics,
OperatorInput operator,
OperationTime operationTime) {
LoadProfile loadProfile;
try {
loadProfile = LoadProfile.parse(data.getField(LOAD_PROFILE));
} catch (ParsingException e) {
logger.warn(
"Cannot parse the standard load profile \"{}\" of load \"{}\". Assign no load profile instead.",
data.getField(LOAD_PROFILE),
id);
loadProfile = LoadProfile.DefaultLoadProfiles.NO_LOAD_PROFILE;
}
PowerProfileKey loadProfile = new PowerProfileKey(data.getField(LOAD_PROFILE));

final EmInput em = data.getControllingEm().orElse(null);

final ComparableQuantity<Energy> eConsAnnual =
Expand Down
Loading