Hey all,
I am currently struggeling to get a battery to behave in the way I want. To break it down, I want the charge to be at least 90% at a certain part of the day.
This is my battery:
storage = solph.components.GenericStorage(
nominal_storage_capacity=battery_cap, # capacity = 100 kWh
initial_storage_level=1,
loss_rate=0.1,
inflow_conversion_factor=0.9,
outflow_conversion_factor=0.8,
label="battery",
inputs={bel: solph.flows.Flow()},
outputs={bel: solph.flows.Flow()},
min_storage_level=data["cap_min"],
max_storage_level=data["cap_max"],
balanced=False
)
As you can see, I am using a timeseries for min_storage and max_storage. To begin, I want the battery fully charged at 6:00 am, so I am using the following timeseries:
,cap_min,cap_max
2015-01-01 00:00:00,0.25,1
2015-01-01 01:00:00,0.25,1
2015-01-01 02:00:00,0.25,1
2015-01-01 03:00:00,0.25,1
2015-01-01 04:00:00,0.25,1
2015-01-01 05:00:00,0.25,1
2015-01-01 06:00:00,1,1
Other components in the system can charge/discharge the battery, if they need energy or produce more than needed. This works fine, as long as I don’t specify the charging power of the battery. If limit the flows like this:
inputs={car: solph.flows.Flow(nominal_value=charging_power)},
outputs={car: solph.flows.Flow(nominal_value=charging_power)},
the model is no longer solvable. The reason for this seems to be, that by limiting the flows the battery cannot be charged fast enough in the step from 5:00 am to 6:00 am.
My question is: Is there a way for the model to “know” a few timesteps ahead, that it needs to begin charging, in order to be full at 6:00 am?
I’m thankful for any help.
Kind regards,
Marius