Regarding oemof.
Hello, I would like to model a distribution grid with several companies with their own generation plants and flexible consumers. The basic structure is to use a bus as a distribution grid and to connect the individual companies, which are represented by their own bus, via a link component. The individual companies are represented as follows: A sink contains the load profile of the company minus the load profiles of the flexible consumers. A storage represents possible electricity storage facilities of the companies. A source represents a decentralised generation plant.
Some of the flexible consumers in the companies have the possibility of load shifting, which - as far as is known - can be mapped by a SinkDSM component. However, other flexible consumers only have the potential to increase or reduce the load without balancing (e.g. switching on a heating system). The idea is congestion management or grid serviceability).
Now the question is how this can be modelled. The first idea was to model a sink for the consumption of the component and another sink and source for the time series of the flexibility with the condition that the two cannot be active at the same time.
The aim is to simulate a consideration of the utilisation of the flexibilities, regardless of whether this makes sense at the moment or not, it should simply be checked how high the maximum potential would be.
Perhaps someone has another idea for the implementation or can give me some help with the parameterisation of the costs.
Many thanks in advance
If someone needs more information, I can also provide the complete code.
#*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~** Komponennten S.*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~**
#1. Bus & Verlinkung zum Netz
bus_s = buses.Bus(label="s")
energysystem.add(bus_s)
energysystem.add(components.Link(
label="s_link",
inputs= {bus_s: solph.flows.Flow(), bus_electricity: solph.flows.Flow() },
outputs={bus_electricity: solph.flows.Flow(), bus_s: solph.flows.Flow()},
conversion_factors={(bus_electricity, bus_s): 1, (bus_s, bus_electricity): 1}
))
#2. Einspeisung und Verbraucher
# create fixed source object representing pv power plants
energysystem.add(
components.Source(
label="pv",
outputs={
bus_staudigel: flows.Flow(
fix=df_pv['pv_value'], nominal_value=1, variable_costs=0
)
},
)
)
energysystem.add(
components.Sink(
label="verbrauch_s_ohne_flexibilitäten",
inputs={bus_s: flows.Flow(fix=df_verbrauch['verbrauch'], nominal_value=1)}
)
)
"""energysystem.add(sinkdsm(
label="Vorschmelze",
inputs={bus_s: flows.Flow()},
demand=df_lastkurve_vorschmelze['leistung'], # Der Basis-Netzverbrauch
capacity_up=df_flex_vorschmelze['leistung'], # Kapazität für Erhöhung der Last (z. B. 100 kW)
capacity_down=0, # Kapazität für Verringerung der Last (z. B. 100 kW)
delay_time=5,
max_demand=1, # wenn 1 -> demand = Lastkruve
max_capacity_up=1, #wenn 1 -> capacity_up = Flexkurve
max_capacity_down=1, #"
approach="DIW",
shed_eligibility=True,
shift_eligibility=True,
recovery_time_shift=0,
shift_time=1,
recovery_time_shed=1,
shed_time=5,
cost_dsm_up= 0,
cost_dsm_down_shift=0,
cost_dsm_down_shed=0,
))"""
# Vorschmelze DSM~~~~~~~~~~~~~~optionaler Ansatz
energysystem.add(
components.Sink(
label="Demand_Vorschmelze",
inputs={bus_s: flows.Flow(fix=df_lastkurve_vorschmelze['leistung'], nominal_value=1, variable_costs=0)}
)
)
energysystem.add(
components.Sink(
label="Lasterhoehung",
inputs={bus_s: flows.Flow(max=df_flex_vorschmelze['leistung'], nominal_value=1,variable_costs=0)}
)
)
"""energysystem.add(
components.Source(
label="Lastreduktion",
outputs={
bus_s: flows.Flow(
max=df_flex_vorschmelze['leistung'], nominal_value=1, variable_costs=0 #kurve lastreduktion -> fiktiv hier, da es sie nicht gibt
)
},
)
)"""
####################Bedingungen ################
from oemof.solph import constraints
# Überprüfen der Gruppen und Flüsse
#print("Verfügbare Gruppen:", energysystem.groups.keys())
#print("Verfügbare Flüsse:", list(energysystem_model.flows.keys()))
# Constraint für Flüsse zwischen Lasterhöhung und Lastreduktion
constraints.equate_flows(
model=energysystem_model,
flows1=[(energysystem.groups["s"], energysystem.groups["Lasterhoehung"])],
flows2=[(energysystem.groups["Lastreduktion"], energysystem.groups["s"])],
factor1=1,