Skip to content

Commit

Permalink
allowing default forecastables
Browse files Browse the repository at this point in the history
  • Loading branch information
bknueven committed Sep 8, 2021
1 parent b9695fb commit b498ff3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions prescient/engine/forecast_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,11 @@ def _get_forecastable_locations(model):
yield (model.data['system'], 'reserve_requirement')

for data, key in _get_forecastable_locations(model):
if (not key in data or \
if (key not in data or \
type(data[key]) is not dict or \
data[key]['data_type'] != 'time_series' or \
len(data[key]['values'] != num_entries)
):
default = None if (key not in data) else data[key]
data[key] = { 'data_type': 'time_series',
'values': [None]*num_entries}
'values': [default]*num_entries}

0 comments on commit b498ff3

Please sign in to comment.