Units#
Submodules#
assume.units.demand module#
- class assume.units.demand.Demand(id: str, unit_operator: str, technology: str, bidding_strategies: dict, index: DatetimeIndex, max_power: float, min_power: float, node: str = 'bus0', price: float | Series = 3000.0, location: tuple[float, float] = (0.0, 0.0), **kwargs)#
Bases:
SupportsMinMax
A demand unit.
- Parameters:
id (str) – unique identifier for the unit
unit_operator (str) – the operator of the unit
technology (str) – the technology of the unit
bidding_strategies (dict) – the bidding strategies of the unit
index (pd.DatetimeIndex) – the index of the unit
max_power (float | pd.Series) – the maximum power output of the unit (kW)
min_power (float | pd.Series) – the minimum power output of the unit (kW)
node (str) – the node of the unit
price (float | pd.Series) – the price of the unit
location (tuple[float, float]) – the location of the unit (latitude, longitude)
kwargs (dict) – additional keyword arguments
- calculate_marginal_cost(start: Timestamp, power: float) float #
Calculate the marginal cost of the unit. Returns the marginal cost of the unit based on the provided time and power.
- calculate_min_max_power(start: Timestamp, end: Timestamp, product_type='energy') tuple[pandas.core.series.Series, pandas.core.series.Series] #
Calculate the minimum and maximum power output of the unit. Returns the bid volume as both the minimum and maximum power output of the unit.
- execute_current_dispatch(start: Timestamp, end: Timestamp)#
Execute the current dispatch of the unit. Returns the volume of the unit within the given time range.
- Parameters:
start (pd.Timestamp) – the start time of the dispatch
end (pd.Timestamp) – the end time of the dispatch
- Returns:
the volume of the unit within the given time range
- Return type:
pd.Series
assume.units.powerplant module#
- class assume.units.powerplant.PowerPlant(id: str, unit_operator: str, technology: str, bidding_strategies: dict, index: DatetimeIndex, max_power: float, min_power: float = 0.0, efficiency: float = 1.0, fixed_cost: float = 0.0, partial_load_eff: bool = False, fuel_type: str = 'others', emission_factor: float = 0.0, ramp_up: float | None = None, ramp_down: float | None = None, hot_start_cost: float = 0, warm_start_cost: float = 0, cold_start_cost: float = 0, min_operating_time: float = 0, min_down_time: float = 0, downtime_hot_start: int = 8, downtime_warm_start: int = 48, heat_extraction: bool = False, max_heat_extraction: float = 0, location: tuple[float, float] = (0.0, 0.0), node: str = 'bus0', **kwargs)#
Bases:
SupportsMinMax
A class for a powerplant unit
- Parameters:
id (str) – The ID of the storage unit.
technology (str) – The technology of the storage unit.
bidding_strategies (dict) – The bidding strategies of the storage unit.
index (pd.DatetimeIndex) – The index of the storage unit.
max_power (float) – The maximum power output capacity of the power plant in MW.
min_power (float, optional) – The minimum power output capacity of the power plant in MW. (Defaults to 0.0 MW)
efficiency (float, optional) – The efficiency of the poewr plant in converting fuel to electricity (Defaults to 1.0)
fixed_cost (float, optional) – The fixed operating cost of the power plant, independent of the power output (Defaults to 0.0 monetary units)
partial_load_eff (bool, optional) – Does the efficiency varies at part loads? (Defaults to False)
fuel_type (str, optional) – The type of fuel used by the power plant for power generation (Defaults to “others”)
emission_factor (float, optional) – The emission factor associated with the power plants fuel type -> CO2 emissions per unit of energy produced (Defaults to 0.0.)
ramp_up (float, optional) – The ramp-up rate of the power plant, indicating how quickly it can increase power output (Defaults to -1)
ramp_down (float, optional) – The ramp-down rate of the power plant, indicating how quickly it can decrease power output. (Defaults to -1)
hot_start_cost (float, optional) – The cost of a hot start, where the power plant is restarted after a recent shutdown.(Defaults to 0 monetary units.)
warm_start_cost (float, optional) – The cost of a warm start, where the power plant is restarted after a moderate downtime.(Defaults to 0 monetary units.)
cold_start_cost (float, optional) – The cost of a cold start, where the power plant is restarted after a prolonged downtime.(Defaults to 0 monetary units.)
min_operating_time (float, optional) – The minimum duration that the power plant must operate once started, in hours.(Defaults to 0 hours.)
min_down_time (float, optional) – The minimum downtime required after a shutdown before the power plant can be restarted, in hours.(Defaults to 0 hours.)
downtime_hot_start (int, optional) – The downtime required after a hot start before the power plant can be restarted, in hours.(Defaults to 8 hours.)
downtime_warm_start (int, optional) – The downtime required after a warm start before the power plant can be restarted, in hours.( Defaults to 48 hours.)
heat_extraction (bool, optional) – A boolean indicating whether the power plant can extract heat for external purposes.(Defaults to False.)
max_heat_extraction (float, optional) – The maximum amount of heat that the power plant can extract for external use, in some suitable unit.(Defaults to 0.)
location (tuple[float, float], optional) – The geographical coordinates (latitude and longitude) of the power plant’s location.(Defaults to (0.0, 0.0).)
node (str, optional) – The identifier of the electrical bus or network node to which the power plant is connected.(Defaults to “bus0”.)
kwargs (dict, optional) – Additional keyword arguments to be passed to the base class.
- as_dict() dict #
Returns the attributes of the unit as a dictionary, including specific attributes.
- Returns:
the attributes of the unit as a dictionary
- Return type:
- calc_marginal_cost_with_partial_eff(power_output: float, timestep: Timestamp = None) float | Series #
Calculates the marginal cost of the unit based on power output and timestamp, considering partial efficiency. Returns the marginal cost of the unit.
- calc_simple_marginal_cost()#
Calculate the marginal cost of the unit (simple method) Returns the marginal cost of the unit.
- Returns:
the marginal cost of the unit
- Return type:
- calculate_marginal_cost(start: datetime, power: float)#
Calculates the marginal cost of the unit based on the provided start time and power output. Returns the marginal cost of the unit.
- calculate_min_max_power(start: Timestamp, end: Timestamp, product_type='energy') tuple[pandas.core.series.Series, pandas.core.series.Series] #
Calculate the minimum and maximum power output of the unit. Returns the minimum and maximum power output of the unit. does not include ramping can be used for arbitrary start times in the future
- execute_current_dispatch(start: Timestamp, end: Timestamp)#
Executes the current dispatch of the unit based on the provided timestamps. The dispatch is only executed, if it is in the constraints given by the unit. Returns the volume of the unit within the given time range.
- Parameters:
start (pd.Timestamp) – the start time of the dispatch
end (pd.Timestamp) – the end time of the dispatch
- Returns:
the volume of the unit within the given time range
- Return type:
- init_marginal_cost()#
Initialize the marginal cost of the unit.
assume.units.storage module#
- class assume.units.storage.Storage(id: str, unit_operator: str, technology: str, bidding_strategies: dict, max_power_charge: float | Series, max_power_discharge: float | Series, max_volume: float, min_power_charge: float | Series = 0.0, min_power_discharge: float | Series = 0.0, min_volume: float = 0.0, initial_soc: float = 0.5, soc_tick: float = 0.01, efficiency_charge: float = 1, efficiency_discharge: float = 1, variable_cost_charge: float | Series = 0.0, variable_cost_discharge: float | Series = 0.0, emission_factor: float = 0.0, ramp_up_charge: float = None, ramp_down_charge: float = None, ramp_up_discharge: float = None, ramp_down_discharge: float = None, fixed_cost: float = 0, hot_start_cost: float = 0, warm_start_cost: float = 0, cold_start_cost: float = 0, min_operating_time: float = 0, min_down_time: float = 0, downtime_hot_start: int = 8, downtime_warm_start: int = 48, index: DatetimeIndex = None, location: tuple[float, float] = None, node: str = None, **kwargs)#
Bases:
SupportsMinMaxCharge
A class for a storage unit.
- max_volume#
The maximum state of charge of the storage unit in MWh (equivalent to capacity).
- Type:
- ramp_up_charge#
The ramp up rate of charging the storage unit in MW/15 minutes (negative value).
- Type:
float, optional
- ramp_down_charge#
The ramp down rate of charging the storage unit in MW/15 minutes (negative value).
- Type:
float, optional
- ramp_up_discharge#
The ramp up rate of discharging the storage unit in MW/15 minutes.
- Type:
float, optional
- ramp_down_discharge#
The ramp down rate of discharging the storage unit in MW/15 minutes.
- Type:
float, optional
- fixed_cost#
The fixed cost of the storage unit in €/MW. (related to capacity?)
- Type:
float, optional
- bidding_startegy#
In case the unit is active it has to be defined which bidding strategy should be used
- Type:
- kwargs#
Additional keyword arguments.
- as_dict() dict #
Return the storage unit’s attributes as a dictionary, including specific attributes.
- Returns:
the storage unit’s attributes as a dictionary
- Return type:
- calculate_marginal_cost(start: Timestamp, power: float) float #
calculates the marginal cost for the given power
- calculate_min_max_charge(start: Timestamp, end: Timestamp, product_type='energy') tuple[pandas.core.series.Series] #
Calculate the minimum and maximum charge power levels of the storage unit. Returns the minimum and maximum charge power levels of the storage unit in MW.
- Parameters:
start – The start of the current dispatch.
end – The end of the current dispatch.
product_type – The product type of the storage unit.
- Returns:
The minimum and maximum charge power levels of the storage unit in MW.
- Return type:
tuple[pd.Series]
- calculate_min_max_discharge(start: Timestamp, end: Timestamp, product_type='energy') tuple[pandas.core.series.Series] #
Calculate the minimum and maximum discharge power levels of the storage unit. Returns the minimum and maximum discharge power levels of the storage unit in MW.
- Parameters:
start – The start of the current dispatch.
end – The end of the current dispatch.
product_type – The product type of the storage unit.
- Returns:
The minimum and maximum discharge power levels of the storage unit in MW.
- Return type:
tuple[pd.Series]
- calculate_ramp_charge(soc: float, previous_power: float, power_charge: float, current_power: float = 0, min_power_charge: float = 0) float #
calculates the ramp for the given charging power
- calculate_ramp_discharge(soc: float, previous_power: float, power_discharge: float, current_power: float = 0, min_power_discharge: float = 0) float #
calculates the ramp for the given discharging power
- execute_current_dispatch(start: Timestamp, end: Timestamp)#
Execute the current dispatch of the storage unit. Returns the dispatched energy in MWh.
- Parameters:
start – The start of the current dispatch.
end – The end of the current dispatch.
- Returns:
The dispatched energy in MWh.
- Return type:
pd.Series
- get_starting_costs(op_time)#
op_time is hours running