temp bug fix: round negative population values to zero

Former-commit-id: fdb6e6fc3f43b9133bdc029fca7c6d8ae9c77cfc
This commit is contained in:
Michael T. Kelbaugh
2020-04-02 08:42:54 -04:00
parent df00bf4d47
commit 975991ce3a

View File

@@ -23,7 +23,8 @@ def pop_sim(init_data, num_increments):
last_inc = int(max(data[key].keys()))
for inc, value in zip(range(num_increments), future_pop):
data[key][str(last_inc + 1 + inc)] = value
# round negative population values to 0
data[key][str(last_inc + 1 + inc)] = value if value > 0 else 0
return data