-
Notifications
You must be signed in to change notification settings - Fork 5
Replaced LoadProfileInput
with LoadProfileTimeSeries
#1229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8ec5faa
4c7374d
a6301d5
0d730e2
8ad0a66
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* © 2024. TU Dortmund University, | ||
* Institute of Energy Systems, Energy Efficiency and Energy Economics, | ||
* Research group Distribution grid planning and operation | ||
*/ | ||
package edu.ie3.datamodel.io.factory.timeseries; | ||
|
||
import edu.ie3.datamodel.io.factory.FactoryData; | ||
import edu.ie3.datamodel.models.value.load.LoadValues; | ||
import java.util.Map; | ||
|
||
/** | ||
* Data, that is used to build a {@link | ||
* edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileEntry} within a factory | ||
* | ||
* @param <V> Type of load values class | ||
*/ | ||
public class LoadProfileData<V extends LoadValues> extends FactoryData { | ||
public LoadProfileData(Map<String, String> fieldsToAttributes, Class<V> targetClass) { | ||
super(fieldsToAttributes, targetClass); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* © 2024. TU Dortmund University, | ||
* Institute of Energy Systems, Energy Efficiency and Energy Economics, | ||
* Research group Distribution grid planning and operation | ||
*/ | ||
package edu.ie3.datamodel.io.factory.timeseries; | ||
|
||
import edu.ie3.datamodel.io.factory.Factory; | ||
import edu.ie3.datamodel.io.naming.timeseries.LoadProfileMetaInformation; | ||
import edu.ie3.datamodel.models.profile.LoadProfile; | ||
import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileEntry; | ||
import edu.ie3.datamodel.models.timeseries.repetitive.LoadProfileTimeSeries; | ||
import edu.ie3.datamodel.models.value.load.LoadValues; | ||
import edu.ie3.util.quantities.PowerSystemUnits; | ||
import java.util.Set; | ||
import javax.measure.quantity.Energy; | ||
import javax.measure.quantity.Power; | ||
import tech.units.indriya.ComparableQuantity; | ||
import tech.units.indriya.quantity.Quantities; | ||
|
||
/** | ||
* Base factory for all {@link LoadProfileTimeSeries}. | ||
* | ||
* @param <P> type of load profile | ||
* @param <V> type of load values | ||
*/ | ||
public abstract class LoadProfileFactory<P extends LoadProfile, V extends LoadValues> | ||
extends Factory<V, LoadProfileData<V>, LoadProfileEntry<V>> { | ||
protected static final String QUARTER_HOUR = "quarterHour"; | ||
|
||
public LoadProfileFactory(Class<? extends V> valueClass) { | ||
Check warning on line 31 in src/main/java/edu/ie3/datamodel/io/factory/timeseries/LoadProfileFactory.java
|
||
super(valueClass); | ||
} | ||
|
||
public abstract LoadProfileTimeSeries<V> build( | ||
LoadProfileMetaInformation metaInformation, Set<LoadProfileEntry<V>> entries); | ||
|
||
public abstract P parseProfile(String profile); | ||
|
||
/** | ||
* Calculates the maximum average power consumption per quarter-hour for a given calculated over | ||
* all seasons and weekday types of given load profile | ||
* | ||
* @param loadProfile given load profile | ||
* @param entries with power values | ||
* @return the maximal average power | ||
*/ | ||
public abstract ComparableQuantity<Power> calculateMaxPower( | ||
P loadProfile, Set<LoadProfileEntry<V>> entries); | ||
|
||
/** Returns the quarter-hour field. */ | ||
public String getTimeFieldString() { | ||
return QUARTER_HOUR; | ||
} | ||
|
||
/** Returns the load profile energy scaling. The default value is 1000 kWh */ | ||
public ComparableQuantity<Energy> getLoadProfileEnergyScaling(P loadProfile) { | ||
Check warning on line 57 in src/main/java/edu/ie3/datamodel/io/factory/timeseries/LoadProfileFactory.java
|
||
return Quantities.getQuantity(1000, PowerSystemUnits.KILOWATTHOUR); | ||
} | ||
} |
Uh oh!
There was an error while loading. Please reload this page.