Closed bdietermann closed 1 month ago
For the moment, you can workaround the issue by giving costs per time point, e.g. storage_costs[0] + 2*[-1]
.
Some considerations:
Thus, as a first approach to solve this here, I'd suggest to drop the costs for the 0th time step.
I’m currently trying to use the parameter storage_costs for a GenericStorage. In order to figure out the unit of this parameter, I specified a source and a storage, with
storage_costs = -1
. These are the only costs present within in the system. The storage is initialized with a SOC of 98% and is charged to 100% by the optimizer in the first timestep and afterwards is kept on 100% for the whole simulation duration. I then checked the costs computed by pyomo: This reveals, that all SOCs “after” the simulation timesteps (so resulting from the power computed of the optimizer) are taken into account for the target function, which in my opinion is the desired behavior. But also the intial energy content is added. So the calculation is based on n + 1 timesteps with n being the number of timesteps in the simulation. For a storage withnominal_storage_capacity=1
,storage_costs=-1
, and a constant SOC=100% this results in costs of -3 for a simulation duration of 2 timesteps. As storages are usually defined as balanced storages, the inital SOC has twice the weight compared to all other timesteps. Furthermore, the inital SOC is typically predefined, so taking it into account also doesn't make sense to me for non-balanced storages.Therefore, I would suggest to neglect the initial storage in the cost function for optimization.