cronian.electric_power
Attributes
Functions
|
Add prosumer's electric power variable to the model. |
Add total electricity (withdrawn or generated) expression to model. |
|
Add the prosumer's corrected electric demand to the model. |
|
Check if the prosumer has an electric demand. |
|
|
Calculate average efficiency of assets directly supplying electric demand. |
Module Contents
- cronian.electric_power.add_prosumer_electric_power(model: pyomo.environ.AbstractModel, prosumer: dict) None
Add prosumer’s electric power variable to the model.
The prosumer interacts with the rest of the system (grid/market) through its electric power variable. It is positive when the prosumer is net injecting electricity to the grid, and negative when net consuming from the grid.
- Parameters:
model – Pyomo Abstract model.
prosumer – Dictionary containing prosumer details.
Requires model attributes:
time
Creates model attributes:
<prosumer_id>_electric_power(Var[time]): Nett electric power demand/supply for this prosumer<prosumer_id>_net_electric_power_constraint(Constraint[time]): Constraining the electric power variable to be the difference between local production and local demand/asset consumption.
- cronian.electric_power.add_prosumer_total_electricity_expression_to_model(model: pyomo.environ.AbstractModel, prosumer_id: str, assets: dict, expression_type: str, asset_direction_of_electricity_flow: str, storage_asset_attribute: str, non_storage_asset_attribute: str) None
Add total electricity (withdrawn or generated) expression to model.
- Parameters:
model – Pyomo Abstract model.
prosumer_id – The prosumer’s unique ID.
assets – Dictionary containing prosumer’s assets.
expression_type – total_electricity expression type: withdrawn/generated.
asset_direction_of_electricity_flow – Asset’s direction of electricity flow: input or output.
storage_asset_attribute – charge if the direction of electricity flow is input, and discharge if the direction of electricity flow is output.
non_storage_asset_attribute – electricity_consumption if the direction of electricity flow is input, and electricity_supply if the direction of electricity flow is output.
Requires model attributes:
time<prosumer_id>_<asset_id>_<storage_asset_attribute><prosumer_id>_<asset_id>_<non_storage_asset_attribute>
Creates model attributes:
<prosumer_id>_total_electricity_<expression_type>(Expression[time]): Sum of all in/outgoing electricity for this prosumer’s assets.
- cronian.electric_power.add_prosumer_total_electricity_generated_by_assets_to_model
- cronian.electric_power.add_prosumer_total_electricity_consumed_by_assets_to_model
- cronian.electric_power.add_prosumer_corrected_electric_demand_to_model(model: pyomo.environ.AbstractModel, prosumer: dict) None
Add the prosumer’s corrected electric demand to the model.
The corrected electric demand is calculated by summing the base and flexible electricity demand of the prosumer and dividing that by the average efficiency of assets directly supplying the electric demand.
- Parameters:
model – Pyomo Abstract model.
prosumer – Dictionary containing prosumer details.
Requires model attributes:
time
Creates model attributes:
<prosumer_id>_corrected_electric_demand(Var[time]): …<prosumer_id>_corrected_electric_demand_constraint(Constraint[time]): Constrain the corrected electric demand to be the sum of electric demand divided by the average efficiency of all available assets directly supplying electricity (regardless of their actual dispatch)
- cronian.electric_power.check_if_prosumer_has_electric_demand(prosumer: dict) bool
Check if the prosumer has an electric demand.
- Parameters:
prosumer – Dictionary containing prosumer details.
- Returns:
True if the prosumer has electric demand, False otherwise.
- cronian.electric_power.calculate_average_efficiency_of_assets_directly_supplying_electric_demand(assets: dict) float
Calculate average efficiency of assets directly supplying electric demand.
- Parameters:
assets – Dictionary containing prosumer’s assets.
- Returns:
Average efficiency of assets directly supplying electric demand.