Skip to content

Commit b939799

Browse files
committed
Remove season ramp constraints and refactor
Signed-off-by: Davey Elder <iandavidelder@gmail.com>
1 parent 21b0bbd commit b939799

10 files changed

Lines changed: 156 additions & 342 deletions

File tree

docs/source/computational_implementation.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ which determines the valid indices from other model components. This second meth
268268
when the indices of a constraint do not exactly align with the indices of the database
269269
table. For example, the database table :code:`ramp_up_hourly` is indexed by :code:`region`,
270270
:code:`tech` in the database but one of its inheriting constraints,
271-
:code:`ramp_up_day_constraint`, is indexed by :code:`region`, :code:`period`,
271+
:code:`ramp_up_constraint`, is indexed by :code:`region`, :code:`period`,
272272
:code:`season`, :code:`time_of_day`, :code:`tech`, :code:`vintage` in the model. In this case,
273273
an index function is needed to determine the valid indices for the constraint.
274274

@@ -277,19 +277,19 @@ an index function is needed to determine the valid indices for the constraint.
277277
.. code-block:: python
278278
:linenos:
279279
280-
self.ramp_up_day_constraint_rpsdtv = Set(
281-
dimen=6, initialize=operations.ramp_up_day_constraint_indices
280+
self.ramp_up_constraint_rpsdtv = Set(
281+
dimen=6, initialize=operations.ramp_up_constraint_indices
282282
)
283-
self.ramp_up_day_constraint = Constraint(
284-
self.ramp_up_day_constraint_rpsdtv, rule=operations.ramp_up_day_constraint
283+
self.ramp_up__constraint = Constraint(
284+
self.ramp_up_constraint_rpsdtv, rule=operations.ramp_up_constraint
285285
)
286286
287287
.. topic:: in ``temoa/components/operations.py`` (return valid indices)
288288

289289
.. code-block:: python
290290
:linenos:
291291
292-
def ramp_up_day_constraint_indices(
292+
def ramp_up_constraint_indices(
293293
model: TemoaModel,
294294
) -> set[tuple[Region, Period, Season, TimeOfDay, Technology, Vintage]]:
295295
indices = {
@@ -302,7 +302,7 @@ an index function is needed to determine the valid indices for the constraint.
302302
303303
return indices
304304
305-
With the sparse set (:code:`demand_constraint_rpc` or :code:`ramp_up_day_constraint_rpsdtv`)
305+
With the sparse set (:code:`demand_constraint_rpc` or :code:`ramp_up_constraint_rpsdtv`)
306306
created, we can now can use it in place of the sets specified in the non-sparse
307307
implementation. Pyomo will now call the constraint implementation rule the
308308
minimum number of times.

docs/source/mathematical_formulation.rst

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -838,9 +838,7 @@ ramp_down_hourly
838838

839839
The :code:`ramp_down_hourly` parameter specifies the fraction of installed capacity
840840
by which a technology can ramp output down per hour. This is used in the
841-
:code:`ramp_down_day_constraint` (between time-of-day slices) and
842-
:code:`ramp_down_season_constraint` (between the last time-of-day slice in one
843-
season and the first in the next).
841+
:code:`ramp_down_constraint`.
844842

845843

846844
ramp_up_hourly
@@ -850,8 +848,7 @@ ramp_up_hourly
850848

851849
The :code:`ramp_up_hourly` parameter specifies the fraction of installed capacity
852850
by which a technology can ramp output up per hour. This is used in the
853-
:code:`ramp_up_day_constraint` (between time-of-day slices) and
854-
:code:`ramp_up_season_constraint` (between seasons).
851+
:code:`ramp_up_constraint`.
855852

856853

857854
reserve_capacity_derate
@@ -1312,13 +1309,9 @@ various physical and operational real-world phenomena.
13121309

13131310
.. autofunction:: temoa.components.storage.storage_throughput_constraint
13141311

1315-
.. autofunction:: temoa.components.operations.ramp_up_day_constraint
1312+
.. autofunction:: temoa.components.operations.ramp_up_constraint
13161313

1317-
.. autofunction:: temoa.components.operations.ramp_down_day_constraint
1318-
1319-
.. autofunction:: temoa.components.operations.ramp_up_season_constraint
1320-
1321-
.. autofunction:: temoa.components.operations.ramp_down_season_constraint
1314+
.. autofunction:: temoa.components.operations.ramp_down_constraint
13221315

13231316
.. autofunction:: temoa.components.reserves.reserve_margin_static
13241317

0 commit comments

Comments
 (0)