Skip to content

Commit 44ff867

Browse files
Clarify extra timepoints warning message since it applies to both plants that are retired early and plants whose construction is not complete in the first period. Also minor documentation update.
1 parent f8c1f53 commit 44ff867

File tree

3 files changed

+21
-15
lines changed

3 files changed

+21
-15
lines changed

switch_model/generators/core/dispatch.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,17 @@ def _warn_on_extra_VARIABLE_GEN_TPS(m):
286286
pprint = "\n".join(
287287
"* {}: {}".format(g, tps) for g, tps in extraneous.items())
288288
warning_msg = (
289-
"{} renewable generators have capacity factors specified "
290-
"in timepoints after they are slated for retirement. This "
291-
"could indicate a benign issue where the process that built "
292-
"the dataset used simplified logic and/or didn't know the "
293-
"scheduled retirement date. If you expect those datapoints to "
294-
"be useful, then those plants need longer lifetimes (or "
295-
"options to build new capacity when the old capacity reaches "
296-
"the provided end-of-life date).\n".format(num_impacted_generators))
289+
"{} renewable generators with predetermined builds have capacity "
290+
"factors specified in timepoints in periods when they are not "
291+
"operating (either after retirement, or before construction is "
292+
"complete). This could indicate a benign issue where the process "
293+
"that built the dataset used simplified logic and/or didn't know "
294+
"the scheduled operational dates. If you expect those datapoints "
295+
"to be useful, then those plants need to either come online "
296+
"earlier, have longer lifetimes, or have options to build new "
297+
"new capacity when the old capacity reaches the provided "
298+
"end-of-life date."
299+
"\n".format(num_impacted_generators))
297300
if extra_indexes:
298301
logging.warning(warning_msg)
299302
logging.info("Plants with extra timepoints:\n{}".format(pprint))

switch_model/generators/extensions/hydro_simple.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,16 @@ def _warn_on_extra_HYDRO_GEN_TS(m):
120120
pprint = "\n".join(
121121
"* {}: {}".format(g, tps) for g, tps in extraneous.items())
122122
warning_msg = (
123-
"{} hydro plants have data specified "
124-
"in timeseries after they are slated for retirement. This "
123+
"{} hydro plants with predetermined builds have timeseries data "
124+
"in periods when they are not operating (either after retirement, "
125+
"or before construction is complete). This "
125126
"could indicate a benign issue where the process that built "
126127
"the dataset used simplified logic and/or didn't know the "
127-
"scheduled retirement date. If you expect those datapoints to "
128-
"be useful, then those plants need longer lifetimes (or "
129-
"options to build new capacity when the old capacity reaches "
130-
"the provided end-of-life date).\n".format(num_impacted_generators))
128+
"scheduled operating dates. If you expect those datapoints to "
129+
"be useful, then those plants need to either come online earlier "
130+
", have longer lifetimes, or have options to build new capacity "
131+
"when the old capacity reaches the provided end-of-life date."
132+
"\n".format(num_impacted_generators))
131133
if extra_indexes:
132134
logging.warning(warning_msg)
133135
logging.info("Plants with extra timepoints:\n{}".format(pprint))

switch_model/timescales.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ def add_one_to_period_end_rule(m):
326326
mod.TIMEPOINTS,
327327
within=PositiveReals,
328328
initialize=lambda m, t: (
329-
m.tp_weight[t] / m.period_length_years[m.tp_period[t]]))
329+
m.tp_weight[t] / m.period_length_years[m.tp_period[t]]),
330+
doc="This weight scales a timepoint to an annual average.")
330331
# Identify previous step for each timepoint, for use in tracking
331332
# unit commitment or storage. We use circular indexing (.prevw() method)
332333
# for the timepoints within a timeseries to give consistency between the

0 commit comments

Comments
 (0)