From 2284c026dc82a3cbef940e0a51b5f332ba3bf74c Mon Sep 17 00:00:00 2001 From: Tomasini Luca Date: Thu, 28 Nov 2024 12:54:28 +0100 Subject: [PATCH] Modify sets --- src/optimization/pyomo_models/constraints/basin_volume.py | 2 +- src/optimization/pyomo_models/sets.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/optimization/pyomo_models/constraints/basin_volume.py b/src/optimization/pyomo_models/constraints/basin_volume.py index 9c60bb3..fe1f174 100644 --- a/src/optimization/pyomo_models/constraints/basin_volume.py +++ b/src/optimization/pyomo_models/constraints/basin_volume.py @@ -40,7 +40,7 @@ :nowrap: \\begin{align} - V_\\text{BAS}^{t,~b} \leq V_\\text{BAS, MAX}^{b,~s\_b} + V_\\text{BAS, MAX}^{b,~S\_B_\\text{MAX}\{b\}} + V_\\text{BAS}^{t,~b} \leq V_\\text{BAS, MAX}^{b,~s\_b} + V_\\text{BAS, MAX}^{b,~S\_B_\\text{END}\{b\}} \cdot \left(1 -S_\\text{BAS}^{t,~b,~s\_b} \\right) \\end{align} diff --git a/src/optimization/pyomo_models/sets.py b/src/optimization/pyomo_models/sets.py index 227718b..7aa5026 100644 --- a/src/optimization/pyomo_models/sets.py +++ b/src/optimization/pyomo_models/sets.py @@ -1,6 +1,7 @@ """ The sets :math:`T`, :math:`S\_H` and :math:`S\_B` are arranged in a specific order such that indexing a variable with -the last element of a set (i.e :math:`t_{LAST} \in T`) corresponds to the highest or final element of that variable. +the first or last element of a set (i.e :math:`t_{0} ant math:`t_{\\text{END}} \in T`) corresponds respectively to the +lowest/first or highest/final element of that variable. :math:`S\_H` and :math:`S\_B` include subset to specify the corresponding hydro powerplants and basins that the state is associated with, respectively. The sets are constructed as demonstrated in the following example. To collect