Skip to content

Commit 4c06981

Browse files
chriswmackeyChris Mackey
authored andcommitted
fix(uwg): Loosen the check of bld fractions
This is way too strict given Python floating point tolerance and the number of buildings we might have.
1 parent 4796a2d commit 4c06981

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/parameters/initialize_fatal_error.uwg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ SchTraffic,
8080
# New
8181

8282
bld,
83-
LargeOffice, Pst80, 0.64
83+
LargeOffice, Pst80, 0.66
8484
MidRiseApartment, Pst80, 0.221
8585
Warehouse, Pst80, 0.138
8686

uwg/uwg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ def bld(self, value):
793793
'fraction of total built stock. Got: {}.'.format(frac)
794794
total_frac += frac
795795

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

0 commit comments

Comments
 (0)