Hey there,
I am running into a problem with the storage object not working with a sequence of values for the min_storage_level and max_storage_level. I have it currently set up like this:
storage = solph.components.GenericStorage(
nominal_storage_capacity=100,
label="storage",
inputs={bel: solph.Flow(nominal_value=22)},
outputs={
bel: solph.Flow(nominal_value=22, variable_costs=0)
},
min_storage_level=data["min_storage"],
max_storage_level=data["max_storage"]
)
energysystem.add(storage)
I’m using this data for testing:
timestep,demand_el,min_storage,max_storage,grid_avail
1,20,0.8,1,20
2,20,0.8,1,15
3,20,0.8,1,15
4,10,0,0,15
5,10,0,0,10
6,10,0,0,15
Interestingly, if I set all values for min_storage to zero it seems to work. Otherwise I get an error.
ERROR: evaluating object as numeric value: flow[grid,electricity,0]
(object: <class 'pyomo.core.base.var._GeneralVarData'>)
No value for uninitialized NumericValue object flow[grid,electricity,0]
I can provide more code if necessary. I am thankful for advice.