Package agents.electrolysis
Class ElectrolyzerStrategist
- java.lang.Object
-
- agents.flexibility.Strategist
-
- agents.electrolysis.ElectrolyzerStrategist
-
- Direct Known Subclasses:
FileDispatcher
,MonthlyEquivalence
,SingleAgentSimple
public abstract class ElectrolyzerStrategist extends Strategist
Base class for electrolysis strategists- Author:
- Christoph Schimeczek
-
-
Field Summary
Fields Modifier and Type Field Description protected double
actualProducedHydrogen
total actual hydrogen produced in thermal MWHprotected double[]
electricDemandOfElectrolysisInMW
Electric power dedicated to electrolysis unitprotected double[]
electricityPriceForecasts
Electricity price forecasts for planning horizonprotected Electrolyzer
electrolyzer
The associated electrolysis unitprotected double[]
hydrogenSaleOpportunityCostsPerElectricMWH
Maximum willingness to pay for electricity compared to selling hydrogenstatic de.dlr.gitlab.fame.agent.input.Tree
parameters
Input parameters ofElectrolyzerStrategist
protected DispatchSchedule
schedule
The Dispatch schedule controlled / created by this Strategistprotected double[]
scheduledChargedHydrogenTotal
Planned production schedule for hydrogen in thermal MWhprotected de.dlr.gitlab.fame.time.TimeStamp[]
stepTimes
Time stamps at the beginning of each scheduling period-
Fields inherited from class agents.flexibility.Strategist
bidToleranceParam, demandScheduleInMWH, ERR_PROVIDE_FORECAST, ERR_UNKNOWN_STRATEGIST, ERR_USE_MERIT_ORDER_FORECAST, ERR_USE_PRICE_FORECAST, forecastPeriodParam, forecastSteps, OPERATION_PERIOD, priceScheduleInEURperMWH, scheduledBidPricesInEURperMWH, scheduleDurationParam, scheduleDurationPeriods
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ElectrolyzerStrategist(de.dlr.gitlab.fame.agent.input.ParameterData input)
Create newElectrolyzerStrategist
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
getEconomicHydrogenPotential(int hour)
double
getElectricDemandForecastInMW(de.dlr.gitlab.fame.time.TimeStamp targetTime)
Provides forecast for electricity demand at given time;
only available to FileDispatcher is it doesn't use forecasts themselvesprotected int
getHourWithHighestEconomicPotential(int endOfHorizon)
protected double
getHydrogenPriceForPeriod(de.dlr.gitlab.fame.time.TimePeriod timePeriod)
Returns hydrogen price forecast associated with given TimePeriodprotected double[]
getInternalEnergySchedule()
ArrayList<de.dlr.gitlab.fame.time.TimeStamp>
getMissingHydrogenPriceForecastsTimes(de.dlr.gitlab.fame.time.TimePeriod firstTime)
Returns list of times at which hydrogen price forecasts are missing needed for schedule planningprotected double
getRemainingPowerInMW(int hour)
DispatchSchedule
getValidSchedule(de.dlr.gitlab.fame.time.TimeStamp targetTime)
Returns a valid schedule for the given target timestatic ElectrolyzerStrategist
newStrategist(de.dlr.gitlab.fame.agent.input.ParameterData input, Electrolyzer electrolyzer)
Creates new electrolysis Strategist based on its associated input groupprotected void
setElectrolyzer(Electrolyzer electrolyzer)
sets theElectrolyzerStrategist
's electrolyzer to the given onevoid
storeHydrogenPriceForecast(de.dlr.gitlab.fame.time.TimePeriod timePeriod, double priceForecastInEURperThermalMWH)
Stores given hydrogen price forecast for the associated TimePeriod: price-forecasting methodprotected void
updateElectricityPriceForecasts(de.dlr.gitlab.fame.time.TimePeriod startTime)
copies forecasted prices from sensitivitiesprotected void
updateOpportunityCosts(de.dlr.gitlab.fame.time.TimePeriod startTime)
calculates electricity price equivalent of opportunity costs for selling hydrogen with expected pricesvoid
updateProducedHydrogenTotal(double producedHydrogenInMWH)
Updates produced hydrogen total by adding the given amountprotected void
updateStepTimes(de.dlr.gitlab.fame.time.TimePeriod startTime)
set start time of each hour in forecast interval-
Methods inherited from class agents.flexibility.Strategist
callOnSensitivity, clearSensitivitiesBefore, createBlankSensitivity, createSchedule, getMissingForecastTimes, getSensitivityForPeriod, getTimesMissingElectricityForecasts, storeElectricityPriceForecast, storeMeritOrderForesight, updateBidSchedule, updateSchedule
-
-
-
-
Field Detail
-
scheduledChargedHydrogenTotal
protected double[] scheduledChargedHydrogenTotal
Planned production schedule for hydrogen in thermal MWh
-
actualProducedHydrogen
protected double actualProducedHydrogen
total actual hydrogen produced in thermal MWH
-
electricityPriceForecasts
protected double[] electricityPriceForecasts
Electricity price forecasts for planning horizon
-
hydrogenSaleOpportunityCostsPerElectricMWH
protected double[] hydrogenSaleOpportunityCostsPerElectricMWH
Maximum willingness to pay for electricity compared to selling hydrogen
-
electricDemandOfElectrolysisInMW
protected double[] electricDemandOfElectrolysisInMW
Electric power dedicated to electrolysis unit
-
stepTimes
protected de.dlr.gitlab.fame.time.TimeStamp[] stepTimes
Time stamps at the beginning of each scheduling period
-
electrolyzer
protected Electrolyzer electrolyzer
The associated electrolysis unit
-
schedule
protected DispatchSchedule schedule
The Dispatch schedule controlled / created by this Strategist
-
parameters
public static final de.dlr.gitlab.fame.agent.input.Tree parameters
Input parameters ofElectrolyzerStrategist
-
-
Constructor Detail
-
ElectrolyzerStrategist
protected ElectrolyzerStrategist(de.dlr.gitlab.fame.agent.input.ParameterData input) throws de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
Create newElectrolyzerStrategist
- Parameters:
input
- parameters associated with strategists- Throws:
de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
- if any required input is missing
-
-
Method Detail
-
newStrategist
public static ElectrolyzerStrategist newStrategist(de.dlr.gitlab.fame.agent.input.ParameterData input, Electrolyzer electrolyzer) throws de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
Creates new electrolysis Strategist based on its associated input group- Parameters:
input
- parameters associated with electrolysis strategistselectrolyzer
- to be assigned to the new strategist- Returns:
- new Strategist created from the given input
- Throws:
de.dlr.gitlab.fame.agent.input.ParameterData.MissingDataException
- if any required input is missing
-
setElectrolyzer
protected final void setElectrolyzer(Electrolyzer electrolyzer)
sets theElectrolyzerStrategist
's electrolyzer to the given one- Parameters:
electrolyzer
- to be assigned to this strategist
-
updateElectricityPriceForecasts
protected void updateElectricityPriceForecasts(de.dlr.gitlab.fame.time.TimePeriod startTime)
copies forecasted prices from sensitivities- Parameters:
startTime
- first time period that update is done for
-
updateOpportunityCosts
protected void updateOpportunityCosts(de.dlr.gitlab.fame.time.TimePeriod startTime)
calculates electricity price equivalent of opportunity costs for selling hydrogen with expected prices- Parameters:
startTime
- first time period that update is done for
-
updateStepTimes
protected void updateStepTimes(de.dlr.gitlab.fame.time.TimePeriod startTime)
set start time of each hour in forecast interval- Parameters:
startTime
- first time period that update is done for
-
getElectricDemandForecastInMW
public double getElectricDemandForecastInMW(de.dlr.gitlab.fame.time.TimeStamp targetTime)
Provides forecast for electricity demand at given time;
only available to FileDispatcher is it doesn't use forecasts themselves- Parameters:
targetTime
- to calculate the forecast for- Returns:
- forecasted electricity demand
- Throws:
RuntimeException
- if given Strategist cannot provide forecasts
-
getValidSchedule
public DispatchSchedule getValidSchedule(de.dlr.gitlab.fame.time.TimeStamp targetTime)
Returns a valid schedule for the given target time- Parameters:
targetTime
- to return a valid schedule for- Returns:
- the previous schedule (if still valid) or a newly created one
-
getInternalEnergySchedule
protected double[] getInternalEnergySchedule()
- Specified by:
getInternalEnergySchedule
in classStrategist
- Returns:
- array representing the expected internal energy state of the controlled flexibility
-
updateProducedHydrogenTotal
public void updateProducedHydrogenTotal(double producedHydrogenInMWH)
Updates produced hydrogen total by adding the given amount- Parameters:
producedHydrogenInMWH
- amount of produced hydrogen to add to the total
-
getMissingHydrogenPriceForecastsTimes
public ArrayList<de.dlr.gitlab.fame.time.TimeStamp> getMissingHydrogenPriceForecastsTimes(de.dlr.gitlab.fame.time.TimePeriod firstTime)
Returns list of times at which hydrogen price forecasts are missing needed for schedule planning- Parameters:
firstTime
- first time period to be covered by a created schedule- Returns:
- List of
TimeStamp
s at which hydrogen prices is not yet defined
-
storeHydrogenPriceForecast
public void storeHydrogenPriceForecast(de.dlr.gitlab.fame.time.TimePeriod timePeriod, double priceForecastInEURperThermalMWH)
Stores given hydrogen price forecast for the associated TimePeriod: price-forecasting method- Parameters:
timePeriod
- associated with the forecast datapriceForecastInEURperThermalMWH
- forecast for the hydrogen price in EUR per thermal MWh
-
getHydrogenPriceForPeriod
protected double getHydrogenPriceForPeriod(de.dlr.gitlab.fame.time.TimePeriod timePeriod)
Returns hydrogen price forecast associated with given TimePeriod- Parameters:
timePeriod
- to search for associated hydrogen price- Returns:
- hydrogen price forecast in EUR per thermal MWh or, if not present,
Double.MAX_VALUE
-
getHourWithHighestEconomicPotential
protected int getHourWithHighestEconomicPotential(int endOfHorizon)
- Parameters:
endOfHorizon
- last step of planning horizon- Returns:
- Hour with highest economic potential among those with remaining production capabilities; -1 of no capability left in any hour
-
getRemainingPowerInMW
protected double getRemainingPowerInMW(int hour)
- Parameters:
hour
- to evaluate- Returns:
- remaining (unused) electrolyzer electric capacity in MW for given hour
-
getEconomicHydrogenPotential
protected double getEconomicHydrogenPotential(int hour)
- Parameters:
hour
- to evaluate- Returns:
- Economic potential in given hour to purchase electricity and sell hydrogen
-
-