Skip to content

Commit

Permalink
fix of door open after 1st perc. (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
kowalskiw committed Feb 26, 2024
1 parent d613a2a commit 6e300a4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions montecarlo/cfast_mcarlo.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,14 @@ def _section_doors_and_holes(self):# {{{
''' Randomize how doors are opened/close. '''

pre_evac = self.conf['pre_evac']
try:
first_percentile = pre_evac['1st']
except KeyError:
if pre_evac['mean'] and pre_evac['sd']:
# if distribution parameters are given
first_percentile = round(lognorm_percentiles_from_params(pre_evac['mean'], pre_evac['sd'])[0], 1)
elif pre_evac['1st'] and pre_evac['99th']:
# if percentiles are given
first_percentile = pre_evac['1st']
else:
raise ValueError(f'Invalid pre-evacuation time input data - check the form.')

txt=['!! SECTION DOORS AND HOLES']
hvents_setup = self.samples['hvents']
Expand Down

0 comments on commit 6e300a4

Please sign in to comment.