Hey everybody
I've added the deferable load on a separate bus with a free link connecting the main electricity bus and a storage unit to hold the excess as shown
n.add("StorageUnit",
"deferable_store",
bus="deferable",
carrier = 'defer_storage',
cyclic=True,
state_of_charge_initial=0,
marginal_cost=0) # No cost for consuming energy
# Add the deferable load target as a regular load (this creates the requirement)
n.add("Load", "deferable_target",
bus="deferable",
carrier = 'deferable',
p_set=(hourly_data_heat/1e3),
overwrite = True)
n.add("Link",
"power_to_deferable",
bus0="electricity",
bus1="deferable",
p_nom=500,
efficiency=1.0)
# global constraint for daily deferable energy balance
n.add("GlobalConstraint",
"daily_deferable_balance",
type="storage_daily_energy_balance", # Custom constraint type
storage_unit="deferable_load",
sense="==",
constant=0)
This does serve the load but means the load can be deferred for the entire year (8760 snapshots) when I want the constraint to be valid for every day(24 snapshots)
Any help would be appreciated thank you