@@ -268,7 +268,7 @@ which determines the valid indices from other model components. This second meth
268268when the indices of a constraint do not exactly align with the indices of the database
269269table. 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,
273273an 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 `)
306306created, we can now can use it in place of the sets specified in the non-sparse
307307implementation. Pyomo will now call the constraint implementation rule the
308308minimum number of times.
0 commit comments