From 925de61f6c5263cdc5fb7ec31358eec14a5c45ea Mon Sep 17 00:00:00 2001 From: Simon Stamen <simon.stamen@rwth-aachen.de> Date: Fri, 12 May 2023 14:51:12 +0200 Subject: [PATCH] Correct storage losses when using segmentation --- secmod/optimization_MILP.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/secmod/optimization_MILP.py b/secmod/optimization_MILP.py index c9d577d..8423648 100644 --- a/secmod/optimization_MILP.py +++ b/secmod/optimization_MILP.py @@ -1674,8 +1674,7 @@ class Optimization_MILP(abc.ABC): """ return( # sum of the current storage level, the deposits and withdrawals - (model.storage_level[node, process_storage, year, year_construction, time_slice]*(1-model.rel_storage_loss_factor[process_storage,year_construction]) - # multiplication of the duration of the time slice with... + (model.storage_level[node, process_storage, year, year_construction, time_slice]*(1-model.rel_storage_loss_factor[process_storage,year_construction])**model.time_slice_duration[time_slice] # multiplication of the duration of the time slice with... + (model.time_slice_duration[time_slice] # ... the sum of all deposits and withdrawals from the storage * sum(model.storage_level_factor[direction_storage] -- GitLab