Skip to content

Commit

Permalink
fix(uwg): Loosen the check of bld fractions
Browse files Browse the repository at this point in the history
This is way too strict given Python floating point tolerance and the number of buildings we might have.
  • Loading branch information
chriswmackey authored and Chris Mackey committed Nov 11, 2021
1 parent 4796a2d commit 4c06981
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/parameters/initialize_fatal_error.uwg
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ SchTraffic,
# New

bld,
LargeOffice, Pst80, 0.64
LargeOffice, Pst80, 0.66
MidRiseApartment, Pst80, 0.221
Warehouse, Pst80, 0.138

Expand Down
2 changes: 1 addition & 1 deletion uwg/uwg.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ def bld(self, value):
'fraction of total built stock. Got: {}.'.format(frac)
total_frac += frac

assert abs(total_frac - 1.0) < 1e-10, 'The sum of reference building ' \
assert abs(total_frac - 1.0) < 1e-2, 'The sum of reference building ' \
'fractions defined in bld must equal one. Got: {}.'.format(
total_frac)

Expand Down

0 comments on commit 4c06981

Please sign in to comment.