Skip to content

Commit 94d4e0e

Browse files
committed
fix(other_functionality): fire suppression keycheck
- matched key (recovery_day['building'] -> ['fire_suppression']). this matches matlab code. - amax to fmax to fix array size reduction and element-wise matching. this fix is previously precedented in commit 1522d04
1 parent 7aae702 commit 94d4e0e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/atc138/functionality/other_functionality_functions.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def fn_building_safety(damage, building_model, damage_consequences, utilities,
103103
recovery_day['fire_suppression'] = np.fmax(recovery_day['fire_suppression'], np.amax(repair_complete_day[:,damage['fnc_filters']['fire_building']], axis=1))
104104

105105
# Consider utilities (assume no backup water supply)
106-
recovery_day['fire_suppression'] = np.fmax(recovery_day['building']['fire'], np.array(utilities['water'])) # Assumes building does not have backup water supply
106+
recovery_day['fire_suppression'] = np.fmax(recovery_day['fire_suppression'], np.array(utilities['water'])) # Assumes building does not have backup water supply
107107

108108
# Componet Breakdowns
109109
comp_breakdowns['fire_suppression'][:,:,tu] = damage['fnc_filters']['fire_building'] * repair_complete_day
@@ -297,7 +297,7 @@ def fn_building_safety(damage, building_model, damage_consequences, utilities,
297297
# Add days to components that are affecting occupancy
298298
contributing_drops = ((damaged_comps * filt_fs_drop) > 0) * np.logical_not(fire_drop_operational).reshape(num_reals,1) #count all components that contributed to non operational fire drops
299299
contributing_branches = ((damaged_comps * filt_fs_drop) > 0) * np.logical_not(fire_branch_operational).reshape(num_reals,1) # count all components that contributed to non operational fire drops
300-
contributing_comps = np.amax(contributing_drops, contributing_branches)
300+
contributing_comps = np.fmax(contributing_drops, contributing_branches)
301301
comp_breakdowns_local_fire[:,:,tu] = comp_breakdowns_local_fire[:,:,tu] + contributing_comps * delta_day.reshape(num_reals,1)
302302

303303
# Change the comps for the next increment

0 commit comments

Comments
 (0)