Skip to content

Commit be67659

Browse files
committed
Limit forecasting window to one month #560
Limit forecasting window to one month #560 Setting "number of days to project" min is 1, max is 30
1 parent fa3a772 commit be67659

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

defaults/webapp.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
--icu-rate 0.0075
88
--infectious-days 10
99
--market-share 0.15
10-
--n-days 100
10+
--n-days 30
1111
--population 3600000
1212
--recovered 0
1313
--relative-contact-rate 0.45

src/penn_chime/model/parameters.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ def validate(string):
152152
"mitigation_date": "Date on which social distancing measures too effect",
153153
"market_share": "Hospital market share (0.00001 - 1.0)",
154154
"max_y_axis": "Max y-axis",
155-
"n_days": "Number of days to project >= 0",
155+
"n_days": "Number of days to project >= 1 and less than 30",
156156
"parameters": "Parameters file",
157157
"population": "Regional population >= 1",
158158
"recovered": "Number of patients already recovered (not yet implemented)",
@@ -258,8 +258,8 @@ def validate(string):
258258
(
259259
"n-days",
260260
int,
261-
0,
262-
None,
261+
1,
262+
30,
263263
True,
264264
),
265265
(

src/penn_chime/view/st_display.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ def display_sidebar(st, d: Parameters) -> Parameters:
193193
n_days_input = NumberInput(
194194
st_obj,
195195
"Number of days to project",
196-
min_value=30,
196+
min_value=1,
197+
max_value=30,
197198
value=d.n_days,
198199
step=1,
199200
format="%i",

0 commit comments

Comments
 (0)