Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Describe the uncertainty in the amount of damaged components needed to
trigger a red tag for the building. All Fragility Groups are handled in
the same multivariate distribution. Consequently, correlation between
various groups of component proportion limits can be specified. See
_create_RV_red_tags() for details.
6. Injuries
Describe the uncertainty in the proportion of people in the affected
area getting injuries exceeding a certain level of severity. FEMA P58
uses two severity levels: injury and fatality. Both levels for all
Fragility Groups are handled in the same multivariate distribution.
Consequently, correlation between various groups of component injury
expectations can be specified. See _create_RV_injuries() for details.
"""
super(FEMA_P58_Assessment, self).define_random_variables()
# create the random variables -----------------------------------------
DEP = self._AIM_in['dependencies']
self._RV_dict = {}
# quantities 100
self._RV_dict.update({'QNT':
self._create_RV_quantities(DEP['quantities'])})
# fragilities 300
s_fg_keys = sorted(self._FG_in.keys())
for c_id, c_name in enumerate(s_fg_keys):
comp = self._FG_in[c_name]
self._RV_dict.update({
EDP_input_path = EDP_files[s_i]
# and try to auto-populate the loss model using the BIM information
DL_input, DL_input_path = auto_populate(DL_input_path, EDP_input_path,
DL_method, realization_count,
coupled_EDP, event_time,
ground_failure)
DL_method = DL_input['DamageAndLoss']['_method']
stripe_str = '' if len(stripes) == 1 else str(stripe)+'_'
if DL_method == 'FEMA P58':
A = FEMA_P58_Assessment(log_file=log_file)
elif DL_method in ['HAZUS MH EQ', 'HAZUS MH', 'HAZUS MH EQ IM']:
A = HAZUS_Assessment(hazard = 'EQ', log_file=log_file)
elif DL_method == 'HAZUS MH HU':
A = HAZUS_Assessment(hazard = 'HU', log_file=log_file)
A.read_inputs(DL_input_path, EDP_files[s_i], verbose=False) # make DL inputs into array of all BIM files
A.define_random_variables()
A.define_loss_model()
A.calculate_damage()
A.calculate_losses()
A.aggregate_results()