NATL INST. OF STAND & TECH R I.C. Reference

-A'i 1 WD

1

—NBSIR 80-1982

BFIRES/Version 2: Documentation of

Program Modifications

Fred I. Stahl

Environmental Design Research Division

Center for Building Technology

National Engineering Laboratory

National Bureau of Standards

U S. Department of Commerce

Washington, D.C. 20234

March 1980

Developed with the partial assistance of the

Center for Fire Research, in support of the

HEW-NBS Fire/Life Safety Program

-QC * 100

U56

80-1982

1980
''i

1

1
NBSIR 80-1982

BFIRES/VERSION 2: DOCUMENTATION OF

PROGRAM MODIFICATIONS

national bursau or 8TANSAKB8

UBBABT

SEP i 9 1980

3

/' '

Fred I. Stahl

Environmental Design Research Division

Center for Building Technology

National Engineering Laboratory

National Bureau of Standards

U S. Department of Commerce

Washington, D.C. 20234

March 1980

Developed with the partial assistance of the

Center for Fire Research, in support of the

HEW-NBS Fire/Life Safety Program

OF

o

U.S. DEPARTMENT OF COMMERCE, Philip M. Klutznick, Secretary

Luther H. Hodges, Jr.. Deputy Secretary

Jordan J. Baruch, Assistant Secretary for Productivity. Technology, and Innovation

NATIONAL BUREAU OF STANDARDS, Ernest Ambler, Director
Uaju tm jak«mta«

'aAiiiiu

xe! 1 1 <^^z

- .Jk

}n w(Arvi3»tuDOO, -.s wowoly e

awrriiastuoM ma i0Ofl«i

r->> 1k^ ‘kl

, .»i.

' '

' *./ • -’ii

<S^

- >

.

^ (5 .' J

.-

• ''-il!.

' .>*“'* £i«7C. . JiM Ir lWc43

1 ...•« ^ ^ XS/wAm

r\ <Wv'i'i

-»,- '. it)^ *!>

‘

' • • fehoilW ^

']

®4i ^ .

(I? > ’•::'1iM

' -

1

*’i tP8 JfA '

I* l^n»w » «vt/0

3^

-r'

' '.

,‘Vii*^ ‘ d ((''^#^ ..’U* H ter^ifUj'

*p

fpititntA jti^a|\itoA'^3V*ATfc iAViOn/s yf g'

{ -^ *.g. i*"TM
TABLE OF CONTENTS

Page

LIST OF FIGURES iv

LIST OF TABLES v

ACKNOWLEDGEMENTS vi

ABSTRACT vii

1.0 INTRODUCTION 1

1.1 Purpose of this Report 1 1.2 Factors Limiting the Usefulness of BFIRES I 1 1.3 Specific Modifications of BFIRES I Included in BFIRES II

and Covered by this Report 2

2.0 SIMULATION OF DIRECT INTERACTIONS BETWEEN OCCUPANTS

AND SMOKE: THE "SMOKE" MODULE 4

2.1 Subroutine SPREAD 4

2.2 Subroutine SMOKE 4

2.3 Subroutine KTOXIC 4

2.4 Subroutine SBIAS 5

3.0 SIMULATION OF RESCUE ACTIVITIES; THE "RESCUE" MODULE 23

3.1 Subroutine RESCUE 23

3.2 Subroutine HELPRl 23

3.3 Subroutine HELPR2 24

3.4 Subroutine HELPR3 24

3.5 Surboutine HELPED 24

4.0 EXPANDED INPUT/OUTPUT AND UTILITY FEATURES 42

4.1 Subroutines INEXEC, INBLDG, and INOCC 42

4.2 Subroutines PLOT, SMKSUM, and HLPSUM 42

4.3 Subroutine INITLZ, INITFR, and CMPUTE 43

5.0 MODIFICATIONS TO BFIRES/VERSION 1 ROUTINES 59

5.1 EXEC2 59

5.2 Subroutine ASSIGN 59

6.0 SUMMARY 85

7.0 REFERENCES 86

APPENDIX A. BFIRES Listing 87

ili
LIST OF FIGURES

Page

Figure

1.1 Multi-level Structure of BFIRES /VERS ION 2 3

2.1 Flow Chart for Subroutine SPREAD 7

2.2 Flow Chart for Subroutine SMOKE 9

2.3 Flow Chart for Subroutine KTOXIC 17

2.4 Flow Chart for Subroutine SBIAS 19

3.1 Flow Chart for Subroutine RESCUE 26

3.2 Flow Chart for Subroutine HELPRl 29

3.3 Flow Chart for Subroutine HELPR2 35

3.4 Flow Chart for Subroutine HELPR3 37

3.5 Flow Chart for Subroutine HELPED 39

4.2a Sample Output from the PLOT Option 51

4.2b Sample Output from the SMKSUM Option 53

4.2c Sample Output from the HLPSUM Option 55

5.1 Flow Chart for EXEC2 60

5.2 Flow Chart for Subroutine ASSIGN 76

Iv
LIST OF TABLES

Table Page

2.1 Subroutine SPREAD: FORTRAN Listing 8

2.2 Subroutine SMOKE: FORTRAN Listing 15

2.3 Subroutine KTOXIC: FORTRAN Listing 18

2.4 Subroutine SBIAS: FORTRAN Listing 22

3.1 Subroutine RESCUE: FORTRAN Listing 28

3.2 Subroutine HELPRl: FORTRAN Listing 34

3.3 Subroutine HELPR2 : FORTRAN Listing 36

3.4 Subroutine HELPR3: FORTRAN Listing 38

3.5 Subroutine HELPED: FORTRAN Listing 41

4.1a Subroutine INEXEC: FORTRAN Listing 45

4.1b Subroutine INBLDG: FORTRAN Listing 46

4.2c Subroutine INOCC: FORTRAN Listing 47

4. Id Typical Input Data File, Indicating General

File Organization and Structure 48

4.2a Subroutine PLOT: FORTRAN Listing 50

4.2b Subroutine SMKSUM: FORTRAN Listing 52

4.2c Subroutine HLPSUM: FORTRAN Listing 54

4.3a Subroutine INITLZ: FORTRAN Listing 56

4.3b Subroutine INITFR: FORTRAN Listing 57

4.3c Subroutine CMPUTE: FORTRAN Listing 58

5.1 EXEC2: FORTRAN Listing 69

5.2 Subroutine ASSIGN: FORTRAN Listing 82

V
ACKNOWLEDGEMENTS

The Environmental Design Research Division, Center for Building Technology, National Bureau of Standards (NBS), is developing a more comprehensive understanding of pedestrian movement within buildings. The

responses of building occupants during fire emergencies is an important

part of this overall effort.

This report documents a continuation of an effort to develop a computer

simulation of human egress behavior during fires, which was originally

undertaken for the NBS Center for Fire Research through its HEW-NBS

Fire/Life Safety Program. Modifications of the BFIRES computer discussed

in this report were prepared under the sponsorship of the Center for

Building Technology.

The author gratefully acknowledges Mr. Brian Pierman, Dr. Stephen Margulis

and Dr. Robert Glass of the Center for Building Technology, and Mr. Jeff

Shi be of the Center for Fire Research, for their reviews of the report's

clarity and technical accuracy. The author also wishes to thank the staff

of the Center for Building Technology Word Processing Center who prepared

various versions of the manuscript.

Vi
ABSTRACT

Several limitations to the use of BFIRES/VERSION 1 are discussed. Chief

among these are the program's inability to simulate rescue activities during fire events, and to simulate direct interactions between occupant

behavior and toxic qualities of smoke filled environments. This report

documents a revised program, BFIRES/VERSION 2, which contains new subroutines developed to mitigate these problems. These subroutines are grouped into two modules: (1) a "smoke" module designed to simulate the

experience of inhabiting a smoke filled environment, and (2) a "rescue"

module intended to permit the rescue of physically Immobile occupants.

Additional improvements incorporated into BFIRES/VERSION 2 involve more

efficient file management and data input facilities, and expanded output

capabilities.

Key Words: Architectural research; building Fires, computer-aided design,

environmental psychology, fire research, fire safety, human

behavior in fires; modeling technique, programming, simulation

of human behavior.

vii
• r|#iTj

,0’ '^ _ . ..

'

.' hifn h^JJi' -jicHW ioiv^»dl

M >Uilti)t .S bwllvW^e •5n*«W«(04f'

-»r '3 ^* h,»'»;1F • .lapeitoaiA’ «t^5N^-

. * *)r()

r J:47»llji>t

U4A l»itx(><cvij|% J* ' i5*'1 *xi!t

^ '.... ;!• '.*«. nt, »* ;a»\ri yori.Ut*^

•*

*#0

^ -r- w ^ - -s t ^ ... »• < " , "^T?; 'fc f\mv^

i

ir,,

'’

• n'ijru# -.^jbiMJinfgoi •{ .-srtpjft.^iwwr

:

Vr«dS^^f

"%~y

^ *

V .4'^ L

' I '} ii^

1^4 -C' w \f

-{ “, *

.

• Ur

jj in'

;i

.4 <Va^

t w

'-t

!*'«» - ’ <«

' 2k'
BFIRES/VERSION 2: Documentation of Program Modifications

1.0 INTRODUCTION

1.1 Purpose of this Report

This report documents recent modifications to BFIRES, a computer program

designed to simulate the emergency egress behavior of building occupants

during fires. Documentation of BFIRES/VERSION 1 (BFIRES I) is available

in a previous publication of the National Bureau of Standards (NBS)

(Stahl, 1979). The current report presents BFIRES/VERSION 2 (BFIRES II),

and documents modifications of and additions to the original computer program. This report is meant as a companion to the earlier publication. As a convenience to the reader, however, a complete FORTRAN listing of BFIRES

is provided in an appendix to the current document.

This document is not a user's manual. It does not provide specific

instructions for defining simulation problems, setting up BFIRES input

files, executing simulation experiments, or for interpreting and using

BFIRES output. A separate user's manual is currently in preparation.

However, Table 5.1 of this report contains basic information necessary

for preparing input files and for using BFIRES II, although detailed

questions concerning the program's use should be directed to the author.

1 .2 Factors Limiting the Usefulness of BFIRES I

The technical approach underlying BFIRES is based on a stochastic

dynamic model of building fire events. Human decisionmaking and behavior are simulated (a) in responae to environmental and social stimuli

which carry information about the state of the fire event over time, and

(b) under the premise that perception and cognition bias rather than

determine human actions in the environment.

Several factors severely limit the overall applicability of BFIRES I, and

these are specifically addressed by the modlHcatlons documented in this

report. For example, BFIRES I does not permit the user to simulate

direct interactions between building occupants and toxic agents (as

typically occur when an occupant inhabits a room or space which has been

infiltrated by fire or smoke), Instead, that program simulates occupants'

responses to information about a fire occurring in some other part of the

building. Thus, the application of BFIRES I requires the user to assume

that (a) the fire ignition point is reasonably distant from the floor or area under direct study, (b) occupants of the area under study have

obtained information about the fire's presence, and (c) the emergency

escape activity will not be noticeably affected by any migration of toxicants from the point of ignition to the occupied area. Another Important

1 The BFIRES II user's manual is expected to be available during the fall

of 1980.

1
/

shortcoming of BFIRES I Is its inability to simulate rescue activities,

particularly those which might be <r«quired to remove jnonambulatory occupants from healthcare facilities. Finally, the construction of BFIRES

I data input files appears to be unecessarily complex from the user's

vi ewpoint.

1.3 Specific Modifications of BFIRES I Included in BFIRES II and

Covered by this Report

BFIRES II contains several new subroutines specifically designed to solve

the problems described above. Most of these subroutines are clustered

into two "modules." One module simulates direct interactions between

occupants and toxicants (the SMOKE module ), while the other addresses

the problem of rescuing nonamubatory occupants (the RESCUE module) . A

number of additional subroutines enhance the input /output (I/O) capabilities of BFIRES. Finally BFIRES I subroutines EXEC and ASSIGN are restructured to accomodate the new modules and expand the program's I/O

facilities

.

New subroutines and modifications of existing ones are documented in

Chapters 2 through 5. Subroutines are grouped for presentation in relation to their superordinate modules, and the function and operation of

each subroutine is described. Flow diagrams and FORTRAN listings are also provided. The multi-level structure of BFIRES II is illustrated in

Figure 1.1.^

1 Figures and Tables appear at the ends of chapters to which they

refer.

r

2
Figure 1.1 Multi-level Structure of BFIRES /VERSION 2

3
2.0 SIMULATION OF DIRECT INTERACTIONS BETWEEN OCCUPANTS AND SMOKE:

THE "SMOKE" MODULE

2.1 Subroutine SPREAD

2.1.1 Function

The functions of subroutine SPREAD are to (1) determine the rate of smoke

migration in the simulated environment, and (2) affect simulated smoke

migration. To simplify the physical aspects of the problem, movement of

toxicants through the environment is treated as a simple diffusion process, by which a point source expands into an increasingly larger "smoke"

zone, as time advances. The rate of expansion may be adjusted by the

user, through the specification of input parameter ISRATE. Thus, if

ISRATE is set equal to 1, then the smoke zone will expand one spatial

unit per time unit^. Similarly, if ISRATE is specified as 3, then the

smoke zone will expand one spatial unit every three time units, and so

on. SPREAD affects simulated smoke migration by calling subroutine

S^^0KE. This routine is discussed below. Refer to the flow chart shown

in Figure 2.1 and the Fortran listing given in Table 2.1.

2.2 Subroutine SMOKE

2.2.1 Function

This subroutine causes person-occupiable spatial locations to become

Infiltrated by "smoke" (toxic fire products), at a rate determined by

subroutine SPREAD. Although smoke migration is assumed to occur radially

from a point source, it may be blocked by the intrusion of walls or closed doors. Subroutine SMOKE scans spatial locations in the path of

the expanding smoke zone, and determines which potential locations will

be blocked during the current time frame. Thus, only those points not

blocked by walls or closed doors will be Infiltrated at a given point in

time. See Figure 2.2 and Table 2.2.

2.3 Subroutine KTOXIC

This routine maintains an up-to-date count of the number of time frames

each occupant has spent in the smoke-filled environment. This function

is provided under the assumption that as the length of time during which

a person has occupied a toxic environment increases, the deleterious

effects of the toxicants upon cognitive and motor behavior increase as well (Phillips, 1973; Berl and Halpin, 1978). Questions pertaining to

visibility through smoke and to the actual composition of toxicants are separate issues which are treated neither within KTOXIC nor BFIRESII in

general. See Figure 2.3 and Table 2.3

1 This Is acknowledged to be an oversimplification of smoke migration,

which may vary in rate, direction and Intensity over time.

4
2.4 Subroutine SBIAS

2.4.1 Function

This program biases an occupant’s decision making behavior to favor movement toward smoke-free spatial locations. The occupant’s immediate movement options are first scanned, and the location of Infiltrated alternatives are identified. The probabilities of selecting the various options

(first specified by subroutine TBIAS or EBIAS) are then reformulated,

biasing in favor of the noninfiltrated spatial locations. This is accomplished by reducing the liklihood that the occupant will move toward a smoke-filled point, and by then redistributing the difference among noninfiltrated locations (so that the sum of the probabilities for all spatial

moves is 1.00).

2.4.2 Computational Formulas

The reduction factor is computed by the equation

REDN(K) = P(K)/TSM0KE(N) (1)

where:

REDN(K) = reduction factor,

P(K) = the probability that occupant will move toward location

K during time t (see Stahl, 19/9, pp. 2-5), and

TSMDKE(N) = occupant^’s tolerance for occupying a smoke-filled

environment

.

The distribution factor is computed by the equation

DISTR = SUMRED/NUMCLR (2)

where:

DISTR = distribution factor,

SUMRED = the sum of the reduction factors computed for

all smoke-infiltrated points, and

NUMCLR = the number of smoke-free points.

The revised probability of moving toward a smoke-free point is computed

by the equation.

PNEW = P(K) + DISTR (3)

where

5
PNEW = the revised probability that occupant^ will approach

location K during t,

P(K) = the original probability that location K will be

approached during t, and

DISTR = the distribution factor.

The revised probability of moving toward a smoke-infiltrated location is

computed by the equation

PNEW = P(K) - R£UN(K) ( 4 )

where; PNEW = the revised probability that occupant^^ will approach

location K during t, n

P(K) = the original probability that location K will be

approached during t, and

REDN(K) = the reduction factor for location K.

Refer to Figure 2.4 and Table 2.4.

6
Figure 2.1 Flow Chart for Subroutine SPREAD

7
1n3

45

6

7

8

9

10

1

1

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

nnnnnnnnnnn SUBROUTINE SPREAD

THIS ROUTINE DETERMINES RATE OF SMOKE SPREADf BASED ON A USER

INPUT PARAMETER. THE ROUTINE THEN CALLS ’SMOKE* f WHICH SPREADS

SMOKE AS REQUIRED.

SUBROUTINE SPREAD ( ISMOKE f I BAR » IDOOR

»

NPOINT , MAXX . MAXY

»

1 NSPACEfNDrISRATE.ITIME)

DIMENSION I SMOKE ( 100 » 100) » IBAR < 20 f 75 » 2 ) . ID00R(30»4)

»

1 NPOINT <20)

RATE=ISRATE

TIME=ITIME

A=TIME/RATE

I=A

B=I

C=A-B

IF (C.GT. 0.001) GO TO 100

CALL SMOKE ( ISMOKE. IBARr IDOOR»NPOINT,MAXXf MAXY»

1 NSPACE.ND)

100 CONTINUE

RETURN

END

2. 1 Subroutine SPREAD; FORTRAN Listing

8
YES

JJ - MAXY

c START 3

^ f

JJ - 0

>

JJ - JJ + 2

\ f

II - 0

/

NO

\

C YES

II - MAXX

NO

N

'

II - II + 2

ISMOKE(II,JJ) - 1

YES

IX -

lY -

IIJJ

NO

Figure 2.2 Flow Chart for Subroutine SMOKE

Search smoke matrix for all recently-smoked

points (i.e.,

points for which

ISM0KE(X,Y)=1)

9
For each recently smoked

point, test all potential spread

points

10
o

11
o

Point not blocked by a

. closed door; check for blocking due to

a wall

12
13
o

jr

ISMOKE (IX, lY] - 2

Relable start point from "recently" to "formerly" Infiltrated

14
1n

3

4

5

6

7

B

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

53

54

55

56

57

58

59

60

C

C

C

CC SUBROUTINE SMOKE

C

C THIS SUBROUTINE CAUSES PERSON-OCCUPIABLE LOCATIONS TO BECOME INFILTRATED

C BY SMOKE. SMOKE MIGRATION MAY BE BLOCKED BY WALLS (DETERMINISTIC) r AND

C BY CLOSED DOORS (STOCHASTIC).

C SUBROUTINE SMOKE ( ISMOKE » IBAR » IDOOR » NPO I NT » MAXX » MAX Y r NSPACE f ND

)

INTEGER X»Y

DIMENSION ISM0KE(100»100) »ID00R(30»4) »IBAR(20f75»2) »NP0INT(20)

C SEARCH SMOKE MATRIX FOR ALL RECENTLY SMOKED POINTSf I.E.» POINTS FOR WHICH

C ISM0KE=1

JJ=0

300 JJ=JJ+2

11=0

301 IF (II. EQ. MAXX) GO TO 302

11 = 11+2

IF (ISMOKE(II»JJ).EQ.l) GO TO 101

GO TO 301

302 IF (JJ.EQ.MAXY) GO TO 100

GO TO 300

101 IX=II

IY=JJ

C FOR EACH RECENTLY SMOKED POINT » TEST ALL POTENTIAL-SPREAD-POINTS. SPREAD

C SMOKE AS DETERMINED BY BLOCKING CONDITIONS

DO 200 1=1 »8

GO TO (If2f3>4f5f6f7»8)»l

1 X=IX-2

Y=IY-2

GO TO 9

2 X=IX

Y=IY-2

GO TO 9

3 X=IX+2

Y=IY-2

GO TO 9

4 X=IX-2

Y=IY

GO TO 9

5 X=IX+2

Y=IY

GO TO 9

6 X=IX-2

Y=IY+2

GO TO 9

7 X=IX

Y=IY+2

GO TO 9

8 X=IX+2

Y=IY+2

9 CONTINUE

IBL0CK=(X+IX)/2

JBL0CK=(Y+IY)/2

C CHECK POTENTIAL-SPREAD-POINT TO DETERMINE WHETHER IT IS ALREADY SMOKED.

IF (ISMOKE(XfY) .GT.O) GO TO 200

C CHECK POTENTIAL-SPREAD-POINT FOR BLOCKING DUE TO A CLOSED DOOR

JX=0

Table 2.2 Subroutine SMOKE; FORTRAN Listing

15
61

62

'63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

KX=1

11 JX=JX+1

IF (HX.GT.ND) GO TO 41

IF (IDOOR< JX»KX> .EQ.IBLOCK) GO TO 10

GO TO 11

10 KX=2

IF (IDOOR(JX»KX) .EQ. JBLOCK) GO TO 12

KX=1

GO TO 11 12 IF (ID00R(JX»4).EQ.l) GO TO 50

GO TO 200

41 CONTINUE

C CHECK FOR BLOCKING DUE TO A WALL

IS=0

15 LX=0

MX=1

13 IS=IS+1

IF (IS.GT.NSPACE) GO TO 42

14 LX=LX+1

IF (LX.GT.NPOINT(IS) ) GO TO 15

IF (IBAR(IS»LX»MX).EQ.IBLOCK) GO TO 16

GO TO 14

16 MX=2

IF <IBAR<IS»LXfMX) ,EQ. JBLOCK) GO TO 200

MX=1

GO TO 14

42 CONTINUE

50 ISM0KE<X»Y)=9

200 CONTINUE

C RE-LABEL STARTING POINT FROM RECENTLY-SMOKED TO FORMERLY-SMOKED

ISM0KE(IX»IY)=2

GO TO 301

C LABEL UNBLOCKED POINT AS NEWLY SMOKED

100 CONTINUE

DO 400 N=2fMAXY»2

DO 400 M=2»MAXX»2

IF (ISMOKE(M»N) .EQ.9) GO TO 401

GO TO 400

401 ISMOKE<MrN)=l

400 CONTINUE

RETURN

END

16
START c

'V

I - XO(NTHIS)

J - YO(NTHIS)

If occ^ is at a smoke- infiltrated

location. Increase his smoke-count by 1

YES

*

ITOXIC(NTHIS - IT0XIC(NTHIS)+1

i

c

£ c

RETURN )

Figure 2.3 Flow Chart for Subroutine KTOXIC

17
SUBROUTINE KTOXIC

12

3

4

5

6

7

8

9

10

1112

13

14

15

16

17

18

19

20

21

22

23

24

C

c

c

cc

cC THIS PROGRAM COUNTS THE NUMBER OF TIME FRAMES EACH OCCUPANT HAS SPENT AT

C SMOKED POINTS.

C SUBROUTINE KTOXIC ( ITIME » NTHIS » IHANDI » INT » IBYSTD » lEUAL

1 XO F YO » I BAR F XT F YT f NAGREE f XE f YE f I AGREE f IRAND f P f MOVE f XK f 2 YKfKfLfISfIGOALXfIGOALYfIENTERfXfIDOORfPOPENfNDfMDOORf

3 PCLOSEfNOEXPfLOWEXPfIHIEXPfITOTALfISMOKEfTSMOKEfITOXIC)

INTEGER X0(20) fY0(20>

DIMENSION ISMOKE(IOOfIOO) fIT0XIC<20)

C DETERMINE WHETHER THE OCCUPANT IS CURRENTLY AT A SMOKED POINT. IF SOf

C INCREASE HIS TOTAL COUNT BY 1. I=XO<NTHIS)

J=YO(NTHIS)

IF (ISMOKE(IfJ) .GT.O) GO TO 100

GO TO 110

100 IT0XIC(NTHIS)=IT0XIC(NTHIS)+1

110 RETURN

END

Table 2.3 Subroutine KTOXIC: FORTRAN Listing

18
Determine whether ocCj^'s move alternatives

are smoke- infiltrated

Figure 2.4 Flow Chart for Subroutine SBIAS

19
o

-J KSM0KE(K)-1

KLEAR-NUMCLRHJUMIMP

Redistribute

weights, biasing

the uninfiltrated

locations. Compute the reduction factor.

R£DN(K) - P(K)/TSMOKE(NTHIS)

20
o

21
1n

3

45

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

C

C

CC

C SUBROUTINE SB I AS

C

C THIS ROUTINE BIASES AN OCCUPANT'S DECISION MAKING TO

C FAVOR NON-SMOKED SPATIAL LOCATIONS.

C SUBROUTINE SBIAS ( I TINE » NTHIS r IHANDI » I NT » I BYSTD » lEVAL

»

1 XO»YO» IBAR»TOTBAR»XTrYT»NAGREE»XEr YE» IAGREE» IRANDf

2 PfMOVEfXKf YKrK»L»IS»IGOALX» IGOALY»IENTER»X»IDOOR»

3 POPEN»NDf MDOOR>PCLOSE»NOEXPf LOWEXPf IHIEXPf ITOTALf

4 ISMOKE»TSMOKE)

DIMENSION P(9) » ISMOKEC 100. 100) . KSMOKE ( 9 ) . REDN ( 9

)

INTEGER TSM0KE(20) fXK.YK

C DETERMINE WHETHER MOVE ALTERNATIVES ARE SMOKED

NUMIMP=0

NUMCLR=0

DO 100 K=1.9

IF <P(K) ,Ea.O. > GO TO 110

GO TO 120

110 NUMIMP=NUMIMP+1

GO TO 140

120 CALL KTOXY < ITIME . NTHIS . IHANDI . I NT . IBYSTD . lEVAL

.

1 XO.YO.IBAR.TOTBAR.XT.YT.NAGREE.XE.YE.IAGREE.IRAND.

2 P.MOVE.XK.YK.K)

IF ( ISMOKE(XK. YK) .GT.O) GO TO 130

KSMOKE (K)=0

NUMCLR=NUMCLR+1

GO TO 140

130 KSMOKE <K)=1 ’ 140 KLEAR=NUMCLR+NUMIMP

100 CONTINUE

IF ( <KLEAR,EQ.9) .OR. (NUMCLR.EQ.O) ) GO TO 400

C REDISTRIBUTE WEIGHTS. FAVORING UNSMOKED LOCATIONS

C COMPUTE REDUCTION FACTOR. REDN(K). AND SUMRED

SUMRED=0.

DO 200 K=1.9

IF (P(K).EO.O.) GO TO 200

IF (KSMOKE(K) ,EQ.O) GO TO 200

REDN(K)=P(K)/TSMOKE( NTHIS)

200 SUMRED=SUMRED+REDN<K)

C COMPUTE DISTR

DISTR=SUMRED/NUMCLR

C COMPUTE NEW P(K) VALUES

DO 300 K=1.9

IF (KSMOKE(K) .EQ. 1 ) GO TO 310

PNEW=P(K)+DISTR

GO TO 320

310 PNEW=P<K)-REDN(K)

320 P(K)=PNEW

300 CONTINUE

400 RETURN

END

2 . 4 Subroutine SBI AS: FORTRAN Listing

22
3.0

SIMULATION OF RESCUE ACTIVITIES; THE "RESCUE" MODULE

3.1 Subroutine RESCUE

3.1.1 Function

This routine Is called whenever a preassigned rescuer (or "helper") Is

being processed, during a time frame. Helpers differ from other occupants In the sense that the user must specify for each helper the location of a single person-to-be-helped (PTBH), and a non-zero probability

of actually engaging In the helping activity.

If the current time frame Is the Initial frame (l.e., If t°l), then RESCUE first establishes (probabilistically) whether helper engages In the

rescue task (through a Call to subroutine HELPRl, descried below). If

not, then this simulated occupant will be treated as a non-helper during

the remainder of the simulated fire event. If the helper does engage in

the rescue activity, then repeated calls to RESCUE, as time advances,

will serve the functions of (1) moving the helper to the location of the

PTBH, and then (2) moving the helper-PTBH pair toward the exit goal^.

These tasks are accomplished within RESCUE by calls to subroutines

HELPERl and HELPR3, which are discussed below. Subroutine RESCUE Is further described In Figure 3.1 and Table 3.1.

3.2 Subroutine HELPRl

3.2.1

Function

During the initial time frame (t*l), RESCUE calls upon HELPERl to establish whether a preassigned rescuer engages In helping. This Is accomplished hy comparing the user-defined probability that helper^ will Infant engage In the rescue task (Input parameter PHELP) against a random

number generated by the conq>uter. If the helper "decides" to rescue,

then HELPRl changes his movement goal to assure that subsequent movement

decisions lead him to the location of his preassigned PTBH. As the simulated event progresses over time, HELPRl maintains the helper on a proper

course toward the PTBH. As with a pedestrian movement generated by other

aspects of BFIRES, movement by a helper toward a PTBH is biased rather

than fully determined. Thus, simulated helpers may traverse less-thanperfect routes while locating occupants to be rescued. This phenomenon

Is expected to conform with actual behavior during real emergencies, as noted in anecdotal reports of actual fires (refer also to Archea, 1979).

The term "exit goal" may refer to entry Into stair enclosure, passage

through a horizontal exit, or to having reached some preassigned staging

area.

23
3.2.2 Computational Formulas

Whether or not a helper engages in the rescue task is computed in the

following manner:

q = PHELP(N) - X (5)

where:

q = either a positive, negative, or zero result, such that

for negative and zero outcomes, the helper will not

engage in rescue; for positive outcomes, the helper will , rescue,

PHELP(N) = the user-defined probability (between 0 and 1) that

helper^ will engage in the rescue task, and

(X) = a random number between 0 and 1 generated by the

computer.

Refer to Figure 3.2 and Table 3.2.

3.3

Subroutine HELPR2

3.3.1 Function

This routine identifies the time frame during which a helper reaches his

PTBH. See Figure 3.3 and Table 3.3

3.4 Subroutine HELPR3

3.4.1 Function

After a helper reaches his preassigned PTBH, three tasks must be accomplished. First, the helper's movement objective must be changed from

the location of the PTBH back to the location of the exit goal. Second,

the helper's movement speed must be slowed in recognition of the fact

that assisting a nonambulatory occupant may be difficult and energy con- suming (see Archea, 1979)^. Finally, the PTBH must be "moved along with"

the rescuer, at the reduced rate of speed. This last task is accomplished

through Subroutine HELPED, described below. See Figure 3.4 and Table 3.4.

3.5 Subroutine HELPED

3.5.1

Function

This routine causes the person-to-be-helped (PTBH) to remain with the

assigned helper throughout the remainder of the simulated event. Under

1 To simplify this problem, BFIRES assumes a 50% reduction of the helper's

movement speed.

24
actual conditions, the helper would cause the PTBH to move, change direction, etc. BFIRES simulates this activity indirectly, by requiring the

PTBH to follow-after the helper. Refer to Figure 3.5 Table 3.5. Finally,

the helping function is limited to those situations where (1) the helper

is familair with available egress routes, (2) the person-to-be-helped

requires no preparation time once the helper has arrived to render assistance (as discussed by Archea, 1979), and (3) one helper is sufficient to

move any nonambulatory occupant.
Figure 3.1 Flow Chart for Subroutine RESCUE

26

12

3

45

6

7

8

9

10

1112

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

CC

C

CC SUBROUTINE RESCUE

C

C THIS PROGRAM PROCESSES RESCUE-ER ACTIVITIES, IT DETERMINES

C WHETHER A PRE-ASSIGNED RESCUE-ER DECIDES TO ENGAGE IN RESCUING

C AND IF S0» DETERMINES THE COURSE OF THE RESCUE ACTIVITY,

C BEHAVIOR BY THE PERSON TO BE HELPED (PTBH) IS GENERATED BY

C SUBROUTINE HELPED^ LATER ON,

C SUBROUTINE RESCUE < I TIME f NTHIS » PHELP . NHELP » XO r YO

,

1 IXHELP F I YHELP f NSPACE f XLO f XHI f YLO f YH I f NE f IGOALX f 2 IGOALYf IAGREEf IGXf IGYf IAGf IXXf IREACHf IHANDI f II

)

DIMENSION PHELP(20) fNHELP(20) F IXHELP ( 20 ) f I YHELP (20)

1 NE(20) fIG0ALX(20f10f20) fIG0ALY(20f10f20) fIAGREE(20)

2 IGX<20) fIGY(20) F IAG(20> f IXX(20) f IREACH(20) f IHANDI (20)

INTEGER X0(20) fY0(20) f XLO ( 20 ) f XHI ( 20 ) f YLO ( 20 ) f YHI ( 20

)

C PROCESS PRE-ASSIGNED HELPERS:

IF (ITIME,EQ,1) GO TO 20

IF (NHELP(NTHIS),EQ,1) GO TO 15

GO TO 10

15 IF (IREACH(NTHIS) ,EQ,0) GO TO 20

GO TO 25

25 CALL HELPR3 ( ITIME f NTHIS f PHELP f NHELP f XO f YO

1 IXHELPfIYHELPfNSPACEfXLOfXHIfYLOfYHIfNEf

2 IGOALX F IGOALYf IAGREEf IGX f IGY f IAG f IXX f IREACH f 3 IHANDI)

35 11=0

RETURN

C DIRECT RESCUER TO LOCATION OF PTBH:

20 CALL HELPRl ( I TIME f NTHIS f PHELP f NHELP f XO f YO

1 IXHELP F I YHELP f NSPACE f XLO f XHI f YLO f YHI f NE f 2 IGOALX F IGOALYf IAGREEf IGXf IGYf IAGf IXX)

IF (NHELP(NTHIS) ,EQ,1) GO TO 30

GO TO 10

30 11=1

RETURN

10 11=2

RETURN

END

3. I Subroutine RESCUE: FORTRAN Listing

28
Figure 3.2 Flow Chart for Subroutine HELPRl

29
30
o

31
32
o

Determine which

space-exit, 1, provides the shortest distance

to the person-tobe-helped

33
SUBROUTINE HELPRl

12

3

4

5

67

8

910

1112

1314

15

16

1718

1920

2122

23

2425

26

27

28

29

30

313233

3435

36

39

40

414243

444546

4748

4950

5152

53

54

5556

57

58

59

60

C

cc

c

c

c

C THIS ROUTINE (1) DETERHINES WHETHER A PRE-ASSIONED HELPER IN FACT ENGAGES IN

C THE HELPING TASKr AND <2) RE-ESTABLISHES ENGAGED HELPER'S NOUEHENT GOALS IN

C ORDER TO ASSURE THE HELPING BIAS.

C SUBROUTINE HELPRl ( ITIHE tNTHIS .PHELPrNHELPr XOr YO t IXHELP r lYHELP

1 NSPACE > XLO > XHI > YLO t YHI f NE . IGOALX f lOOALY 1 1 AGREE t IGX t IGY > lAG f IXX > INTEGER X0(20> tY0<20>>XL0(20)rXHI<20>fYL0(20>>YHI(20)

DIHENS I ON PHELP < 20 ) r NHELP ( 20

1 1 XHELP ( 20 > > I YHELP < 20 > i NE ( 20 > r 1 I60ALX<20.10.20> tIGOALY<20>10r20>rIAGREE(20>fIOX(20)f IGY<20)f

2 IAG(20> r IXX(20>rX(20>iY(20> tDIST<20)

IAG(NTHIS)»IAGREE(NTHIS>

C IF THIS IS THE 1ST TIHE-FRAHE> DETERMINE WHETHER THE PRE-ASSIONED

C HELPER IN FACT DECIDES TO GO INTO THE HELPING MODE

IF (ITIHE.EQ.l) GO TO 10 GO TO 25

10 X«RANDNU(0)

IF <PH£LP(NTHIS)-X) 20t20tlS

15 NHELP(NTHIS)=1

GO TO 30

20 NHELP<NTHIS)=0

RETURN

25 IF <XO(NTHIS).EQ.IXHELP(NTHIS).AND.YO(NTHIS>.Ea.IYHELP(NTHIS>> GO

1 TO 900

30 CONTINUE

C DETERMINE WHICH SPACE HELPER IS IN IFLAG-0

DO 100 IS=lf NSPACE

IF (IFLAG.EO.l) GO TO 100

IF ( (XLO(IS) .LT.XO(NTHIS) .AND.XHKIS) .GT.XO<NTHIS>) .AND.

1 <YL0<IS).LT.Y0(NTHIS>.AND.YHI(1S>.0T.Y0(NTHIS>)> 60 TO 101 GO TO 100

101 ISHLPR=IS

IFLAG=1

100 CONTINUE

C DETERMINE WHICH SPACE PERSON-TO-BE-HELPEO IS IN JFLAG=0

DO 200 IS=1. NSPACE

IF (JFLAG.EQ.l) GO TO 200

IF < (XLO(IS) .LT.IXHELP(NTHIS).AND.XHI(;IS>.GT.IXHELP<NTHIS>).AND.

1 ( YLO( IS) .LT . lYHELP(NTHIS) .AND. YHI ( IS > .OT . I YHELP(NTHIS ) > >GOTO 201 GO TO 200

201 ISPTBH=IS IXX(NTHIS)>IS

JFLAG=1

200 CONTINUE

C DETERMINE WHETHER BOTH PERSONS ARE OCCUPYING THE SAME SPACE

IF (ISHLPR.EQ.ISPTBH) GO TO 500

C HOW MANY EXITS ARE AVAILABLE FROM SPACE OCCUPIED BY HELPER

IF (NE<ISHLPR).EQ.1> GO TO 900

GO TO 550

C FOR THE MULTI-EXIT CASE. COMPUTE DISTANCES BETWEEN EACH EXIT AND THE

C PERSON-TO-BE-HELPED

500 ITEMP»IAGREE<NTHIS)

IGOALX <ISHLPR.ITEMP.NTH1S>-IXHELP(NTHIS)

6162

63

6465

6667

6869

70

7172

73

7475

76

77

787980

8182

IGOALY( ISHLPR. ITEMP.NTHIS)-IYHELP<NTHIS)

GO TO 900

550 NN»NE<ISHLPR)

DO 701 1=1 rNN

X( I )«IGOALX< ISHLPR. I .NTHIS)

701 Y(I)«IG0ALY<ISHLPR.I.NTH1S)

XP=IXHELP(NTHIS)

YP«I YHELP(NTHIS)

DO 702 I«1 >NN 702 D I ST ( I ) -SORT ( < XP-X < I ) > «*2+ < YP- Y ( I > ) **2

C DETERMINE WHICH SPACE-EXIT. I. PROVIDES THE SHORTEST DISTANCE

C TO THE PERSON-TO-BE-HELPED (THE PTBHM

I-l J-2

601 IF <DIST( 1 ) .LT.DIST( J) > GO TO 602

I-J 602 J=J41

IF (J.GT.NEdSHLPR)) GO TO 603

GO TO 601 603 IAOREE(NTHIS)-I

900 RETURN

END

Table 3.2 Subroutine HELPRl; FORTRAN Listing

34
35
12

3

A5

6

7

8

9

10

1112

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

C

CC

C

C SUBROUTINE HELPR2

C

C THIS ROUTINE FLAGS TEMPORAL POINT AT WHICH HELPER ACTUALLY REACHES

C PERSON TO BE HELPED,

C

SUBROUTINE HELPR2 ( IREACH »NTHIS » XO » Y0» IXHELP . I YHELP t ITIME f NFLAG

1 NUMOCCfINITXOfINITYO)

DIMENSION IXHELP(20) f IYHELP(20) f IREACH<20) »NFLAG(20)

DIMENSION INITX0<20) »INITY0(20)

INTEGER X0(20) fY0(20)

N=NTHIS

IF (IREACH(N) ,EQ.O) GO TO 10

GO TO 30

10 IF <XO(N) .EQ.IXHELP(N) .AND.YO(N) .EQ.IYHELP(N) ) GO TO 20

GO TO 50

20 IREACH(N)=ITIME

NFLAG(N)=1

30 CONTINUE

C FLAG PTBH TOO. SCAN ALL OTHER OCC'S TO IDENTIFY CORRECT PTBH:

DO 35 I=lfNUMOCC

IF (I.EQ.N) GO TO 35

IF ( (XO(N) .EQ.INITXO(I) ) .AND. (YO<N) .EQ.INITYO(I) ) ) GO TO 40

GO TO 35

40 NFLAG(I)=1

IREACH(I)=ITIME

35 CONTINUE

50 RETURN

END

3.3 Subroutine HELPR2; FORTRAN Listing

36
c

START

IHANDI(N)-1

Restore

"goal" value

of lAGREE

Slow egress movement

speed

c

RETURN

Figure 3.4 Flow Chart for Subroutine HELPR3

37
r

j

ro

4

6

7

8

9

10

11

15

16

17

18

19

20

C

C SUBROUTINE HELPR3

C

C THIS ROUTINE RESTORES HELPER'S ORIGINAL EGRESS MOVEMENT OBJECTIVE. AFTER

C THE HELPER HAS IN FACT REACHED THE PERSON TO BE HELPED. IT ALSO SLOWS

C THE HELPER'S OWN MOVEMENT. . . C SUBROUTINE HELPR3 ( ITIME.NTHIS.PHELP.NHELP.XO. YO.

1 IXHELP . I YHELP . NSPACE . XLO . XHI . YLO . YHI . NE

.

2 I GOALX . IGOAL Y . I AGREE . I GX . IGY . I AG . I XX » IREACH

.

3 IHANDI)

DIMENSION IAGREE(20) .IHANDK20)

C RESTORE VALUE OF I AGREE. AND SLOW MOVEMENT!

IAGREE(NTHIS)=1

IHANDI(NTHIS)=1

RETURN

END

Table 3.4 Subroutine HELPR3: FORTRAN Listing
Figure 3.5 Flow Chart for Subroutine HELPED

4 » 39
I

I

40
12

3

45

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

C

C

c

c

C SUBROUTINE HELPED

C

C THIS PROGRAM CAUSES THE PERSON-TO-BE-HELPED (PTBH) TO REMAIN

C WITH THE ASSIGNED HELPER FOR THE REMAINDER OF THE RUN» ONCE

C THE HELPER FIRST REACHES THE PTBH. AS THE HELPER MOVES » THE

C PTBH SCANS THE FIELD AND MOVES DIRECTLY TO THE NEW LOCATION

C OCCUPIED BY THE HELPER.

C SUBROUTINE HELPED ( ITIME »NTHIS» IHANDI » INT , IBYSTDf lEVAL

f

1 XO » YO » IBAR » TOTBAR r XT » YT f NAGREE » XE » YE f I AGREE » IRAND

»

2 P f MOVE » XK » YK . K f NUMOCC » I DHELP . I TEND » NEUXO . NEWYO

)

INTEGER X0(20) f Y0(20) »XK»YK

DIMENSION IDHELP(20) »ITEND(20)

C DETERMINE NEW LOCATION OF HELPERr AND MOVE PTBH TO THAT

C LOCATION. FIRSTr SCAN ALL POSSIBLE MOVE ALTERNATIVES!

K=0

10 K=K+1

CALL KTOXY ( ITIME»NTHIS» IHANDI » INT» IBYSTDf lEVALf

1 XO . YO . IBAR » TOTBARt XT » YT » NAGREE » XE r YE f I AGREE

»

2 IRANDtPfMOVE»XKfYK»K)

C FOR EACH ALTERNATIVE r DETERMINE WHETHER HELPER IS PRESENT!

1=0

15 1=1+1

IF (I.EQ.NTHIS) GO TO 15

IF ( <XO(I) .EQ.XK) .AND. <YO(I) .EQ.YK) ) GO TO 20

30 IF ( I. EQ. NUMOCC) GO TO 25

GO TO 15

20 IF (IDHELP<I).EQ.ITEND(NTHIS)) GO TO 35

GO TO 30

C HELPER IS PRESENT. MOVE PTBH TO HELPER'S LOCATION!

35 NEWXO=XK

NEWYO=YK

RETURN

C HELPER IS NOT PRESENT AT THIS ALTERNATIVE LOCATION

C TRY ANOTHER!

25 IF <K.EQ.9) GO TO 40

GO TO 10

40 RETURN

END

Table 3.5 Subroutine HELPED; FORTRAN Listing

41
4.0

EXPANDED INPUT/OUTPUT AND UTILITY FEATURES

4.1 Subroutines INEXEC, INBLDG, and INOCC

To simulate a building fire using BFIRES, the user's input file must

specify three categories of data. These are control data, environmental

descriptors, and occupant descriptors. Control data include instructions

about the number of replications desired for a given experiment, the

total number of time frames each replication is to contain, the total

number of occupants to be included in the simulation, and a seed number

for random number generation^. Other control data specify output options

desired, and maximum conditions permitted for spatial crowding and other

functions. Finally, title information and user-supplied format statements input as control data. These data are read into the computer by

Subroutine INEXEC (See Table 4.1a).

Environmental descriptors specify the floor plan under study, the location of the fire ignition point, and the fire product spread rate. Floor

plan descriptions include locations of walls and doors in x-y space, and

such additional information about doors as (a) whether they are initially

open or closed, and (b) whether they are of the manual or automaticclosure type. The fire ignition point is also entered as an x-y spatial

location. The rate of spread fire products was discussed earlier in

Section 2.1. These data are input through Subroutine INBLDG (see Table

4.1b).

Occupant descriptors provide information about the Initial locations of

simulated occupants in x-y space, as well as data specifying various

individual characteristics. Examples of such characteristics include

occupants' (a) interruption limits (refer to Stahl, 1979, pp. 146-148),

(b) mobility status (c) knowledge of safe exit location, (d) likelihood

of opening closed doors and closing open doors just passed through, and

(e) egress goals and subgoals. The various parameters which describe

simulated occupants, and the way in which BFIRES uses this information is

presented in the documentation of BFIRES/VERSION 1 (Stahl, 1979). Occupant descriptors are input by means of Subroutine INOCC (see Table 4.1c).

Examples of control, environmental, and occupant data are provided in

Table 4. Id, which Illustrates a sample input file.

4.2 Subroutine PLOT, SMKSUM, and HLPSUM

The output capabilities of BFIRES I are enhanced in the new version

through the introduction of three additional output options. Subroutine

PLOT produces a two-dimensional graphic display of occupant and fire product locations for each successive time frame. Each individual display

The Interdata 7/32 variation of BFIRES contains a random number generator

which requires the user to input a five digit seed. The Univac 1108

version references an external random generator, and does not require a seed to be input.

42
contains x-y grid locations for all person-occupiable points. Empty

locations are denoted by "0", points containing fire products are denoted

by "1", and points occupied by simulated people (regardless of the number

of persons simultaneously occupying the area denoted by a given point)

point) are denoted by "8". In its current form, PLOT does not display

physical aspects of the environment such as walls or doors. However,

the user may prepare an appropriately scaled floor plan on transparent

material, and overlay this plan on the computer-produced displays. By

reviewing displays plotted for successive time frames, the user may

observe incremental changes in occupant and fire product locations. In

this way, each display is analogous to a single frame of motion picture

film. The listing for subroutine PLOT is given in Table 4.2a. An

example of PLOT output is shown in Figure 4.2a.

Subroutine SMKSUM prints tables describing the degree to which simulated

building occupants inhabited a smoke-filled environment. For each occupant in the fire event the table lists (a) the time frames spent in the

clear (smoke-free) environment, (b) the number of "low exposure" time

frames, (c) the number of "high exposure" time frames, and (d) the total

number of frames during which the was exposed to fire products. A frame

of exposure is defined as any time frame during which an occupant is

located at a smoke-filled x-y coordinate. The number of frames of exposure for each occupant is accounted for by Subroutine KTOXIC, as discussed in Section 2.3. The terms "low exposure" and "high exposure"

refer to the total number of frames an occupant spends in a smoke-filled

environment, as a function of the total length of the simulated event.

These terms are computed in Subroutines ASSIGN and CMPUTE^, and are detailed in Sections 4.3 and 5.2 of this report. The listing for Subroutine SMKSUM is shown in Table 4.2b, and an example of output from

this option is provided in Figure 4.2b.

Finally, a tabular summary of rescue activities is provided by Subroutine

HLPSUM. Tables produced by this option display pairs of preassigned

rescuers and persons-to-be-helped (PTBH), and for each pair indicates (a)

whether the rescuer ever actually reached the location of the PTBH, (b)

the time frame during which the meeting occurred, (c) whether the pair

ever attained safe egress from the threatened zone under study, and if so (d) the time frame during which escape occurred. The listing for Subroutine HLPSUM is shown in Table 4.2c. An example of tabular output from

this option is given in Figure 4.2c.

4.3 Subroutines INITLZ, INITFR, and CMPUTE

Replication parameters are variables which are initalized once at the

beginning of each replication of a simulation experiment. These include

Occupants in the "backtrack" interruption mode (as defined in the

BFIRES/ VERSION 1 documentation) are not processed through Subroutine

ASSIGN. For these occupants, values of low and high exposure are computed by Subroutine CMPUTE.

43
various counters and flags, and other variables which are preset at some value. These are initialized through a call to Subroutine INITLZ. Time

frame parameters must be reset at the onset of each successive time increment. Examples of such variables are occupant locators, which change

value as simulated occupants move and alter their spatial locations.

These parameters are initialized within Subroutine INITFR. See Tables

4.3a and 4.3b.

The period of time spent by occupants in an environment infiltrated by

fire products is calculated within Subroutines ASSIGN and CMPUTE. Whenever an occupant is behaving under the "backtrack" interruption mode (as

defined within BFIRES/VERSION 1 documentation, Stahl, 1979, pp. 149-

152), processing will not be routed through ASSIGN. Hence, those

occupants must be processed through CMPUTE, which duplicates ASSIGN'S

calculation of exposure periods. Within these routines, an occupant

is considered to have experienced a "no exposure" time frame if during the frame: (a) the occupant Inhabits a noninfiltrated coordinate

point, or (b) he has inhabited an infiltrated area for a period shorter

than one-third the total length of the simulated fire event. An occupant is said to have experienced a "low exposure" time frame if he has

been in the infiltrated area for a period between one-third and onehalf the total length of the event. When an occupant has spent more than half the total available frames within infiltrated areas, each

frame above the half-way point is recorded as a "high exposure" time

f rame

For example, consider a fire event that was run for 100 frames of simulated time. The first 33 (100/3) frames spent by occupants on the

floor—whether in infiltrated or noninf Iltrated areas—will be recorded

as "no exposure" time frames. Any frames between 33 and 50 (100/2) spent

in an infiltrated area will be recorded as "low exposure" time frames.

Any frames beyond the 51st spent by occupants in infiltrated areas will

be recorded as "high exposure" frames. When these data are summarized in

tabular form (as produced by the SMKSUM output option described in Section 4.2), the user can quickly compare simulated occupants on the basis

of relative exposure to fire products. Except for the function of Subroutine SBIAS^ (see Section 2.4), BFIRES makes no inferences from exposure statistics compiled by CMPUTE and ASSIGN. It is for the program

user to judge the effects of occupying infiltrated environments for various periods of time. Subroutine CMPUTE is listed in Table 4.3c.

SBIAS biases occupants* movement decision making to favor noninf Iltrated spatial locations. It is assumed that as time advances, any

occupant who has not yet escaped will become more fully surrounded

by fire products. Hence, such an occupant will find it continually

more difficult to select effective moves. Eventually (when fully

surrounded), decision making becomes a random process. In this manner, BFIRES simulates the decremental effects of Inhabiting infiltrated areas for increasing periods of time.

44
12

3

A5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

CC

C

C

C SUBROUTINE INEXEC

C

C THIS ROUTINE READS-IN EXECUTIVE AND CONTROL PARAMETERS

C

SUBROUTINE INEXEC ( IR » IP » NUMREP , TOTIME » NUMOCC f IRAND»

1 EVLOPT » RREPRT » RREPT2 r P 1 0 » PI 2 » I ALLOW » TI TLE » 2 PRINTl»PRINT2»PRINT3fPRINT4)

DIMENSION TITLE<20)

INTEGER T0TIME»EVL0PT»PRINT1 »PRINT2» PRINT3fPRINT4» RREPRT »RREPT2

PRINT1=0

PRINT2=0

PRINT3=0

PRINT4=0

C PRE-SET I/O PARAMETERS

IR=5

IP=6

C READ-IN TITLE AND USER-SUPPLIED FORMAT STATEMENT

READ <IR,103) TITLE

C READ-IN NUMBER OF REPLICATIONS f LENGTH OF REPLICATIONSf INITIAL

C NUMBER OF OCCUPANTS r AND RANDOM NUMBER SEED (SEED MUST BE READ»

C ALTHOUGH IT IS ONLY USED BY APPLICATIONS ON 32-BIT PROCESSORS)

READ (IRflOO) NUMREP.TOTIME»NUMOCC» IRANI! C READ-IN OPTIONS

READ (IRflOl) EVL0PTfRREPRT»RREPT2

C READ-IN INTERRUPTION AND CROWDING PARAMETERS

READ (IR»102) PI0.PI2»IALL0W

C

C DETERMINE VALUES OF PRINT-OPTION PARAMETERS!

I=RREPRT

J=RREPT2

IF ( ( I »EQ.O) AND. < J.EQ.3) ) GO TO 200

IF ( (d.EQ.l) .AND. (J.NE.l) ) . OR . ( ( I . EQ . 2) . AND . ( ( J . EQ . 1

)

1 .OR. ( J.EQ.2) ) ) ) PRINT1=1

IF ( ( (I.EQ.2) .AND. ( (J.NE.l ) ) . OR . ( ( I . EG) . 3 ) . AND . ( J . NE . 0 ) ) 1 .0R.((I.EQ.1).AND.(J.EQ.3)))) PRINT2=1

IF ( ( (I.EQ.3) .AND. ( J . NE . 2 ) ) . OR . ( ( I . EQ . 1) .AND. (J.GE.2) )

)

1 PRINT3=1

IF ( ( (I.EQ.l) .AND. (J.EQ.l) ) .OR. ( (I.GE.2) .AND. (J.GE.2) )

)

1 PRINT4=1

GO TO 210

200 PRINT3=1 Y PRINT4=1

210 CONTINUE

C

C INEXEC DATA FORMAT

100 FORMAT (3(I3»1X) ,15)

101 FORMAT (3(12)

)

102 FORMAT (2(F4.2,1X),I2)

103 FORMAT (20A4)

C

RETURN

END

Table 4.1a Subroutine INEXEC: FORTRAN Listing

45
1n3

45

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

nn

n

n

n

SUBROUTINE INBLDG

C

C

Cc

c

c

c

c

c

c

c

THIS ROUTINE READS-IN BUILDING FLOOR PLAN DESCRIPTORS i- LOCATING

WALLS AND DOORS. IT ALSO READS-IN INITIAL FIRE LOCATIONi. AND THE SPREAD-RATE

PARAMETER

SUBROUTINE INBLDG ( NUMEXT » NSPACE » ND » XE » YE » NE » NPOINT » IBAR

.

1 TOTBAR.XLO»XHI»YLO»YHI»IDOOR»IR»XT»YT).ISRATEf

2 MAXXrMAXY)

DIMENSION NE(20) fNP0INT<20) »IBAR(20»75»2)

r

1 ID00R(30»4)

INTEGER T0TBARfXT»YT»XE(10) »YE(10) »XL0<20) »XHI(20)

F

1 YL0(20) fYHK20)

C READ-IN NUMBER OF EXITS FROM THE FLOOR PLANf NUMBER OF SPACES

C ON THE FLOOR F AND NUMBER OF DOORS ON THE PLAN

READ <IRf100) NUMEXTfNSPACEfND

C READ-IN XfY FLOORPLAN DELIMITERS

READ <IRf101) MAXXfMAXY

C READ-IN LOCATIONS OF EXITSf WALL POINTSf AND INTERIOR DOORS

READ (IRfIOD (XE(I) fI=1fNUMEXT) f (YE(I) fI=1fNUMEXT)

DO 200 IS=1fNSPACE

READ (IRfIOD NE ( IS ) f NPOINT ( IS

)

TOTBAR=NPOINT(IS)

READ (IRf102) ( IBAR < IS f I f 1 ) f 1=1 f TOTBAR

)

READ <IRf102) ( IBAR < IS f I f 2 ) f 1=1 f TOTBAR

)

200 READ (IRfIOD XLO ( IS ) f XHI ( IS ) f YLO ( IS ) f YHI ( IS

)

READ (IRf102) ( IDOOR ( I f D f 1=1 f ND

)

READ (IRf102) ( IDOOR ( I f 2 ) f 1=1 f ND

)

READ (IRf102) ( IDOOR ( I f 3 ) f 1=1 f ND

)

READ (IRf102) ( IDOOR ( I f 4 ) f 1=1 f ND

)

READ-IN INITIAL FIRE LOCATION AND SPREAD-RATE PARAMETERREAD (IRfIOO) XTfYTfISRATE

INBDLG DATA FORMAT

100 FORMAT (3( I2f IX) ) 101 FORMAT (4(I2f IX) ) 102 FORMAT ( ) C RETURN

END

Table A. lb: Subroutine INBLDG: FORTRAN Listing

46
12

3

45

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

C

C

C

C

C SUBROUTINE INOCC

C

C THIS ROUTINE READS-IN OCCUPANT PARAMETERS^ AND INITIALIZES OCCUPANT

C LOCATOR VARIABLES.

C SUBROUTINE INOCC < IR»NUMOCCrXO» YOr INTLIMr IHANDI »KNOWAY.

1 POPEN » PCLOSE T TSMOKE » PHELP » I XHELP f I YHELP f KXO » KYO » NE

»

2 INITXOf INITYOf NSPACE»NUMEXTf IGOALXf IGOALY» IDHELP f ITEND)

DIMENSION INTLIM(20) »IHANDI(20) fKN0UAY(20) »P0PEN(20)

»

1 PCL0SE(20) »PHELP(20) »IXHELP(20) »IYHELP(20)

DIMENSION IBYSTD(20) »KX0(20) »KY0(20) » INITX0<20) » INITY0(20)

DIMENSION IG0ALX(20rl0»20) f IG0ALY(20»10»20)

DIMENSION ITEND(20) »IDHELP(20) »NE(20) »IGX(20»10) f IGY(20f 10)

INTEGER X0(20) »Y0(20) f TSM0KE(20)

DO 100 N=1»NUM0CC

C READ-IN OCCUPANT PARAMETERS

READ (IRf 200) X0(N) . Y0<N) » INTLIM(N) » IHANDI (N)

f

1 KNOWAY(N) »TSMOKE<N) f IXHELP(N) flYHELP(N)

>

2 POPEN(N) fPCLOSE(N) »PHELP(N) »IDHELP(N) flTEND(N)

IBYSTD(N)=0

C INITIALIZE OCCUPANT LOCATOR VARIABLES

KXO(N)=XO(N)

KYO(N)=YO<N)

INITXO(N)=XO(N)

INITYO<N)=YO(N)

100 CONTINUE

C READ-IN OCCUPANTS' SPATIAL GOAL POINTS:

DO 300 IS=1»NSPACE

IF (NE( IS) .NE.O) GO TO 110

J=1

IGXdSr J)=0

IGY< IS» J)=0

GO TO 115

110 J=NE(IS)

READ (IR»201) <IGX(IS»IEXIT) »IEXIT=1»J)

READ (IR»201) (IGY(IS»IEXIT) dEXIT=l»J)

115 CONTINUE

DO 300 N=1»NUM0CC

DO 300 IEXIT=1»J

IGOALX(IS»IEXIT,N)=IGX(IS»IEXIT)

300 IGOALY(IS»IEXITfN)=IGY(IS»IEXIT)

CC INOCC INPUT FORMAT

200 FORMAT ( 8 ( 12 f IX ) » 3 < F4 . 2 » IX ) » 2 < 12 » 1 X ) ) 201 FORMAT <)

RETURN

END

Table 4.1c Subroutine INOCC; FORTRAN Listing

47
HUKSllid. W aBQ wi t h RgWQTr FIITS.

•^011711

01& 100 ai^7 0111

0 . 0 . 0 ? 0 ? 10 — 70

n HELPERS. INP «t BT»M»S IPaTAODLI

02 20 10 I? 02 2*^ 03 H S * mill 7 8 ^1011111111111111 ’ " 7 * ^ 3 3 3 3 1 3

1 t I i U2-.3-iL-S- A.-2. 2. 7 7777A.S33Z

03 II 01 07

- 02 24—

ltl2l31"l^l4l7|T|«>i9l9|9i9|<»|9|7l4l5|imillll|lllll

01 1 11-4- 1-1—1—1. 2 A 9. S47777 2_774S -t„X 2. II 19 01 07

0? ?ii» - 03 4 7 P 91111II1I111I1110 9 4 7 4 5 9 3 3 3 3 3 3 l%tt^lS»m 6. tfci 6 i»l 7 1 81 9202 131 2 1 3 121 2 1 2 1 2 1 2 1 2 0 1 8 1 * 4 7 |A

03 M 19 ? I 02 ?fr Ill3l9ic,i>.,7i9i0|9)9|9i<»,9|ei7i4|5l9l3l7ll|lllllllll

II I 9 IS 2 I 0 3- ^V n3S47P99o9999e74*i3333333

07 7 7 7 7 7 94-04-1 1 24 04-^4»4-S4^ & 1 S 1

0

4 9 UXIJ 4 4-- A, A. 03 07 IS 03 73

l3lMlSl*l7l9l9loi919l919l9I714|'il9l3l3ni3l313

07 7 2- -7- 7-Z-A-a.iaill3l 9 1 S I *> 1 3171110 .9 13 I 9 07 IS OS 07

091113131711 9 07 7 7 -9 9- 9. 9 09 1307 09

OS- 02

09 1 0 1 I 1 3 1 3 I 1 9 13-13121-3-154^4-5- 09 13 13 IS —02- 14 091 1 121 31 31 31 31 ,1 I 10 9 9 9 9 09 9 9- 9201 1 1 7 I 11 3 I 3 I 3 I 7 I I 1 O 09 13 09 13

-Q-3_H1.Q1 7 1 W 1 9 I 8 1 ? 1 0 9 10 7 7 7 712151C1SI5

XJ-I—Q- o n n n o n n | 00

-4-8-

I I I 4-0 03~

I I I 1 I 0

bOC

c

•H -iM-

(U T3 COU

hJo

piHZ

o

u

cO •H e

o o

CO O

Cu U

W

r-1 C

CO O

CJ *H

•H m

O- *H

^>^ > U »H03

iJ 43 O 3

4-1 m

C3O na

•H C3 U CO •Hc c

00 o

Q) CO iJ U

•H O

4-( iH il

CO

)-i 03

CO

Q)U

C4

CO

W

Pi0

H

(3li M

01u

C/1 u

o

hJ<

H

2:M

§

M

>

u

09 02 05

40- 02- 05-

I* 0? 05

02 01 lO 00

-02-04—10 OO- 07 01 lO 00

00 1.00

OO I. 00

i.on 0.00 no oi

I .nn Q.nn np n?

00 1.00 i.no o.no oo 03

-4-4—08—05- 0 ? 04 40 00 00 1.00 4. 0 0 Q.DO 00 0 8 08 I? 05

4-2. 20 08

01 01 1000

04 0 1—iQ. OO

00 0.50

oa 0^.50

0.50 0.00 00 00

n.5fi Ti.nn no no

I 8 20 05

05-

01 01 to 00

0 4 0 1—to 00

00 0.50

on 0.50

0.50 0.00 00 00

0.50 o«nn no no

12 10 05 00 01 to 09 02 o»10 0.05 |.66 01 00

10 12 05 OO-QL LQ- IQ 0? O.IQ Q.u-> 1 .00 02 00

04 10 05 00 01 10 14 02 0.10 0.05 1.00 03 00

16 08 05 00 01 lO- 14 08.-0.10 Q.Q5 I.QQ 09 00

CO

CJ •HU

CO •H U ll C 0)

CO

cx, o

d «3 o u

CJ CO O 43O

Table 4. Id Typical Input Data File, Indicating General File

Organization and Structure

con •d

4a
•HU

«T3 a

m m

fH - n m o

4J 60 C I rt ^

a 3

3 m o

o

o

pi I 0 oa 8

I 2 I • OA a 01 1 n

1 1 1

13 11 nil

03 n 1 c 10 Al-1 131230

0*1113

P1I0I0I7I1

n* Alo 1 • P8 n I 3 1 2 I 1 111*1314.UL

101 ? pan

49

OCCUPANT

DESCRIPTORS,

con'd
1o

3

4

5

6

7

8

9

10

1112

13

14

15

16

17

18

19

20

21

OO

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

C

C

C

C

C SUBROUTINE PLOT

C

C THIS PROGRAM PLOTS SMOKE AND OCCUPANT LOCATIONS FOR A

C SINGLE TIME FRAME. ONLY PERSON-OCCUPIABLE LOCATIONS

C ARE SHOUN.

C SUBROUTINE PLOT (X0» YOt NUMOCC. ITIMEf MAXXr MAXYf ISMOKE)

INTEGER X0(20) ,Y0(20)

DIMENSION ISM0KE(100»100) »IPL0T<100»100)

C BUILD THE PLOT MATRIX

DO 100 J=2»MAXYf2

DO 100 I=2»MAXXf2

IF (ISMOKECIf J) .GT.O) GO TO 110

IPL0T(I»J)=0

GO TO 120

110 IPL0T(I»J)=1

120 CONTINUE

C DETERMINE LOCATIONS OF OCCUPANTS WITHIN THE PLOT MATRIX

DO 100 N=1.NUM0CC

IF (XO(N) .EO.I.AND.YO<N) .EQ.J) GO TO 130

GO TO 100

130 IPL0T(I.J)=8

100 CONTINUE

C PRINT THE PLOT MATRIX

WRITE <6»500) ITIME

DO 300 J=2,MAXY»2

WRITE <6»501) (IPL0T(I»J)rI=2fMAXX»2)

WRITE (6»502)

300 CONTINUE

500 FORMAT (

' 1' , IX .' PLOT FOR TIME FRAME NUMBER' » I4f/» 130<

501 FORMAT ( 1 X » 60 ( 2X » 12 )

)

502 FORMAT <lX»/>

RETURN

END

Table 4.2a Subroutine PLOT: FORTRAN Listing

' ) f///>

50
pl.OT for time Frame NUMREr^ 10

Notes:

(1) Denotes empty spatial location.

(2) Denotes point occupied by one or more simulated

persons.

(3) Denotes point infiltrated by fire products.

(4) Floor plan elements (e.g., walls) drawn-in by user.

(5) Shading drawn-in by user, to denote extent of fire

product infiltration.

Figure 4.2a Sample Output from the PLOT Option

51
1o

3

45

6

7

8

9

10

1112

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

C

C

CC

C SUBROUTINE SMKSUM

C

C THIS ROUTINE PRINTS A TABLE SUMMARIZING OCCUPANTS' SMOKE EXPERIENCES FOR

C A SINGLE REPLICATION.

C SUBROUTINE SMKSUM ( III »NUMOCC»NOEXPf LOUEXP» IHIEXPf ITOTAL)

REAL MEANNOfMEANLO»MEANHI»MEANTO

DIMENSION N0EXP(20) »L0UEXP(20) » IHIEXP(20) » ITOTAL ( 20 ) » XNO < 20 )

»

1 XL0C20) »XHI(20) »XT0TAL(20)

C PRINT HEADINGS

WRITE <6»100)

WRITE (6fl01)

WRITE (6fl02) III WRITE (6»101)

WRITE (6f103)

C PRINT SUMMARY TABLE

DO 200 I=1fNUM0CC

WRITE (6»105) IfNOEXP( I ) fLOWEXP( I) » IHIEXP( I ) » ITOTAL( I

)

200 CONTINUE - WRITE (6f106)

C COMPUTE MEANS

DO 250 I=1fNUM0CC

XNO(I)=NOEXP(I)

XLO(I)=LOWEXP(I)

XHI(I)=IHIEXP(I)

250 XTOTAL(I)=ITOTAL(I)

TOTOCC=NUMOCC

T0TN0=0.

T0TL0=0.

T0THI=0,

T0T0T=0.

DO 300 I=1fNUM0CC

TOTNO=TOTNO+XNO(I)

TOTLO=TOTLO+XLO<I)

TOTHI=TOTHI+XHI(I)

300 TOTOT=TOTOT+XTOTAL( I

)

MEANNO=TOTNO/TOTOCC

MEANLO=TOTLO/TOTOCC

MEANHI=TOTHI/TOTOCC

MEANTO=TOTOT/TOTOCC

C WRITE MEANS 1 WRITE (6»101)

WRITE (6»107) MEANNOfMEANLOfMEANHI fMEANTO

WRITE (6»101)

C FORMAT STATEMENTS

100 FORMAT ('!')

101 FORMAT (130('»'))

102 FORMAT ( 51X »' SUMMARY OF SMOKE EXPERIENCE' f//»54X» 'REPLICATION NUMB

lER' » 14)

103 FORMAT ( IX »' OCCUPANT '» 20X »' NO . NO-EXP. '» 10X» 'NO. LO-EXP .

' » lOX f 1 'NO. HI-EXP. ' fIOXf 'TOTAL' f/f2Xf 'NUMBER' f21Xf 'TIME FRAMES' fIOXf

2 'TIME FRAMES' fIOXf 'TIME FRAMES' fIOXf 'FRAMES'

)

104 FORMAT ( 1 30 (

' ' ) f //

)

105 FORMAT ( 5X f 12 f 26X f 13 f 18X f 13 f 18X f 13 f 16X f 13

)

106 FORMAT < IX f // f 1 30 (' »

' )

)

107 FORMAT ( 1 X

f

' MEANS ' f 25X f F6 . 2 f 14X f F6 . 2 f 14X f F6 . 2 f 13X f F6 . 2

)

RETURN

END

Table 4.2b Subroutine SMKSUM: FORTRAN Listing

52
RFPLIC»TtON

NUHbER

I

I

T

< £ O K

• (O X UJ » £

UlXc —

0. UJ X £

u. <

^ ^ O CD O

rs rx O O •• O

O O K O

[ - -+

IT O T

rsj T t*\ mm ^

fs O » Ml O O

« 0| fs< O O

o r*.; o a K N

£ Q «u — cM*n»'i/i.4r-e00“O-"«\

o • o •

• •

'C •

(T> • z 4 < *

UJ 4 z •

O

U

O- o

a) rC

4Je

o

M-l

•P3

o. p

3O

3

3

CO

,Q

CN<f0) P

3

W)

•H

pH

53
1 C 2 C

3 C

4 C 5 C

6 C

7 C

8 C 9

10

11

12

13

14 98

15 99

16 100

17 101

18 102

19

20 103

21 104

22 105

23 106

24 C 25

26

27

28

29 210

30

31 220

32

33 200

34 C 35

36

37

38

39

40

41

42

43

44

45

46

47 300

48

49

50

51

SUBROUTINE HLPSUM

THIS ROUTINE GENERATES A SUMMARY TABLE FOR RESCUE ACTIVITIES.

SUBROUTINE HLPSUM < IFLAG » NFLAG r NUMOCC » ISCORE r IREACH » 1 1 1 » NUMREP

»

1 TOTIME»IDHELP»ITENDfIP)

DIMENSION IFLAG<20) » NFLAG (20) fIEVAC( 20) F ISCORE (20) » IREACH (20)

F

1 IDHELP(20 ) fITEND(20)

INTEGER TOTIME

FORMAT ( ' 1

'

)

FORMAT ( IXf 130( '*' ) f/)

F0RMAT(1Xf2(130( '*' ) ) f/)

F0RMAT(50Xf 'SUMMARY OF RESCUE ACTIVITIES ' f /

)

FORMAT( IX F 'REPLICATION' F 14 f5Xf 'OF' fI4f80Xf 'RUN FOR' fI4f1Xf 'TIME FR

lAMES' f/)

F0RMAT(1Xf 'HELPER EVACUEE '

f

lOX f ' TIME 0F'f9Xf'TIME OF')

FORMAT( IX F 'NUMBER NUMBER NFLAG? NFLAG EVAC? EVAC'f/)

F0RMAT(2XfI2f6Xf I2f7XfI1f7XfI3f6XfI1f6XfI3)

FORMAT (' ')

DO 200 N=1f NUMOCC

IF ( IFLAG(N) .EQ.O) GO TO 210

IEVAC(N)=1

GO TO 220

IEVAC(N)=0

ISC0RE(N)=999

IF (NFLAG(N) .EQ.l) GO TO 200

IREACH(N)=999

CONTINUE

URITE (IPf98)

WRITE (IPfIOO)

WRITE (IPfIOI)

WRITE (IPf102) IIIfNUMREPfTOTIME

WRITE (IPfIOO)

WRITE (IPf103)

WRITE (IPf104)

WRITE (IPf99)

WRITE (IPf106)

DO 300 N=1f NUMOCC

WRITE (IPf 105) IDHELP(N) fITEND(N) fl^FLAG(N) fIREACH(N) fIEVAC(N)

F

1 ISCORE(N)

CONTINUE

WRITE (IPf106)

WRITE (IPfIOO)

RETURN

END

Table 4.2c Subroutine HLPSUM; FORTRAN Listing

54
• j mi 1 1 •• • ! Ui • 1 1 • r ' 1 • 1 • 1 QC ' • • t u. :• • 1 Ui ' i • • * • i • 1 • • 1 O. : ;l 2 i 2 :

:| *: : : • Ol • • i 2 : • 1 •

k:1 2 i : i • ! i •: ••••••;;• ••:•:••#••• i ^ i 1 • m •

li• ' • •••••••••••;;

Ui. • • ^ • : • ! > . • :: • j U • • : -j • • • 1 3, • i • m. • • 1 : ^

UI j • ! "

q:: ' • • u» • ; •

0| ; i S ' : •• •••• 1 j :

(A ! « • ••• • • 1 u. • 1 • a'^ • ! • • u < • y 0^- C 0 0^ ( 1 ^ 9 CM 0 o- • z > • fs C 0^ - » f 1 0^ r I CM 0 > • u • c o> »> C o- • • i 7. •• • ! ! u #• ! *• >

u> •• — < ) o - 1* o • i>

O - — c > o •• 'i u cn •• • c • < • u u • 0 - t * - < k ( • f 1 — < — • z u. • — < < ^ a* c ^ - > — c • b H ‘ 1 ^ ^ < f- o- 1 f P- < •

•* •

CM •

r* i • w \S ’ • Q < 1 • u ' • u • 2 i • — ( b

— < D

a 1 DO • • — ( » — •• U i • u q: • i z u • 1 L s • 1 t

TJ *O

a

r • 3 . • - H

M

T t D o « D

O ( 3 C ( ) o

•l

—

u z • • 1 a Q: • 1 u u • _ s

-* a. c • 1 I J

UI

u £ • i ^ • C £ C 1 D

C iZ C i- CM ( i 1 9 •

•1 QC

a z • 1 1 •

X) 4-) 0) cu d d (U cu bc d >

•H o cu

CO cd

CO > XI

cd cu cu

(U 4J d d Cd d. cd rHd

CO Xl

B

•H (U •H X CO o

CO cd cu

(U cu

X . x: ^4 4-1 o

•H cd >-l 4H

cd cu cu

O

&. >

(U T3

(1)

d

O

1—itH •H W) rH u }-) d ed cu CU •H d d. d

CO 4-1 rH

CJ CU CU

cd cd

XX4-1 (U u Cd 4J 0) bO d > cu d

4J 0) o •H

•H

d

u

4-)

d •rl

d

CO (1) CO XJ C d. O rH #k XJ O (U . • cu .d CO CU d d CU rH cd

(U >> .d o

(U

X II . cd CO (U 4J rH CO o cu d 4-) •H o d • r\ •H rH

ed (U o d d. (U > X d d d.

(U 4-1 II Cd cu

(U o cu

d

X)X e 4-t

d cd

Ou

cd ..

d •H

CO cu «4H cd

d cu cu

d 4-1 d CU CO

Cd o s cu Cd a) u cd •H 4J d. •H > 4J O d

XI cu

d o

0)

d

d cu

w

MM

Q

/Ts

1-H CN fO 'd' 'w' .—

55

Figure

4.2c

Sample

Output

from

the

HLPSUM

Option
12

3

A

56

7

8

9

10

1112

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

CC

CC

C SUBROUTINE INITLZ

CC THIS ROUTINE INITIALIZES REPLICATION PARAMETERS

C SUBROUTINE INITLZ ( NUMOCC » XO f YO f KXO f KYOf LOUEXP r NOEXP

»

1 IHIEXPflTOTALf ITOXICrIFLAGrNUMSTPf ISCORE»IBACK»

2 JTIMEr INTRf INTNUMf ITYPEl f ITYPE2» IDPASS»MAXX»

3 MAX Y » XT » YT » ISMOKE » IREACH » NHELP » NFLAG » KNOWAY » I AGREE

)

DIMENSION KX0(20) fKY0(20) fN0EXP(20) rL0UEXP(20) »IHIEXP(20)

»

1 IT0TAL(20) »IT0XIC(20) »IFLAG(20) fNUMSTP(20) f ISCORE

2 (20) »IBACK(20) f INTR(20 ) fINTNUM(20) »ITYPE1(20)

»

3 I TYPE2 < 20 ) » IDPASS < 20 ) » ISMOKE ( 100 f 1 00 ) r JT I ME ( 10

)

DIMENSION IREACH(20> »NHELP(20) rNFLAG(20) »KN0WAY(20)

DIMENSION IAGREE(20)

INTEGER X0(20) fY0<20) »XT»YT

C INITIALIZE PARAMETERS

DO 100 N=1»NUM0CC

I AGREE ( N ) =KNOWAY ( N

)

IREACH(N)=0

NHELP(N)=0

NFLAG(N)=0

XO<N)=KXO(N)

YO(N)=KYO(N)

N0EXP(N)=0

L0UEXP(N)=0

IHIEXP(N)=0

IT0TAL(N)=0

IT0XIC<N)=0

IFLAG(N)=0

NUMSTP(N)=0

ISC0RE(N)=0

IBACK<N)=0

JTIME(N)=0

INTR(N)=0

INTNUM(N)=0

ITYPEKN)=0

ITYPE2(N)=0

100 IDPASS<N)=0

C INTIALIZE THE SMOKE MATRICTX

DO 200 J=2»MAXY»2

DO 200 I=2»MAXXt2

200 ISM0KE(I»J)=0

ISMOKE(XTf YT)=1

RETURN

END

Table 4.3a Subroutine INITLZ: FORTRAN Listing

56
12

3

A5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

ooonoonnn SUBROUTINE INITFR

THIS PROGRAM INITIALIZES OCCUPANT LOCATORS AT THE START OF EACH

TIME-FRAME.

SUBROUTINE INITFR (NTHIS f XO r YO » ITIME » XPRIOR » YPRIOR

»

1 IXTRCEfIYTRCEfXOBfYOB)

DIMENSION IXTRCE(20f100) fIYTRCE(20f100)

INTEGER X0C20) fY0(20> fXPRI0R(20) f YPRI0R(20) fX0B(20f 100) f 1 Y0B(20f100)

XPRIOR<NTHIS)=XO(NTHIS)

YPRIOR<NTHIS)=YO(NTHIS)

IXTRCE(NTHISf ITIME)=XO(NTHIS)

IYTRCE(NTHISfITIME)=YO<NTHIS)

XOB(NTHISfITIME)=XO(NTHIS)

YOB(NTHISfITIME)=YO(NTHIS)

RETURN

END

Table 4.3b Subroutine INITFR; FORTRAN Listing

57
12

3

4

5

6

7

8

9

10

11

12

13

14

15

C

C

C

C

C SUBROUTINE CMPUTE

C

C THIS ROUTINE COMPUTES VALUES OF NOEXPf LOWEXP» AND IHIEXP (THE SMOKE

C EXPOSURE COUNTERES) FOR THOSE OCCUPANTS CURRENTLY IN THE TYPE-2

C INTERRUPTION MODE. 7THESE OCCUPANTS BI-PASS SUBROUTINE ASSIGN

C WHERE THE SMOKE EXPOSURE COUNTERS ARE NORMALLY COMPUTED.

C SUBROUTINE CMPUTE IS BI-PASSED BY OCCUPANTS CURRENTLY UNINTERRUPTED

C AND BY OCCUPANTS CURRENTLY IN THE TYPE-1 INTERRUPTION MODE.

C CMPUTE IS ALSO CALLED FOR THOSE OCCUPANTS WHO ARE IMMOBILE

C (I.E.r FOR WHOM IHANDI (N)=2)

C

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

10

11

12

SUBROUTINE CMPUTE ( ITIME»NTHIS» IHANDI » INT» IBYSTDr lEVALi1 XO » YO » IBAR » TOTBAR » XT f YT f NAGREE » XE f YE » I AGREE f IRAND f P f MOVE r 2 XK » YK » K » L » IS » IGOALX » IGOALY » lENTER f X » IDOOR » POPEN » ND

3 MDOOR f PCLOSE » NOEXP » LOWEXP » IHIEXP » ITOTAL » ISMOKE f 4 TSMOKE»ITOXIC»TOTIME)

DIMENSION N0EXP(20) »L0WEXP(20) »IHIEXP(20) f IT0XIC(20)

DIMENSION IT0TAL(20)

INTEGER TOTIME

CALL KTOXIC < ITIME » NTHIS » IHANDI f INT r IBYSTEW lEVAL » XOf YOf

1 IBAR » XI rYT»NAGREE»XE»YEf IAGREErIRAND»P»MOVE»XK»YKf

2 K » L » IS » IGOALX r IGOALY » lENTER » X » IDOOR ? POPEN f ND r MDOOR r 3 PCLOSE r NOEXP » LOWEXP » IHIEXP » ITOTAL » ISMOKE fTSMOKEf

4 ITOXIC)

A=ITOXIC(NTHIS)

B=FL0AT<T0TIME)/3.

C=FL0AT(T0TIME)/2.

IF (A.GT.B) GO TO 10

NOEXP < NTHIS ) =NOEXP ( NTH I S ) +

GO TO 12

IF (A.GT.C) GO TO 11

LOWEXP (NTHIS )=LOWEXP( NTHIS )+l

GO TO 12

IHIEXP ( NTHIS )=IHIEXP( NTHIS )+l

ITOTAL ( NTHIS )=IT0TAL(NTHIS)+1

RETURN

END

Table 4.3c Subroutine QIPUTE: FORTRAN Listing

58
5.0 MODIFICATIONS TO BFIRES/VERSION 1 ROUTINES

5.1 EXEC2

This section addresses the BFIRES executive, which has been modified to

process the smoke and rescue modules, and to facilitate the expanded

input, output and utility features of BFIRES II. Principal differences

between EXECl and EXEC2 are: (1) the incorporation of special datareading subroutines (INEXEC, INBLDG, and INOCC) into EXEC2, and (2)

the delegation of parameter initialization tasks to subroutines (INITLZ

and INITFR). Formerly, data input and parameter initialization were conducted within the body of the BFIRES executive. The use of subroutines for these functions reduces the length and complexity of EXEC2

,

and makes it an easier program for the user to follow. EXEC2 is

described in detail in Figure 5.1 and Table 5.1.

5.2

Subroutine ASSIGN

Subroutine ASSIGN required modifications to enable it to function properly within BFIRES/VERSION 2. The new version of ASSIGN, referred to as ASSIGN/ VERSION 2, includes calls to subroutines KTOXIC and SBIAS (discussed in specific sections of this report), the subroutines which process

the effects of occupying a toxic envionment upon egress movement decision

making. ASSIGN/VERSION 2 is detailed in Figure 5.2 and Table 5.2.

59
START c 3

CALL INEXEC

CALL INBLDG

N t

CALL INOCC

III=0

III-III+l

CALL INITLZ

ITIME=0 ^

ITIME-ITIME+1

Read-in

. executive and control parame ters

Read-ln building

and fire parameters

Read-ln

occupant

parameters

BEGIN TFE SIMULATION HERE

Iterate the experiment for the desired

no. of times

Initialize replication

parameters

Iterate for desired

number of time frames

Figure 5.1 Flow Chart for EXEC2

60
61

63
Determine social conditions surrounding

occ

Q

64
65
66
Update

occupant

parameters

67
68
12

3

A5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

C

C

C

C**#** THIS VERSION IS FOR THE NBS UNIVAC 1108

C

C .** t***t*tt*t*t*****t ttt** t***********************tt***t*t**t**t**t*****

cut « C» * C» BFIRES II — HUMAN EGRESS BEHAVIOR DURING BUILDING FIRES / VERSION 2 * C* * C* * C**********t t** ****t*t***!tit***tt********************************************

Ct***tM*******t**t tt** **t************t***********t***t***t*********tt**t****

c# ^ C* WRITTEN BY FRED I. STAHL » PH. D. RESEARCH PSYCHOLOGIST * C» ENVIRONMENTAL DESIGN RESEARCH DIVISION * C* CENTER FOR BUILDING TECHNOLOGY , NEL * C* NATIONAL BUREAU OF STANDARDS * C# WASHINGTONf DC 20234 » C« * C» FOR PROGRAM FOR DESIGN CONCEPTS * C» CENTER FOR FIRE RESEARCH »NEL * C» NATIONAL BUREAU OF STANDARDS *

C4c He C» IN SUPPORT OF THE » C* * C* NBS/HEU FIRE-LIFE SAFETY PROGRAM * C» * C t *«*««««Kc «««He 4c «»»«»*««»«»»»«»«»}|c}|c» Kc }|c ««}K j|E »He He )(c »)|c » He Kc «««Ik «««!|c K( »H( iK « )t( )K *

CHe He CHe revised: DECEMBER » 1979 He CHe « CHe He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He C He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He He C

C

C

C

C THE BFIRES PROGRAM SIMULATES HUMAN EGRESS BEHAVIOR DURING BUILDING

C FIRES. BFIRES IS A DISCRETE TIME STOCHASTIC SIMULATION BASED ON A NONC STATIONARY MARKOV MODEL OF THE BUILDING FIRE PROCESS. ACCORDING TO THIS

C MODEL r FIRES MAY BE UNDERSTOOD IN TERMS OF THREE INTERACTING COMPONENTS.

C THESE ARE (1) THE FIRE AND ITS BI-PRODUCTSf (2) THE BUILDING ENCLOSURE»

C AND (3) THE HUMAN OCCUPANTS. EACH POSSESSES UNIQUE CHARACTERISTICS

»

C AND THE BEHAVIOR OF EACH CONTRIBUTES TO THE OVERALL OUTCOME OF ANY FIRE

C - -EVENT 44^E.» HOW MANY PEOPLE-ESCAP£IU -MOW-MUCH TIME WAS REQUIRED -FOR ESCAPE,

C ETC.).

C

C EXEC2 IS THE SECOND VERSION OF THE BFIRES EXECUTIVE ROUTINE. THE

C PURPOSE OF EXEC2 IS TO READ-IN ALL USER-SUPPLIED DATA, AND THEN TO RUN A C FIRE EVENT FOR A GIVEN PERIOD OF TIME. IN ADDITION, EXEC2 PERMITS THE USER

C TO CONDUCT A NUMBER (UP TO 20) OF REPLICATIONS OF A GIVEN FIRE EVENT, IN A C SINGLE COMPUTER RUN. EXEC2 PERMITS THE SIMULATION OF TOXIC SMOKE EFFECTS,

C AND OF RESCUE ACTIVITIES.

C

C

C THE FOLLOWING DATA MUST BE PROVIDED BY THE USER. THESE DESCRIBE THE

C FIRE, THE BUILDING ENCLOSURE, AND THE OCCUPANTS FOR THE COMPUTER.

C THESE DESCRIPTIONS DEFINE THE INITIAL STATE , TIME-FRAME 1.. DATA ARE INPUT

Table 5.1 EXEC2 : FORTRAN Listing

69
61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120 o

n

nn

C

CC

C

C

C

CC

C

CC

C

C

CC

C

C

C

C

Cc

c

c

c

c

cc

c

c

cc

c

cc

c

c

c

cc

c

cc

cc

cc

c

cc

c

c

c

c

cc

FOR THE F0LL0UIN6 VARIABLESt WHICH ARE LISTED IN THE ORDER OF INPUT...

TITLE

NUMREP

TOTIME

NUMOCC

IRAND

EULOPT

RREPRT

RREPT2

PIO

PI2

lALLOU

NUMEXT

NSPACE

ND

MAXX»MAXY

XE»YE

NE

NPOINT

IBAR»IS»lf J)

IBAR(ISf2»J)

XLOfXHI

YLO»YHI

ID00R(1,I)

ID00R<2»I)

ID00R(3»I)

ID00R(4»I)

XTrYT

ISRATE

XOfYO

INTLIM

IHANDI

KNOUAY

TSMOKE

IXHELP

lYHELP

POPEN

PCLOSE

IDHELP

ITEND

IGOALX

IGOALY

TOTAL NUMBER OF REPLICATIONS DESIRED (MAX=20).

TOTAL NUMBER OF TIME FRAMES TO BE RUN (MAX=100).

TOTAL NUMBER OF OCCUPANTS IN THE SIMULATION (MAX=20).

ANY 5 DIGIT ODD NUMBER » WHEN RUNNING ON A 32-BIT COMPUTER

(ONLY). WHEN USING THE NBS UNIUAC 1108» A 5 DIGIT DUMMY

NUMBER MUST BE INPUT.

STATUS EVALUATION SELECTOR (1=EVAL8» 2=EVAL20).

OUTPUT OPTION SELECTOR (SEE TABLE BELOW).

OUTPUT OPTION SELECTOR (SEE TABLE BELOW).

PROBABILITY OF ENCOUNTERING NO INTERRUPTION » DURING A GIVEN

TIME FRAME.

PROBABILITY OF ENCOUNTERING A 'TYPE-2' INTERRUPTION DURING A GIVEN TIME FRAME (PIl = PIO - PI2).

CROWDING FACTOR^ I.E.» THE MAX NUMBER OF PERSONS PERMITTED

AT ANY PERSON-OCCUPIABLE LOCATION^ AT ANY POINT IN TIME.

NUMBER OF EXITS FROM THE FLOOR (MAX=2).

NUMBER OF SPATIAL SUBDIVISIONS ON THE FLOOR (MAX=20).

NUMBER OF DOORS ON THE FLOOR (MAX=30).

HIGHEST X AND HIGHEST Y COORDS USED TO DEFINE THE FLOORPLAN.

X»Y COORDINATES OF EXITS FROM THE FLOOR.

NUMBER OF EXITS FROM A PARTICULAR SPATIAL SUBDIVISION »MAX=2)

NUMBER OF GRID POINTS COMPRISING WALLS WHICH ENCLOSE A PARTICULAR SPATIAL SUBDIVISION.

X COORD OF THE JTH POINT OF A WALL ENCLOSING SPACE IS.

Y COORD OF THE JTH POINT OF A WALL ENCLOSING SPACE IS.

RANGE OF X COORDS OF POINTS COMPRISING AN ENCLOSURE.

RANGE OF Y COORDS OF POINTS COMPRISING AN ENCLOSURE.

X COORD OF THE LOCATION OF THE ITH DOOR.

Y COORD OF THE LOCATION OF THE ITH DOOR.

TYPE IDENTIFIER FOR ITH DOOR (0=MANUAL» 1=AUT0).

INITIAL POSITION OF ITH DOOR (0=CL0SED» 1=0PEN).

X»Y COORDS OF INITIAL FIRE LOCATION.

FIRE DIFFUSION RATE FACTOR.

XfY COORDS OF INITIAL OCCUPANT LOCATIONS.

OCCUPANTS' INTERRUPTION LIMIT.

OCCUPANT'S MOBILITY STATUE ( 0=UNIMPAIRED f 1=IMPAIRED BUT

MOBILEf 2=IMM0BILE—MUST BE ASSISTED).

OCCUPANTS' INITIAL KNOWLEDGE OF BEST EXIT.

OCCUPANTS' SMOKE TOLERANCE FACTOR.

X COORD OF A PERSON-TO-BE-HELPED (PTBH) BY THIS OCCUPANT.

Y COORD OF A PERSON-TO-B^-HELPED (PTBH) BY THIS OCCUPANT.

PROBABILITY THAT THE OCCOPANT WILL OPEN A CLOSED DOOR.

PROBABILITY THAT THE OCCUPANT WILL CLOSE AN OPEN DOOR.

RESCUERS' I.D. NUMBER (0» IF OCCUPANT IS NOT DESIGNATED AS A RESCUER)

.

RESCUEES' I.D. NUMBER (Or IF OCCUPANT IS NOT DESIGNATED AS A RESCUES)

.

X COORD OF BEST EXIT FROM A SPATIAL SUBDIVISION (NOT FLOOR).

Y COORD OF THE BEST EXIT FROM A SPATIAL SUBDIVISION.

THESE DATA ARE ENTERED IN THE FOLLOWING SEQUENCE...

: :SYSTEM/OPERATIONS DATA INPUT::

TITLE (ANY 80 CHARACTER COMMENT)

70
121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180 no

o

n

nno

C

C

C

C

C

C

C

C

C

c: :building/fire

c

(20A4)

NUMREP r TOTIME » NUMOCC

i

(3(I3»1X) »I5)

EVLDPT » RREPRT » RREPT2

(3(12)

)

PI0»PI2»IALL0U

(2(F4.2f IX) »I2)

IRAND

DATA input:

NUMEXT»NSPACE»ND

(3(I2»1X)

)

MAXXfMAXY

(2(I2»1X)

)

(XE(I) »I=1fNUMEXT) » (YE(I) »I=1»NUMEXT)

(4(I2»1X)

)

FOR EACH SPACE IN THE FLODRPLAN» CONSTRUCT

NEfNPOINT

THE FOLLOWING MINIFILE!

c (2(I2rlX)

)

c IBAR(IS»If 1) »I=: c (FREE)

c IBAR(IS»I»2) f I=: c (FREE)

c XLO»XHI»YLO»YHI

c (4(I2f IX)

)

c IDOOR(Irl) »I=lrND

c (FREE)

c ID00R(I»2) »I=1»ND

c (FREE)

c ID00R(I»3).I=lfND

c (FREE)

c ID00R(I.4) »I=1»ND

c (FREE)

c XTfYTfISRATE

c (3(I2»1X))

c

CONSTRUCT THE FOLLOWING

c::occuPANT data input::

c

C FOR EACH OCCUPANT IN THE SIMULATIONf

c minifile:

C XO , YO f INTLIM » IHANDI » KNOWAY » TSMOKE » IXHELP » I YHELP » POPEN

C PCLOSE»PHELP»IDHELP»ITEND

C (8(I2rlX)»3(F4.2flX)»2!(I2»lX))

C FOR EACH SPACE (IS) ON THE FLOORf CONSTRUCT THE FOLLOWING MINIFILE

C DESCRIBING OCCUPANTS EGRESS GOALS

C (IGOALXdSflEXIT) »IEXIT=lfNE(IS) ) C (FREE)

C (IGOALY(ISrlEXIT) »IEXIT=lfNE(IS)

)

C (FREE)

SEVERAL OUTPUT OPTIONS ARE AVAILABLE TO THE USER. THESE ARE:

(1) REPORT (STATE OF ALL OCCUPANTS r GIVEN FOR EACH TIME FRAME).

(2) TRACE (LOCATION OF EACH OCC» AS THIS VARIES FROM FRAME TO

F^RAMEl. - - - - (3) PLOT (GRAPHIC DESCRIPTION OF SMOKE AND OCCUPANT LOCATIONS).

71
181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

SUMMRY

SMKSUM

HLPSUM

(OCCUPANT EGRESS SUMMARY) » AND

(OCCUPANT SMOKE EXPOSURE SUMMARY) » AND

(RESCUE ACTIVITY SUMMARY).

THESE MAY BE CALLED INDIVIDUALLY OR COLLECTIVELY » IN THE USER'S SPECIFICATION OF INPUT VARIABLES RREPRT & follows:

ACCORDANCE WITH

RREPT2> AS

C (4)

CCC

C

C

CC

cc

c

cc

c

c

c

c

c

c

cc

c

c

cc

C * !|c « i|( })( itc iti :(( itc itc lie i4( )tc « lie itc :|c lie ]|c )|( itc lie ]|( lie ]|( i|c i4e !(c lie }|c i(c !(c lie lie lie lie i(c :(c lie )(( ]|( itc i|( « it( i(c *lie lit Ik Ht *3k He He * * >K Ik * *Dt * * *

C

OPTION RREPRT RREP'

(1) 1 0

(2) 0

(3) 3 0

(4) 1 1 (1)(2) 1 (2) (3) 3 1

( 1 ) (3) 1 2

(1) (4) *:> 2

(2) (4) 3 2

(3) (4) 0 3

(1 ) (2) (3) 1 3

(1)(2)(4) 2 3

(1 ) (2) (3) (4) 3 3

DIMENSION N0EXP(20) »L0WEXP(20) »IHIEXP(20) »IT0TAL(20) f IT0XIC(20)

DIMENSION ITYPEK20) »ITYPE2(20) f IDPASS(20) »IPS(20)

DIMENSION IXTRCE(20»100) ,IYTRCE(20»100) »IDHELP(20) »ITEND(20)

DIMENSION IBACK(20) » JTIME ( 20 ) » INITYO ( 20 ) r INITXO ( 20

)

DIMENSION INTR(20) f INTNUM(20) »TITLE(20)

DIMENSION IENTER(9) »IAGREE(20) f IREACH(20) »NHELP(20)

DIMENSION IBAR(20»75»2) »IHANDI(20) »KN0WAY(20) »NFLAG(20)

DIMENSION INTLIM ( 20 ) » IBYSTD ( 20 ) » NE ( 20 ) » NPOINT ( 20

)

DIMENSION PTDIST(20) »PEDIST(20) »P(9)

DIMENSION IG0ALX(20»10»20) » IGOALY ( 20 » 10 f 20 ) » KXO ( 20 ) » KYO ( 20

)

DIMENSION P0PEN(20) »PCL0SE(20) »ID00R(30»4) »ID0PEN(30rl00)

DIMENSION IFLAG(20) »ISC0RE(20) »NUMSTP(20) fPM(9»100)

DIMENSION PHELP(20) »IXHELP(20) »IYHELP(20) f ISMOKE(lOOflOO)

INTEGER XPRI0R(20) »YPRI0R(20 ) fSC0RE(20) »TSM0KE(20)

INTEGER XT»YTfX0(20) fY0(20) »XE(10) »YE(10) fTOTBARf TOTIME

INTEGER XL0(20) fXHI(20) fYLO(20)FYHI(2jO) fEVLOPT

INTEGER X0B(20f100) fY0B(20f100) fRREPI^TfRREPT2

INTEGER PRINT1fPRINT2fPRINT3fPRINT4

DUMMY

DO

VARIABLE(S)

I

5001 N=1f20

5001 IBYSTD(N)=0

CC READ-IN EXECUTIVE AND CONTROL VARIABLES

CALL INEXEC ( IRf IPfNUMREPfTOTIMEfNUMOCCf IRANDfEVLOPTf

1 RREPRT fRREPT2fPI0fPI2fIALL0Wf TITLE

F

2 PRINT1fPRINT2fPRINT3fPRINT4)

C READ-IN BUILDING AND FIRE DESCRIPTORS

CALL INBLDG ( NUMEXT f NSPACE f ND f XE f YE f NE f NPOINT f IBAR

f

1 TOTBAR F XLO F XH I F YLO f YHI f I DOOR f IR f XT f YT f ISRATE f 2 MAXXfMAXY)

C READ-IN OCCUPANT PARAMETERS

72
241

24 ”^ 243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

266

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

294

295

296

297

298

299

300

nncn

n

n

non

n

nnnnnnnnnn

CALL INOCC (IRfNUM0CC»X0»Y0»INTLIM»IHANriI»KN0UAYf

1 POPEN » PCLOSE f TSMOKE » PHELP r IXHELP » I YHELP » KXO f KYO r NE

»

2 INITXO f INITYO » NSPACE » NUMEXT f IGOALX r IGOALY » IDHELP » ITEND

)

*» EXECUTE THE SIMULATION EXPERIMENT »»

ITERATE FOR DESIRED NUMBER OF REPLICATIONS

DO 90 III=lfNUMREP

INITIALIZE REPLICATION VARIABLES

CALL INITLZ (NUMOCC.XOr YO»KXO»KYO»LOWEXP»NOEXPf

1 IHIEXP»ITOTAL»ITOXIC»IFLAG»NUMSTPr ISCORErlBACKi2 JTIMEf INTRf INTNUMr ITYPEl f ITYPE2» IDPASS»MAXX»

3 MAXY » XT f YT » ISMOKE » IREACH » NHELP » NFLAG » KNOWAY » I AGREE

)

ITERATE FOR DESIRED NUMBER OF TIME FRAMES

DO 50 ITIME=1»T0TIME

SPREAD SMOKE AT RATE INPUT BY USER

CALL SPREAD < ISMOKE» IBAR» IDOOR»NPOINT»MAXX»MAXYf

1 NSPACE»NDrISRATE»ITIME)

CONTINUE

PRINT SUMMARY PLOT FOR CURRENT TIME FRAME

IF (PRINT3.EQ.1) GO TO 100

GO TO 110

00 CALL PLOT ( XO » YO » NUMOCC » ITIME f MAXX > MAXY » ISMOKE

)

10 CONTINUE

DO 501 1=1 »ND

01 ID0PEN(I»ITIME)=ID00R(Ip4)

ITERATE FOR DESIRED NUMBER OF OCCUPANTS

DO 60 NTHIS=1»NUM0CC

IF (IFLAG(NTHIS) .EQ.l) GO TO 60

C INITALIZE OCCUPANT LOCATORS

CALL INITFR < NTHIS » XO » YO f ITIME » XPRIOR » YPRIOR

»

1 IXTRCEf IYTRCE»XOB»YOB)

C DETERMINE WHICH SPACE THE OCCUPANT IS CURRENTLY OCCUPYING

N=0

15 N=N+1 • IF < ( (XLO(N) ,LT.XO<NTHIS) ) .AND.

1 (YLO(N) .LT.YO(NTHIS) ) ) .AND.

2 <<XHI(N).GT.XO(NTHIS)).AND.

3 (YHI(N) .GT.YO(NTHIS) ) ) ) GO TO 25

GO TO 20

25 IS=N

GO TO 26

20 IF (N.LT. NSPACE) GO TO 15

IS=NSPACE

26 TOTBAR=NPOINT(IS>

C RESCUE THIS OCCUPANT, IF THIS IS REQ'D, AND IF HIS ASSIGNED HELPER

c IS present:

IF (IHANDI(NTHIS) .NE.2) GO TO 157

IF (NFLAG(NTHIS) .EQ.l) GO TO 155

GO TO 158

73
301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

318

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

338

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

155 CALL HELPED ( ITIME » NTHIS . IHANDI » INT » IBYSTD » lEVAL

»

1 XOfYO»IBARfTOTBARfXT»YTfNAGREEfXEfYE»IAGREE»IRANDf

2 P f MOVE » XK f YK . K » NUMOCC » IDHELP » ITEND » NEUXO » NEUYO

)

CALL CMPUTE ( ITIME » NTHIS » IHANDI » INT » IBYSTD r lEOAL

r

1 XO » YO . IBAR » TOTBAR » XT » YT » NAGREE » XE » YE » I AGREE » IRAND » P f MOVE

»

2 XK»YK»K»L»IS.IGOALX»IGOALY»IENTER»X»IDOOR»POPEN»NDf

3 MDOOR»PCLOSEfNOEXP.LOWEXP»IHIEXP»ITOTAL»ISMOKEf

4 TSMOKE»ITOXIC»TOTIME)

GO TO 156

157 CONTINUE

C PROCESS RESCUE ACTIVITY IF OCC(N) IS A DESIGNATED RESCUE-ER

IF ( (IXHELP(NTHIS) .GT.O) .AND» (lYHELP(NTHIS) .GT.O) ) GO TO 150

GO TO 151

150 CALL RESCUE ( ITIMErNTHIS»PHELP»NHELP.XO» YOr IXHELPf IYHELP»

1 NSPACE » XLO > XHI » YLO » YHI f NE » IGOALX » IGOALY » I AGREE f IGX » IGY f 2 lAGf IXX»IREACH.IHANDI»II)

GO TO 152

151 11=2

152 CONTINUE

IF (lI.EQ.O) GO TO 31

IF (lI.EQ.l) GO TO 65

C DETERMINE WHETHER THE OCCUPANT IS INTERRUPTED

CALL INTRPT ( ITIME f NTHIS » IHANDI » INT f IBYSTD r lEVAL

f

1 XO » YO » IBAR » TOTBAR » XT » YT r NAGREE » XE » YE f I AGREE

»

2 IRANDfP»MOVErXK»YKfK»Lf IS»IGOALX»IGOALY»IENTERf

3 Xf INTLIMf INTRt INTNUMfPI2»PI0)

IF (INT.EQ.l) GO TO 27

IF <INT.EQ.2) GO TO 30

GO TO 31

C REMAIN-IN-PLACE INTERRUPTION

27 ITYPEKNTHIS) = ITYPE1 <NTHIS)+1

GO TO 70

C BACK-TRACK INTERRUPTION

30 CONTINUE

CALL BACKUP ( IBACK»XO» Y0» INITXOr INITYOrXOBr YOB»

1 ITIME»NTHIS»NEUXO»NEWYOf INTR» JTIME)

ITYPE2(NTHIS)=ITYPE2(NTHIS)+1

IF (INTR<NTHIS) .EQ.O) GO TO 31

CALL CMPUTE ( ITIME r NTHIS f IHANDI » INT » IBYSTD

»

lEVAL

»

1 XO » YO » IBAR » TOTBAR » XT »YTf NAGREE »XE» YE »IAGREE»IRANDfPf MOVE

f

2 XKfYKfKfLf ISfIGOALXfIGOALYfIENTERfXfIDOORfPOPENfNDf

3 MDOOR » PCLOSE » NOEXP f LOWEXP f IHIEXP f ITOTAL f ISMOKE f 4 TSMOKEfITOXICfTOTIME)

GO TO 71

31 CONTINUE

C DETERMINE SOCIAL CONDITIONS SURROUNDING THE OCCUPANT

CALL GROUP < NTH I S f NUMOCC f I HANDI f KNOWAY f KOOCC f NHANDI f NKNOW f NAGREE

f

1 lAGREE)

IF (NHANDI .GT,0) GO TO 65

GO TO 67

65 CONTINUE

C DETERMINE MODE OF STATUS EVALUATION

67 IF (EVLOPT-l) 68f68f69

68 CALL EVAL8(X0fY0fXTfYTfXEfYEfNTHISfIAGREEfITIMEfIEVALf

1 PTDIST F TDIST F PEDIST fEDISTf IS F IGOALX F IGOALY)

GO TO 70

69 CALL EVAL20 ( MXTIME f MK f XO f YO f XE f YE f NTHIS f I AGREE

f

1 ITIMEfCfIEVALfTOTIMEfXTfYT)

C DETERMINE LOCAL CROWDING CONDITIONS SURROUNDING THE OCCUPANT

70 CALL JAMMED ( ITIME f NTHIS f IHANDI f INT f IBYSTD

f

lEVAL f

74
361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

416

417

418

419

420

1 Xn » YO » I BAR » TOTBAR » XT » YT » NAGREE . XE f YE » I AGREE » IRAND

»

2 P » MOVE » XK r YK » K . I ALLOW » NUMOCC r lENTER

)

C GENERATE MOVE PROBABILITIES

158 CALL ASSIGN ( ITIME»NTHIS» IHANDI » INT» IBYSTDf lEVALr

1 XO » YO » IBAR » TOTBAR » XT » YT » NAGREE f XE » YE » I AGREE

»

2 IRAND»P»MOOE»XKfYK»K>L»IS»IGOALXf IGOALYf lENTERi.

3 X f inOOR . POPEN r Nil » MDOOR » PCLOSE » NOEXP f LOWEXP » IHI EXP

»

4 ITOTAL»ISMOKE»TSMOKE»ITOXIC»TOTIME»NHELP»PM)

CALL NEWXY ( ITIME . NTHIS » IHANBI » INT , IBYSTD r lEVAL

»

1 XO f YO » I BAR f TOTBAR » XT » YT » NAGREE » XE » YE f I AGREE » 2 IRANn,P»MOOE»XK»YKfKfNEUXO»NEUYO)

156 CONTINUE

C RECORD MEETING OF RESCUE-ER WITH PTBH

IF ((IXHELP<NTHIS*.6T.O).AND.(IYHELP(NTHIS).GT.O)) GO TO 153

60 TO 71

153 IF (NFLAG(NTHIS) .EQ.l ) GO TO 71

CALL HELPR2 ( IREACH » NTHIS » XO » YO » IXHELP » I YHELP » ITIME » NFLAG i- 1 NUMOCCf INITXO»INITYO)

C RECORD DOOR-PASSAGE » IF ONE OCCURRED

71 CALL PASSG ( IDPASS » IDOOR » XO > YO f NTHIS » ND f NEWXO f NEWYO

)

IF (PRINTl.EQ.l) GO TO 72

GO TO 61

C PRINT MOVE PROBABILITY MATRIX^ IF THIS OPTION IS SELECTED

72 CONTINUE

CALL REPORT ( ITIME»NTHIS» IHANDI » INT» IBYSTDr IEVAL»

1 XO » YO f IBAR » TOTBAR f XT , YT f NAGREE » XE » YE » I AGREE

»

2 I RAND f P » MOVE » XK » YK » K » NUMEXT , NUMOCC f TOT IME f INTLIM f 3 KNOWAY » PTDI ST » TDI ST » PEDIST » EDI ST » NEWXO » NEWYO

»

4 EVLOPT»IDOOR»IDOPENfND»INTR)

C UPDATE OCCUPANT LOCATORS

61 CALL UPDATE ( XO » YO » NTHIS f NEWXO » NEWYO

)

ISC0RE<NTHIS)=ISC0RE(NTHIS)+1

IF < (XO(NTHIS) .EQ»XE(1) ) .AND.

1 (YO(NTHIS) .EQ.YE(l) ) ) GO TO 62

GO TO 66

62 IFLAG(NTHIS)=1

IPS(NTHIS)=IDPASS(NTHIS)

GO TO 60

C UPDATE NUMBER OF STEPS TRAVERSED BY THE OCCUPANT

66 CALL STEPS ( XPRIOR » YPRIOR r XO » YO » NUMSTP r NTHIS

)

60 CONTINUE

50 CONTINUE

C PRINT SUMMARY TABLE» IF THIS OPTION IS SELECTED

IF <PRINT4.EQ.l) GO TO 63

GO TO 64

C COMPUTE ESCAPE SCORES FOR ALL OCCUPANTS IN THE RUN

63 CALL XSCORE (TOTIME» ISCORE»NUMOCC»SCORE)

CALL SUMMRY < INITXO» INITYO» INTLIM, LBYSTD» IHANDI fKNOWAYrPOPENf

1 PCLOSE , SCORE , NUMSTP , IPS , I I I , NUMREP , NUMOCC , TOTIME , XO , YO , XE , YE

,

2 TITLE, IXHELP,IYHELP,TSMOKE,PHELP)

CALL SMKSUM ( I I I , NUMOCC , NOEXP , LOWEXP , IHIEXP , ITOTAL

>

CALL HLPSUM ( IFLAG,NFLAG, NUMOCC, ISCORE, IREACH, III , NUMREP,

1 TOTIME, IDHELP,ITEND, IP)

64 CONTINUE

C PRINT TRACES, IF THIS OPTION IS SELECTED!

IF (PRINT2.EQ.1) GO TO 120

GO TO 90

120 CALL TRACE < IXTRCE , I YTRCE , NTHIS , ITIME , NUMOCC , TOTIME

)

90 CONTINUE

END

75
Figure 5.2 Flow Chart for Subroutine ASSIGN

76
YES
78
79
80
Does occ close — a door he has passed through?

81
4

6

7

8

9

10

1112

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

CC SUBROUTINE ASSIGN

C

C THE PURPOSE OF ASSIGN IS TO CONSIDER ALL FACTORS COMPRISING THE

C OCCUPANT'S CURRENT PERCEPTION OF HIS SITUATION? AND THEN TO

C SWITCH CONTROL FOR DECISION MAKING TO THE APPROPRIATE BIASING

C ROUTINE.

C

SUBROUTINE ASSIGN ( ITIMErNTHIS? IHANDI ? INT» IBYSTD? lEVALf

1 XO f YO » IBAR » TOTBAR ? XT ? YT ? NAGREE ? XE » YE » I AGREE » 2 I RAND ? P ? MOVE ? XK ? YK ? K » L ? I S ? IGOALX » I GOALY » I ENTER

3 X » IDOOR » POPEN ? ND ? MDOOR » PCLOSE » NOEXP » LOWEXP » IHIEXP p ITOTAL p 4 I SMOKE p TSMOKE p ITOXIC p TOT IME p NHELP p PM

)

DIMENSION IENTER(9) p IBAR<20 p75p 2) p ID00R(30 p4) pP0PEN(20)

p

1 PCL0SE(20) pIAGREE(20) pIG0ALX(20p10p20) pIG0ALY(20p10p20)

DIMENSION N0EXP(20) pL0WEXP(20) pIHIEXP<20) pIT0TAL(20)

p

1 IT0XIC(20 ) pISMOKE(IOOpIOO) pNHELP<20) pPM(9p100>

DIMENSION IHANDK20) pIBYSTD(20) pP<9) pCUM(9)

INTEGER X0<20) pY0<20) pXE(IO) pYE< 10) pXTpYTp TSMOKE (20> pTOTIME

C DETERMINE WHETHER ITIMEp THE CURRENT TIME FRAME? IS ODD OR EVEN.

C MOBILITY-IMPAIRED OCCUPANTS ONLY MOVE DURING ODD TIME FRAMES

TIME=ITIME

ATIME=TIME/2.

JTIME=ATIME

BTIME=JTIME

TEST=ATIME-BTIME

C DETERMINE MOVE PROBABILITY BIASING MODE

C DETERMINE IMPACT OF TOXIC ENVIRONMENT

CALL KTOXIC ( ITIMEpNTHISp IHANDI ? INT? IBYSTD? lEVAL?

1 XO p YO p I BAR p XT p YT p NAGREE ? XE ? YE ? I AGREE ? IRAND ? P ? MOVE ? XK ? 2 YK p K p L p IS p IGOALX p IGOALY p lENTER p X ? IDOORpPOPEN p ND p MDOOR ? 3 PCLOSE p NOEXP ? LOWEXP? IHIEXP p ITOTAL ? ISMOKE ? TSMOKE ? ITOXIC

)

A=ITOXIC<NTHIS)

B=FL0AT<T0TIME)/3.

C=FL0AT(T0TIME)/2.

IF (A.GT.B) GO TO 300

NOEXP <NTHIS)=N0EXP(NTHIS)+1

GO TO 303

300 IF (A.GT.C)GO TO 301

LOWEXP ( NTHI S ) =LOWEXP ( NTHIS ) +1

GO TO 302

301 INT=1 ’ IHIEXP < NTHIS )=IHIEXP( NTHIS )+l

GO TO 303

C303 IF (IHANDKNTHIS) .EQ.l) GO TO 1 IF (IHANDKNTHIS) .EQ. 2) GO TO 2

GO TO 11

I IF (TEST.NE.O. ) GO TO 2

C IS THE OCCUPANT IN AN INTERRUPTION MODE?

II IF (INT. EQ.l) 60 TO 2

C IS THE OCCUPANT CURRENTLY IN A HELPING MODE?

IF (NHELP(NTHIS) .EQ.l) GO TO 504

C ASSESS THE OCCUPANT'S CURRENT STATUS EVALUATION

IF (lEVAL.EQ.l) 60 TO 4

C IS THE THREAT LOCATION KNOW TO THE OCCUPANT?

IF ( (XT.EQ.O) .AND. (YT.EQ.O) ) GO TO 5

Table 5.2 Subroutine ASSIGN: FORTRAN Listing
61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

C DOES A BEST-EXIT CONSENSUS EXIST (IF SOr NAGREE.NE.O)?

IF (NAGREE.EQ.O) GO TO 404

GO TO 504

C BIAS MOVE PROBABILITIES TO FAVOR THREAT EVASION

404 CALL TBIAS < ITIMEf NTHIS» IHANDI » INT» IBYSTDr IEVAL»

1 XO » YO f IBAR » TOTBAR , XT » YT » NAGREE » XE » YE r I AGREE

»

2 IRAND » P » MOVE » XK r YK » K » L » IS » IGOALX » IGOALY » lENTER

)

GO TO 6

4 IF ( NAGREE. EQ.O) GO TO 404

C BIAS MOVE PROBABILITIES TO FAVOR EXIT-SEEKING

504 CALL EBIAS < ITIME»NTHIS» IHANDI » INTr IBYSTDf lEVALf

1 XO » YO F I BAR » TOTBAR » XT r YT » NAGREE t XE » YE » I AGREE

.

2 IRANDf pFMOVE»XK»YK»KrL»ISF IGOALX » IGOALY flENTER)

GO TO 6

C REMAIN-IN-PLACE OPTION ENFORCED

2 P(5)=1.0

DO 50 K=l»4

50 P(K)=0.0

DO 51 K=6»9

51 P(K)=0.0

GO TO 601

5 IF (NAGREE.NE.O) GO TO 504

C IF OCC(N) IS IMMOBILE AND MUST BE RESCUED » BYPASS STANDARD

C PROCESSING SEQUENCEf AND SWITCH CONTROL TO 'REMAIN-IN-PLACE'

c processor:

302 IF (IHANDKNTHIS) .EQ.2) GO TO 2

C EQUALIZE ALL MOVE PROBABILITIES:

CALL EQUALZ ( ITIMEfNTHISf IHANDI r INT» IBYSTD f IEVALf

1_ -xa* YIJf-LBAR-f TOTBAR fXT f YT-f NAGREE f XE f^ Y£ f I AGREE f 2 I RAND F P F MOVE f XK f YK f K f L f I S f IGOALX f I GOALY f I ENTER

)

C DETERMINE WHETHER THE OCCUPANT WILL OPEN A DOOR HE HAS CONFRONTED

6 CALL DOORSl ( ITIMEfNTHISf IHANDI f INTf IBYSTDf IEVALf

1 XOfYOfIBARfTOTBARfXTfYTf NAGREEfXEfYEfIAGREEf

2 IRAND F P F MOVE f XK f YK f K f L f I S f IGOALX f IGOALY f IENTER f 3 X F I DOOR F POPEN f ND f MDOOR f PCLOSE f NOEXP f LOWEXP f IH I EXP f 4 ITOTALfISMOKEfTSMOKEfIX)

C BIAS MOVE PROBABILITIES IN RESPONSE TO SMOKE INTERACTION

CALL SBI AS ( ITIME F NTHIS F IHANDI fINITfIBYSTDfIEVALfXOfYOf IBAR F TOTBAR

F

1 XT fYTfNAGREEfXEfYEfIAGREEfIRANDfPfMOVEfXKfYKfKfLfISf IGOALX

F

2 IGOALY F I ENTER f X f IDOOR f POPEN f ND f MDOOR f PCLOSE f NOEXP f LOWEXP f I H I EXP f 3 ITOTALfISMOKEfTSMOKE)

601 CONTINUE

ITOTAL( NTHIS )=ITOTAL( NTHIS )+l

C THE OCCUPANT SELECTS A MOVE FROM AMOIJIG THE ALTERNATIVES AVAILABLE

DO 100 K=1f9 t C PREPARE ALTERNATIVE MOVE PROBABILITY VALUES FOR TESTING AGAINST A C RANDOM NUMBER

IF (K.EQ.l) GO TO 200

CUM(K)=P(K)+CUM(K-1)

GO TO 100

200 CUM(K)=P(K)

100 PM(KfITIME)=P(K)

C GENERATE A RANDOM NUMBER f Xf AND TEST THE MOVE ALTERNATIVES

K=0

X=RANDNU(0)

7 K=K+1

IF (X) 71f72f72

71 X=X#(-1)

72 RAND=CUM(K)-X

IF (RAND) 52f53f53

83
I

121

122

123

124

125

126

127

128

129

130

131

132

53 M0yE=K

GO TO 8

52 IF (K.LT.9) GO TO 7

C DETERMINE WHETHER THE OCCUPANT CLOSES A DOOR JUST PASSED THROUGH

C (IF IN FACT HE HAS JUST DONE SO!)

8 CALL D00RS2(ITIMEfNTHISf IHANDIflNTf IBYSTDrIEVALf

1 XO » YO » I BAR f TOTBAR » XT » YT » NAGREE » XE r YE » I AGREE f 2 IRAND f P f MOVE f XK » YK f K » L » ISIGOALX f IGOALY f lENTER r 3 X f IDOOR f POPEN f ND f MDOOR f PCLOSE f NOEXP f LOUEXP f IHIEXP f 4 ITOTALfISMOKEfTSMOKEfIX)

12 RETURN

END

84
6.0 SUMMARY

Recent modifications and enhancements of the BFIRES computer program are discussed and are presented as companion material to an earlier documentation of BFIRES/VERSION 1. Several shortcomings of BFIRES I are addressed. Chief among these are BFIRES I's inability to simulate either

rescue activities or direct interactions between occupants and the toxic

environment. The report documents new subroutines designed to mitigate

these shortcomings. The routines are clustered into two modules new to

BFIRES/VERSION 2: a "smoke" module and a "rescue" module. Additional

Improvements to the original BFIRES program involve clearer data file

management and input facilities, and expanded output capabilities.

Finally, BFIRES I routines requiring modification for operation within

the BFIRES II environment are discussed.

85
7.0 REFEBIENCES

1. Archea, J. The Evacuation of Non-Ambulatory Patients from Hospital and

Nursing Home Fires: A Framework for a Model. Washington, D.C.: U.S.

Dept, of Commerce, National Bureau of Standards, NBSIR 79-1906, 1979.

2. Berl, W.G. and Halpln, B.M. Human Fatalities from Unwanted Fires.

Laurel, Md.: The Johns Hopkins University Applied Physics Laboratory,

APL/JHU FFP TR37, December 1978.

3. Phillips, A.W. The Physiological and Psychological Effects of Fires In

High-rise Buildings. Factory Mutual Record , May-June 1973, 8-10.

4. Stahl, F.I. Final Report on the BFIRES/VERSION 1 Computer Simulation

of Emergency Egress Behavior During Fires: Calibration and Analysis.

Washington, D.C.: U.S. Dept, of Commerce, National Bureau of Standards,

NBSIR 79-1713, 1979.

86
APPENDIX A. BFIRES LISTING

This appendix contains FORTRAN listings of all BFIRES subroutines not

specifically covered by this report. Documentary material for there

subroutines are provided In the earlier report on BFIRES /VERSION I (Stahl, 1979).
12

3A

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

12

3

45

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

12

3

45

6

78

9

10

11

12

13

SUBROUTINE AGREE ( NTHIS » NUMOCC » IHANDI f KNOWAY » KOOCC

1 NHANDI»NKNOW»NAGREE»IAGREE)

DIMENSION KN0UAY(20)»IAGREE(20)

K0NE=0

KTW0=0

KZER0=0

DO 50 I=1»NUM0CC

IF <KNOWAY(I) .EQ*1) GO TO 51

IF (KNOWAY(I) EQ.2) GO TO 52

IF (KNOWAYd) .EQ.O) GO TO 53

GO TO 50

51 K0NE=K0NE+1

GO TO 50

52 KTW0=KTU0+1

GO TO 50

53 KZER0»KZER0+1

50 CONTINUE

ONE=KONE

TWO=KTWO

ZERO=KZERO

SUM=ONE+TWO+ZERO

PSUM=.60*SUM

IF ( (ONE.GE.PSUM) .OR* (TUO.GE.PSUM) > GO TO 1 NAGREE=0

IAGREE(NTHIS)=0

GO TO 2

1 NAGREE=1

IF (ONE.GE.PSUM) GO TO 3

IAGREE(NTHIS)=2

GO TO 2

3 IAGREE(NTHIS)=1

2 RETURN

END

SUBROUTINE OTHERS (NTHIS r NUMOCCr IHANDI >KNOUAY f KOOCCf NHANDI

1 NKNOU)

DIMENSION IHANDI(20) fKN0UAY(20)

NKN0U=0

NHAND 1=0

IF (NUMOCC.GT.l) GO TO 1 K00CC=0

GO TO 999

1 K00CC=1

DO 50 I=1»NUM0CC

IF (I.EQ.NTHIS) GO TO 50

IF (IHANDKI) .EQ.l) GO TO 51

GO TO 50

51 NHANDI=NHANDI+1

50 CONTINUE

DO 60 I=1»NUM0CC

IF <I.EQ.NTHIS) GO TO 60

IF (KNOWAY(I) .GT.O) GO TO 61

GO TO 60

61 NKNOU=NKNOU-t-l

60 CONTINUE

999 RETURN

END

SUBROUTINE GROUP (NTHISrNUMOCCf IHANDI »KNOUAY»KOOCC»NHANDI

1 NKNOU rNAGREEr I AGREE)

DIMENSION KN0WAY(20) pIHANDK20)»IAGREE(20)

CALL OTHERS ( NTHISfNUMOCC r IHANDI f KNOUAYf KOOCC»NHANDI »NKNOU)

IF <KNOUAY<NTHIS) .GT.O) GO TO 1 IF (KOOCC.EQ.O) GO TO 999

GO TO 2

1 IF (KOOCC.EQ.O) GO TO 999

IF (NKNOU. EQ.O) GO TO 999

2 CALL AGREE (NTHI8»NUM0CC» IHANDI f KNOUAYtKOOCCf NHANDI

1 NKNOU rNAGREEf I AGREE)

999 RETURN

END

88
I

12

3

•45

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

SUBROUTINE EQUALZ< ITIME»NTHIS» IHANDI » INT» IBYSTD» IEVAL»

1 XO » YO » I BAR » TOTBAR t XT f YT » NAGREE » XE » YE » I AGREE

.

2 IRANDfP»MOVE»XK»YK»K»L»ISrIGOALX»IGOALYf lENTER)

CC: •'EOUALZ'' (EQUALIZE) CAUS£S THE PROBABILITY VALUES OF THE

O: VARIOUS POSSIBLE MOVES TO BE SET EQUAL TO EACH OTHER* RESULTING IN

C: NO BIASING EFFECT!

C INTEGER X0(20) fY0(20) fXKfYK

DIMENSION IMPOSS (9)» P (9)

NUMP0S=0

DO 1 K=l*9

CALL KPOSS <ITIME*NTHISf IHANDIf INTfIBYSTDflEVAL*

1 XO * YO * IBAR f TOTBAR * XT * YT * NAGREE * XE » YE » I AGREE * 2 IRAND * P * MOVE > XK * YK * K r L * I S * IGOALX * IGOALY * lENTER

)

IF <L»EQ.l) GO TO 2

GO TO 3

2 NUMP0S=NUMP0S+1

IMP0SS(K)=0

GO TO 1 3 IMP0SS(K)=1

1 CONTINUE

DO 4 K=lf9

IF (IMPOSS(K) .EQ.l) GO TO 5

P(K)=1 ,0/FL0AT(NUMP0S>

GO TO 4

5 P(K)=0.0

4 CONTINUE

RETURN

END

12

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

SUBROUTINE TBIAS ( ITIME* NTHIS * IHANDI » INT* IBYSTD* lEVAL

1 XO * YO * I BAR * TOTBAR * XT * YT * NAGREE * XE » YE r I AGREE * 1 I RAND » P f MOVE f XK . YK f K » L * I S » I GOALX * IGOALY 1 1 ENTER

)

C

C: "TBIAS- (THREAT-BIAS) CAUSES THE PROBABILITY VALUES OF THE

C: VARIOUS MOVES TO BE ADJUSTED SO AS TO BIAS TOWARD THREATC: REDUCTION (I.E.* BIASING TOWARD INCREASING THE

C: DISTANCE BETWEEN OCC(NTHIS) AND THE THREAT POINT)!

C

INTEGER X0(20) rY0(20) *XT»YTrXK*YK

DIMENSION M(9)»DIST(9)tP(9)

T0TDST=0.

CC! FOR EACH POSSIBLE MOVE* COMPUTE DISTANCE TO THREAT POINT!

C DO 10 K=l*9

CALL KPOSS (ITIME»NTHIS*IHANDI*INT*IBYSTD*IEVAL»

1 XO * YO * IBAR * TOTBAR* XT * YT * NAGREE * XE * YE * I AGREE * 2 IRAND * P * MOVE * XK * YK * K * L * IS * IGOALX * IGOALY * lENTER

)

IF (L.EQ.l) GO TO 1 M(K)=1

GO TO 10

- -1 - —HIJO=0

DIST(K)=SQRT(FLOAT( (XT-XK)**2+(YT-YK)*»2)

)

TOTDST=TOTDST+DIST(K)

10 CONTINUE

C

C! FOR EACH POSSIBLE MOVE* COMPUTE THE MOVE-PROB.* P(K)!

C

DO 15 K=l*9

IF (M(K).EQ.O) GO TO 2

P(K)=0.

GO TO 15

2 P(K)=DIST(K)/TOTDST

15 CONTINUE

RETURN

END 89
1n3

45

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

SUBROUTINE EBI AS ( ITIME r NTHIS » IHANDI r INT f IBYSTD » lEVAL

»

1 XO»YO»IBAR»TOTBARfXTfYTfNAGREE»XE»YE»IAGREE»

2 IRAND » P » MOVE » XK » YK f K . L f IS f IGOALX » IGOALY » lENTER

)

C

C: THE DISTANCE BETWEEN OCC(NTHIS) AND THE AGREEDtUPON EXIT:

C INTEGER X0(20)fY0<20)»XE(10)»YE(10)»XK»YK

DIMENSION M<9) »DIST(9) » A < 9 ) f P ( 9 ) f I AGREE ( 20

)

DIMENSION IG0ALX(20»10»20) »IG0ALY<20f 10»20)

T0TDST=0.

SUMA=0.

ITEMP=IAGREE(NTHIS)

Cc: FOR EACH POSSIBLE M0VE» COMPUTE THE DISTANCE TO THE

C: AGREED-UPON EXIT:

C DO 10 K=l»9

CALL KPOSS (ITIME»NTHIS»IHANDI»INT»IBYSTD»IEVALr

1 XO » YO , IBAR » TOTBAR » XT r YT r NAGREE » XE » YE » I AGREE

»

2 IRAND f P > MOVE r XK r YK r K » L » IS > IGOALX f IGOALY r lENTER

)

IF (L.EQ.l) GO TO 1 M(K)=1

GO TO 10

1 M<K)=0

DI ST < K ) =SQRT ( FLOAT ( ( IGOALX ( IS » ITEMP f NTHIS ) -XK ) **2+

1 ( IGOALY ( IS F ITEMP f NTHIS ) -YK ) ##2 )

)

TOTDST=TOTDST+DIST(K)

10 CONTINUE

C

C: FOR EACH POSSIBLE MOVEf COMPUTE MOVE-PROB. VALUESf P(K).

C: IF DIST(K)=0»0f move K is SELECTED. IF DIST(K)=0.0 FOR

c: MORE THAN ONE MOVE ALTERNATIVE f THEN THE MOVE-PROBS. FOR

C: THESE ARE EQUALIZED!

C DO 15 K=1f9

IF (M(K).EQ.l) GO TO 15

IF (DIST(K) .EQ.O. ) GO TO 15

A(K)=TOTDST/DIST(K)

SUMA=SUMA+A(K)

15 CONTINUE

C K=0

2 K=K+1

IF (M(K).EQ.l) GO TO 3 IF <DIST(K) .EQ.O. ) GO TO 5

P(K)=A(K)/SUMA

GO TO 4 3 P<K)=0.

4 IF (K.LT.9) GO TO 2

RETURN

5 ZER0=0.

DO 20 K=1f9

IF(M(K).EQ.1> GO TO 20

IF (DIST (K).EQ.O.) GO TO 6

GO TO 20

6 ZER0=ZER0+1.

20 CONTINUE

DO 25 K=1f9

IF (M(K).EQ.l) GO TO 707

IF <DIST(K) .EQ.O. ) GO TO 7

707 P<K)=0.0

GO TO 25

7 P(K)-1./ZER0

25 CONTINUE

RETURN

END

90
12

3

A5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

12

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

SUBROUTINE KPOSS < ITIME » NTHIS f IHANIU » INT » IBYSTD f lEOAL

»

1 XD » YO r IBAR f TOTBAR > XT » YT » NA6REE f XE » YE r I AGREE » IRAND r 2 P»MOVE»XK»YK»K»L»IS»IGOALXf IGOALYflENTER)

DIMENSION IBAR < 20 f 75 » 2 ) » lENTER ( 9

)

INTEGER X0(20) »Y0(20) »XK»YKf TOTBAR

CALL KTOXY < ITIME»NTHIS» IHANDI » INT» IBYSTD» IEVAL»

1 XO » YO » IBAR » TOTBAR r XT » YT » NAGREE » XE » YE » I AGREE » IRAND

»

2 P,MOVE»XK»YK»K)

ICR0SS=(X0(NTHIS)+XK)/2

JCR0SS=(Y0(NTHIS)+YK)/2

1=0

J=1

1 1 = 1+1

IF (I.GT. TOTBAR) GO TO 5 IF (IBAR<ISfIfJ) .EQ.ICROSS) GO TO

GO TO 1 J= J+1

IF (IBAR(ISfIf J) .EQ.JCROSS) GO TO

J=J-1

GO TO 1 4 CONTINUE

L=0

GO TO 6

5 L=1

IF (lENTER(K) .EQ.O) GO TO 4 6 CONTINUE

RETURN

END

SUBROUTINE JAMMED ( ITIME.NTHIS» IHANDI » INT» IBYSTDf IEVAL»

1 XO F YO F IBAR F TOTBAR f XT f YT f NAGREE f XE f YE f I AGREE f IRAND f 2 P F MOVE F XK F YK F K F I ALLOW f NUMOCC f IENTER

)

INTEGER X0<20) fY0(2O) fXKf YKfXE( 10) f YE( 10)

DIMENSION JAM<9) fIENTER(9)

DO 100 K=1f9

CALL KTOXY < ITIME f NTHIS f IHANDI f INTf IBYSTDf IEVALf

1 XO F YO F IBAR fTOTBAR f XT f YT f NAGREE f XE f YE f I AGREE f IRAND f 2 PfMOVEfXKfYKfK)

JAM(K)=0

DO 200 N= If NUMOCC

IF (N.EQ.NTHIS) GO TO 200

IF ( (XO(N) .EQ.XK) .AND. (YO(N) .EQ.YK) ) GO TO 1 GO TO 200

1 JAM(K)=JAM<K)+1

200 CONTINUE

IF ((XK.EQ.XE(1)).AND.<YK.EQ.YE(1))) GO TO 2

IF ( JAM(K) .LT.IALLOU) GO TO 2

GO TO 3

2 IENTER(K)=1

GO TO 100

3 IENTER (K)=0

100 CONTINUE

RETURN

END

91
12

3

45

6

7

8

9

10

1112

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

123

4

5

67

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

non

1

2

3

4

5

6

7

8

9

10

SUBROUTINE KTQXY( ITIME»NTHIS» IHANDI f INT» IBYSTDf IEVAL»

1 XO r YO > I BAR t TOTBAR r XT f YT » NAGREE f XE f YE » I AGREE p IRAND p 2 PpMOUEpXKpYKpK)

INTEGER X0(20) pY0(20) pXKpYK

GO TO (1p2p3p4p5p6p7p8p9) pK

XK=X0(NTHIS)-2

YK=Y0(NTHIS)-2

GO TO 10

XK=X0<NTHIS)-2

YK=YO(NTHIS)

GO TO 10

XK=X0(NTHIS)-2

YK=Y0(NTHIS)+2

GO TO 10

XK=XO(NTHIS)

YK=Y0<NTHIS)-2

GO TO 10

XK=XO(NTHIS)

YK=YO<NTHIS)

GO TO 10

XK=XO<NTHIS)

YK=Y0(NTHIS)+2

GO TO 10

XK=X0(NTHIS)+2

YK=Y0(NTHIS)-2

GO TO 10

XK=X0(NTHIS)+2

YK=YO(NTHIS)

GO TO 10

XK=X0(NTHIS)+2

YK=Y0(NTHIS)+2

RETURN

END

SUBROUTINE OOORSl ( ITIMEpNTHISp IHANDI p INT p IBYSTDp IEVALp

1 XO p YO p IBAR p TOTBAR p XT p YT p NAGREE p XE p YE p IAGREE p 2 IRAND p P p MOUE p XK p YK p K pL p IS p IGOALX p IGOALY p lENTER p 3 X p I DOOR p POPEN p NO p MDOOR p PCLOSE p NOEXP p LOUEXP p IHIEXP p 4 ITOTALpISMOKEpTSMOKEpIX)

DIMENSION P(9) pID00R(30p4) pP0PEN(20)

I NTEGER XO ( 20 > p YO ( 20 ) p XK p YK p TOTBAR

: DETERMINE WHETHER OCC(I> ENCOUNTERS A DOORt

K=0

5 K=K+1

CALL KTOXY < ITIMEpNTHISp IHANDI p INTp IBYSTD p IEVALp

1 XO p YO p I BAR p TOTBAR p XT p YT p NAGREE p XE p YE p IAGREE p 2 IRANDpPpMOUEpXKpYKpK)

ICROSS= < XO < NTHIS ) +XK ) /2

JCROSS= ( YO < NTH I S ) +YK ) /2

1=0

J=0

J=1

3 1=1+1

IF (I.GT.ND) GO TO 1 IF (IDOOR(IpJ) .EQ.ICROSS) GO TO 2

GO TO 3

J= J+1

IF (IDOORdp J) *EQ. JCROSS) GO TO 4

J«J-1

GO TO 3

1 MD00R=0

IF (K.EQ.9) GO TO 999

GO TO 5

92
33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

12

3

45

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

uc: DOOR IS encountered:

c

4 IX=I

MDOOR=K

Cc: IF DOOR IS ALREADY OPEN» RETURN:

C IF <ID00R(I»4) .EQ.l) GO TO 999

X=RANDNU(0)

IF (X) 55»56»56

55 X=X»(-1)

56 IF <X.LT.POPEN(NTHIS) ) GO TO 6

C

C: OCC(I) OPENS CLOSED DOOR:

C ID00R(I»4)=1

RETURN

C

C: OCC(I) LEAVES DOOR CLOSED:

C

6 P(MD00R)=0.0

C

c: OCC(I) CHOSES TO LEAVE DOOR CLOSED:

c: REDISTRIBUTE MOVE PROBABILITIES:

C K=0

SUM=0.0

NP0SS=0

7 K=K+1

IF (K.GT.9) GO TO 9

CALL KPOSS <ITIME»NTHIS»IHANDI»INT»IBYSTD»IEVAL»

1 XO » YO » I BAR » TOTBAR » XT » YT r NAGREE f XE f YE » I AGREE

»

2 I RAND » P r MOVE » XK » YK » K » L f I S » I GOALX f IGOALY » I ENTER

)

IF (L.EQ.l) GO TO 8

GO TO 7 8 NP0SS=NP0SS+1

SUM=SUM+P(K)

GO TO 7

9 DIFF=1. 0-SUM

SHARE=DIFF/FLOAT ( NPOSS

)

DO 25 K=l»9

CALL KPOSS (ITIMEfNTHIS»IHANDI»INTf IBYSTD» IEVAL»

1 XO r YO » IBAR r TOTBAR f XT » YT » NAGREE » XE » YE r I AGREE

»

2 IRANI! , p , MOVE f XK f YK » K » L » IS » IGOALX » IGOALY » lENTER

)

IF (L.EQ.l) GO TO 10

GO TO 25

10 P(K)=P(K)+SHARE

25 CONTINUE

999 RETURN

END

SUBROUTINE D00RS2 < ITIME »NTHIS» IHANDI » INT f IBYSTDf lEVAL

»

1 XO f YO » IBAR » TOTBAR » XT » YT f NAGREE f XE » YE f I AGREE

»

2 IRAND»P»MOVE»XK»YK»K»L»ISf IGOALX»IGOALYf lENTERf

3 X » I DOOR » POPEN » ND » MDOOR » PCLOSE » NOEXP » LOWEXP » IHIEXP

.

4 ITOTALfISMOKEfTSMOKEfIX)

DIMENSION ID00R(30»4>»PCL0SE(20)

C

C: DETERMINE UHETHER OCC(I) CLOSES (A MANUAL) DOOR BEHIND HIM:

C IF ( MDOOR. EQ.O) RETURN

IF < MOVE. EQ. MDOOR) GO TO 1 RETURN

1 IF (ID00R(IX»3) .EQ.O) GO TO 2

RETURN

2 X=RANDNU(0)

IF <X) 55»56»56

55 X=X*(-1)

56 IF (X.LT.PCLOSECNTHIS) ) RETURN

ID00R(IX»4)=0

RETURN

END
12

3

A5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

12

3

45

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

SUBROUTINE EVAL8 ( XO » YO » XT » YT » XE » YE » NTHIS

r

1 lAGREEf ITIME,IEUALrPTDISTfTDISTfPEDIST»

1

EDIST»IS>IGOALX»IGOALY)

INTEGER X0<20) »Y0<20) »XE(10) »YE(10) »XT»YT

DIMENSION PTDIST(20) »IG0ALX<20»10»20) »IG0ALY<20»10»20)

DIMENSION PEDIST(20) f IAGREE(20)

ITEMP=IAGREE(NTHIS)

IF ( (XT.GT.O) .AND. (YT.GT.O) ) GO TO 1 IF (ITEMP.GT.O) GO TO 2

GO TO 6

1 TDIST=SQRT(FLOAT< (X0(NTHIS)-XT)#»2+

1 (Y0(NTHIS)-YT)»»2)

)

IF (ITIME.GT.l) GO TO 50

PTDIST(NTHIS)=TD1ST

50 TCHANG=TDIST-PTDIST<NTHIS)

IF (ITEMP.GT.O) GO TO 2

IF (TCHANG.GE.O. ) GO TO 5

GO TO 6

2 EDIST=SQRT(FLOAT( (XO(NTHIS)-IGOALX(IS»ITEMPfNTHIS) )##2

1 +(YO(NTHIS)-IGOALY(IS»ITEMPi-NTHIS) )*»2)

)

IF (ITIME.GT.l) GO TO 55

PEDIST(NTHIS)=EDIST

55 ECHANG=EDIST-PEDIST(NTHIS)

IF ( (XT.GT.O) .AND. (YT.GT.O) ) GO TO 3

IF (ECHANG.LE.O. ) GO TO 5

GO TO 6

3 IF ( (TCHANG.GE.O. ) .AND. (ECHANG.LE.O. ) ) GO TO 5

GO TO 6

5 IEUAL=1

GO TO 7 6 IEUAL=0

7 PTDIST(NTHIS)=TDIST

PEDIST(NTHIS)=EDIST

RETURN

END

SUBROUTINE EUAL20 (MXTIME»MK»XO»YO»XEf YE»NTHIS»IAGREE»

1 ITIMEf Cf IEUAL»TOTIMEfXT»YT)

INTEGER X0(20) fY0(20) fXE(lO) »YE(10) fXT»YT»TOTIME

DIMENSION IAGREE(20)

ITEMP=IAGREE(NTHIS)

IF (ITEMP.EQ.O) GO TO 5 TEST=SQRT(FLOAT( (XO(NTHIS)-XE(ITEMP) )**2+

1 (Y0(NTHIS)-YE(ITEMP))**2))

5 CONTINUE

IF ( (XT.GT.O) .AND. (YT.GT.O) ) GO TO 10

IF (ITEMP.GT.O) GO TO 20

GO TO 50

10 IF (ITEMP.GT.O) GO TO 20

GO TO 30

c: escape-penalty:

20 IF (ITIME.LE.MXTIME) GO TO 21

TIME=ITIME

TTIME=TOTIME

TDIST=TTIME-TIME

GO TO 22

21 TDIST=TTIME-(FLOAT(MXTIME)

)

22 IF (TEST.LE.TDIST) GO TO 51

GO TO 50

C: THREAT-EVASION PENALTY!

30 QTEST=SQRT(FLOAT( (X0(NTHIS)-XT)#*2+

1 (Y0(NTHIS)-YT)»»2)

)

IF (ITIME.LE.MXTIME) GO TO 31

TIME=ITIME

TDIST-TIME

GO TO 32

31 TDIST«=0.0

32 IF (QTEST.GE.TDIST) GO TO 51

50 IEVAL=0

RETURN

51 IEUAL=1

RETURN 94

END
12

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

12

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

SUBROUTINE INTRPT ( ITIME»NTHIS» IHANDI » INT. IBYSTDr lEVALf

1 XO » YO » I BAR » TOTBAR » XT » YT » NAGREE » XE » YE » I AGREE

»

2 IRANI! , P f MOUE r XK » YK » K » L » I S » IGOALX » IGDALY » lENTER

»

3 Xf INTLIM»INTR»INTNUM.PI2»PI0)

DIMENSION INTNUM(20)iINTLIM(20)

DIMENSION INTR(20)

IF <INTR(NTHIS) .EQ»1) GO TO 1 IF (INTNUM(NTHIS) .LE.INTLIM(NTHIS) ) GO TO 2

INT=0

RETURN

1 INT=2

RETURN

2 X=RANDNU(0)

IF (X) 5»6»6

5 X=X*<-1)

6 CONTINUE

IF <X.LT,PI2) GO TO 3 IF (X.LT.PIO) GO TO 4

INT=1

INTNUM<NTHIS>=INTNUM(NTHIS)+1

RETURN

3 INTNUM<NTHIS)=INTNUM(NTHIS)+1

INTR(NTHIS)=1

INT=2

RETURN

4 INT=0

RETURN

END

SUBROUTINE BACKUP ( IBACKf X0» YOf INITXOr INITYO f XOB» YOB»

1 ITIME»NTHIS.NEUXO»NEWYOf INTRrJTIME)

DIMENSION IBACK(20)»INITX0(20>»

1

INITY0(20)f JTIME(20)»INTR(20)

INTEGER X0B<20»100)»Y0B(20f 100)»X0<20>»Y0(20)

IF (IBACK(NTHIS) ,EQ.O) GO TO 1 IF ( (XO(NTHIS) .EQ.INITXO<NTHIS) ) .AND.

1 (YO(NTHIS) .EQ.INITYO(NTHIS) ) ) GO TO 3

1 IBACK(NTHIS)=IBACK(NTHIS)+1

IF <IBACK(NTHIS) .EQ.l) GO TO 2

JTIME(NTHIS)=JTIME<NTHIS)-1

GO TO 4 2 IF <ITIME.GT.l) GO TO 21

JTIME(NTHIS)=1

GO TO 4

21 JTIME(NTHIS)=ITIME-1

4 KTIME=JTIME(NTHIS)

NEUXO=XOB(NTHIS»KTIME)

NEUYO=YOB(NTHIS»KTIME)

RETURN

3 INTR(NTHIS)=0

IBACK(NTHIS)=0

RETURN

END

95
123

45

6

78

9

10

11

12

3

45

6

12

3

4

5

6

7

8

9

10

1112

13

14

15

16

17

18

19

20

21

12

3

45

6

7

8

9

10

1112

13

14

15

16

17

18

19

20

21

22

23

nnonnnnnoono

1

SUBROUTINE NEUXY ( ITIME»NTHIS» IHANDI » INT» IBYSTDf IEVAL»

1 XO»YO»IBAR»TOTBARfXT»YT»NAGREEfXEfYE»IAGREE»

2 I RAND » P » MOVE f XK > YK » K » NEUXO » NEUYO

)

INTEGER XK»YK

CALL KTOXY < ITIME»NTHIS» IHANDI » INT» IBYSTD» lEVALf

1 XO»YO. IBAR»TOTBAR»XTfYT»NAGREE»XEfYE»IAGREEr

2 IRAND»PfMOOEfXK»YKfK)

NEUXO=XK

NEUYO=YK

RETURN

END

SUBROUTINE UPDATE < XO » YO » NTHIS f NEUXO » NEUYO

)

INTEGER X0(20) »Y0(20)

XO(NTHIS)=NEUXO

YO(NTHIS)=NEUYO

RETURN

END

CC

C

C

CC SUBROUTINE XSCORE

C

C THE PURPOSE OF XSCORE IS TO COMPUTE EACH OCCUPANT'S ESCAPE SCORE FOR THE

C ENTIRE EVENT, I.E., SCORE=(TOTAL TIME AVAILABLE - CURRENT TIME FRAME)

C DIVIDED BY THE TOTAL TIME AVAILABLE

C SUBROUTINE XSCORE (TOTIME, ISCORE,NUMOCC, SCORE)

DIMENSION ISC0RE(20) ,SC0RE(20)

INTEGER TOTIME

SUMTIM=TOTIME

DO 10 NTHIS=1,NUM0CC

E=ISCORE(NTHIS)

C COMPUTE THE OCCUPANT'S ESCAPE SCORE FOR THE ENTIRE EVENT

10 SCORE<NTHIS)=(SUMTIM-E)/SUMTIM

RETURN

END

SUBROUTINE STEPS

THE PURPOSE OF STEPS IS TO KEEP TRACK OF THE TOTAL NUMBER OF SPATIAL

RELOCATIONS ('STEPS') ACTUALLY MADE BY EACH OCCUPANT DURING THE FIRE EVENT

...A STEP IS DEFINED AS A SPATIAL RELOCATION, AND THEREFORE, REMAINING-INPLACE IS NOT RECORDED AS A STEP

SUBROUTINE STEPS (XPRIOR,YPRIOR,XO,YO,NUMSTP,NTHIS)

INTEGER XPRI0RC20) ,YPRI0R<20) ,X0<20) ,Y0(20)

DIMENSION NUMSTP(20)

C RECORD UHETHER THE OCCUPANT MOVED DURING THE TIME FRAME JUST ENDED, THAT IS,

C UHETHER ( XPRIOR . NE . XO) . AND . ( YPRIOR . NE . YO

)

IF ( (XPRIOR (NTHIS) .EQ.XO(NTHIS) ) .AND. (YPRIOR (NTHIS) .EQ.YO(NTHIS) )

)

1 GO TO 999

C UPDATE THE TOTAL NUMBER OF STEPS TAKEN BY THE OCCUPANT DURING THE EVENT

NUMSTP( NTHIS )=NUMSTP( NTHIS )+l

999 RETURN

END

96
12

3A5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

nnnnnnnnnn SUBROUTINE PASSG

THE PURPOSE OF PASSG IS TO KEEP TRACK OF DOOR-PASSAGE BEHAVIOR EXHIBITED BY

OCCUPANTS

SUBROUTINE PASSG ( IDPASSf IDOORf X0» YOf NTHISr

1 NDrNEUXOfNEUYO)

DIMENSION IDPASS(20) f ID00R<30f4)

INTEGER X0(20) »Y0(20)

C DETERMINE WHETHER THE OCCUPANT PASSED THROUGH A DOORWAY DURING THE TIMEC FRAME JUST ENDED

IXPASS=<NEWXO+XO<NTHIS) )/2

IYPASS=(NEWYO+YO(NTHIS) )/2

DO 10 I=1»ND

IF <<ID00R(I»1).EQ.IXPASS).AND.

1 <ID00R(I»2) .EQ.IYPASS) ) GO TO 5

GO TO 10

C UPDATE THE TOTAL NUMBER OF DOOR PASSAGES MADE BY THE OCCUPANT DURING THE

C FIRE EVENT

5 IDPASS(NTHIS)=IDPASS(NTHIS)+1

10 CONTINUE

RETURN

END

97
12

3

A56

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

SUBROUTINE REPORT

C

C

C

C

C

C

C

C THE PURPOSE OF REPORT IS TO PRINT-OUT A SUMMARY TABLE FOR EACH TIME-FRAME

C OF A GIVEN REPLICATION. . .EACH TABLE REPORTS RESULTS OF THE DECISION

C PROCESS FOR EACH OCCUPANT IN THE TIME FRAME> PARTICULARLY MOVE PROBABILITY

C VALUES ASSIGNED TO EACH AVAILABLE MOVE ALTERNATIVE AT THAT POINT IN TIME

C ...X»Y COORDINATES ARE ALSO SHOWN FOR BOTH TIMES T AND T+l» FOR EACH

C OCCUPANT IN THE TIME FRAME

C

SUBROUTINE REPORT < ITIME»NTHIS» IHANDI r INTf IBYSTD» lEVALr

1 XO » YO 1 1 BAR » TOTBAR » XT » YT » NAGREE » XE » YE » I AGREE

2 IRAND»PfMOVE»XK»YK»KfNUMEXT»NUMOCC»TOTIME.INTLIM»

3 KNOWAY»PTDISTfTDISTfPEDIST»EDIST»NEWXO»NEUYO»

4 EVLOPTf IDOOR.IDOPENfNDfINTR)

DIMENSION IBAR (20.75f 2) » INTLIM(20) » IHANDI

1 ( 20 ) » KNOWAY ( 20 ) » IBYSTD ( 20 ) » P < 9 ) t INTR ( 20

)

DIMENSION IDOOR ( 30 » 4 ) » IDOPEN ( 30 f 100 ) » lAGREE ( 20

INTEGER XE(IO) »YE(10)»X0(20) »Y0<20) »XT»YT»TOTIME»

1 XKfYKfEVLOPT

C

IF ( (ITIME.GT.l) .OR. (NTHIS.GT.l) ) GO TO 1 CC: ECHO:CHECK INPUT PARAMETERS*

cj ( 1 ) environmental:

c write (6»100)

WRITE (6»101) XTfYT

WRITE (6»102) NUMEXT

WRITE (6»104)

C

c:c

cc:

c

c

1c

c

c:c

WRITE (6»105) <XE(I) »I=1»NUMEXT)

WRITE (6»106) (YE(I)»I=1, NUMEXT)

(2) system:

WRITE (6»109) NUMOCC

WRITE (6»110) TOTIME

WRITE (6»111) IRAND

<3) occupant:

WRITE (6»112)

WRITE <6»113) (INTLIM(I) »I=1»NUM0CC)

WRITE (6fll5) <IHANDI(I) .I=lfNUM0CC)

WRITE (6»116) (KN0WAY(I)»I=1»NUM0CC)

WRITE (6»117)

CONTINUE

IF (NTHIS.NE.l) GO TO 2

IF NTHIS=lt PRINT CURRENT TIME MARKER AND COLUMN HEADINGS:

WRITE (6,118)

WRITE (6,119) ITIME

WRITE (6,118)

WRITE (6,120)

WRITE (6,118)

C

C

2 IF (INTR(NTHIS) .EQ.l) 60 TO 22

C

C: WRITE OUTPUT MATRIX:

IF (EVLOPT-1) 20,20,21

20 CONTINUE

WRITE (6,121 ) NTHIS,XO(NTHIS) ,YO(NTHIS) ,INT, IBYSTD (NTHIS), I AGREE

1 (NTHIS) ,TDIST,EDIST, (P(K) ,K=1,9) ,NEWXO,NEWYO

GO TO 23 98
73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

21 WRITE (6»123) NTHIS»X0(NTHIS) » YO(NTHIS) » INT» IBYSTD(NTHIS)

»

1 lAGREE(NTHIS) f (P(K) »K=lf9) »NEWXO»NEWYO

60 TO 23

22 WRITE (6»127) NTHIS » XO ( NTHIS ) » YO < NTHIS ) r INT

»

1 NEWXOfNEWYO

23 CONTINUE

IF (NTHIS.EQ.NUMOCC) 60 TO 3

GO TO 4

3 WRITE (6»118)

4 IF ( (ITIME.EQ.TOTIME) .AND. (NTHIS.EQ.NUMOCC) ) GO TO 5

GO TO 6

5 WRITE (6»118)

WRITE (6»124)

WRITE (6.118)

WRITE (6.125)

WRITE (6.118)

DO 30 1=1. ND

WRITE (6.126) I.IDOOR(I.l) .ID00R(I.2) .ID00R(I.3)

.

1 (ID0PEN(I.ITM).ITM=1.T0TIME)

30 CONTINUE

WRITE (6.118)

WRITE (6.122)

WRITE (6.118)

GO TO 6

c: OUTPUT formating;

C100 FORMAT ( 1 ('*')./

101 FORMAT ' 102 FORMAT ' 103 FORMAT ( 104 FORMAT ' 1 /)

105 FORMAT ' 106 FORMAT ' 107 FORMAT ' 108 . FORMAT 1 109 FORMAT

1 .13)

110 FORMAT

111 FORMAT

112 FORMAT

1 4 5 < 113 FORMAT

115 FORMAT

116 FORMAT

117 FORMAT

118 FORMAT

119 FORMAT

120 FORMAT

1 'AGREED

2 PTDIS'

3 P(7) 1 121 FORMAT

1 9(F5.3

122 FORMAT

123 FORMAT

1 12.3:

124 FORMAT

125 FORMAT

16 7

2 24 25

126 FORMAT

127 FORMAT

6 RETURN

END

Y=' .12)

//.IX. '(1) environmental;'./)

(24X. 'THREATENED EXIT; X= '.I2.4X.

(24X. 'NUMBER OF EXITS; = '.12)

(24X.'N0. OF BARRIER PTS='.I3./)

(24X. 'COORDINATES OF EXITS; 1 2

(43X.'X; '.10(12. IX))

(43X.'Y; ' .10(12. IX) ./)

.38(I2.1X) ./.2X. 'Y; ' .38(I2.1X)./)

8 9 10'

.

(24X. 'RANDOM NUMBER STARTER .13./)

6 7 8 9 10 11 12 13 1 4 15 16 17 18 19 20'./)

(12X. 'INTLIM'.15X.20(I2.1X)

)

(12X. 'IHANDI' .15X.20(I2.1X)

(12X. 'KNOWAY' .15X.20(I2.1X) ./)

(2(1X.120( '»')./)

)

(1X.120( '' ) ./)

(IX. 'TIME = '.13./)

(6X. 'PRIOR' .18X. 'EXIT' .89X. 'NEW' ./.IX. 'OCC' .2X. 'LOCAT' .17X.

' .87X. 'LOCAT' ./.IX. 'NUM' .2X. 'XO YO INT IBYSTD UPON

T TDIST PEDIST EDIST P(l) P(2) P(3) P(4) P(5) P(6)

P(8) P(9)'.6X.'X0 YO'./)

. 'DOOR' .4X. 'X Y' .5X. 'TYPE' .5X. 'T= 1234

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

26 27 28 29 30'./)

99
12

3

A5

6

7

8

9

10

1112

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

C

Cc

cc

C SUBRO'J'flNE SUMMRY

C

C THE PURPOSE OF SUMMRY IS TO PRINT-OUT A SUMMARY TABLE FOR EACH REPLICATION

C RUN. .OUTPUT VALUES ARE 'GRAND MEANS' TAKEN ACROSS OCCUPANTS AND TIMEC FRAMES » AND REPORT AGGREGATED SCORES AND FINAL STATUS AT THE END OF THE

C LAST TIME FRAME FOR EACH REPLICATION

C

SUBROUTINE SUMMRY < INITXO» INITYO» INTLIM» LBYSTD» IHANDI r KNOUAY

1 POPEN , PCLOSE » SCORE » NUMSTP f IPS » 1 1 1 » NUMREP » NUMOCC f TOTIME

2 XO r YO » XE F YE » TITLE f IXHELP » I YHELP » TSMOKE » PHELP

)

DIMENSION IXHELP(20> » IYHELP(20) »PHELP<20)

DIMENSION INITX0(20) f INITY0(20) »INTLIM(20) »LBYSTD(20) » IHANDI (20)

r

1 KNOUAY ( 20 ) r POPEN ( 20 ) » PCLOSE < 20 ) » SCORE ( 20 ) » NUMSTP ( 20 ) f IPS ( 20

)

DIMENSION NUMBER(20> fSMEAN(20) rDMEAN<20) r DIST(20> »DEINIT(20)

f

1 DIFF(20)»DFMEAN(20)»TITLE<20)

REAL NMEAN(20) »IMEAN<20>

INTEGER T0TIME»X0(20) fY0(20) »XE(10) »YE(10) fTSM0KE(20)

DIFT0T=0.0

DT0TAL=0.0

ST0TAL=0.0

200

55

III»NUMREPfTOTIME

(NUMBER(N) fN=lf20)

NT0TAL=0

IT0TAL=0

NSUM=NUMOCC*NUMREP

SUM=NSUM

AN=NUMOCC

WRITE (6»100)

WRITE (6»134) TITLE

WRITE (6fll9)

WRITE (6»102)

WRITE (6»103)

WRITE (6»119)

WRITE (6fl04)

WRITE <6»102)

WRITE (6»119)

WRITE (6»105)

WRITE <6»119)

WRITE (6»106)

DO 200 N=1.20

NUMBER(N)=N

CONTINUE

WRITE <6»107)

WRITE (6»101)

DO 55 K=lf NUMOCC

DEINIT(K)=SQRT( ( (INITXO(K)-XE(l) )»*2)+< (INITYO(K)-YE(l) )*»2)

)

(DEINIT(K) »K=lrNUMOCC)

(INITXO(K) »K=1»NUM0CC)

(INITYO(K) fK=l»NUMOCC)

135)

<IXHELP<K) »K=1»NUM0CC)

1 36

)

( I YHELP ( K ) f K= 1 f NUMOCC

)

(INTLIM(K) »K=1»NUM0CC)

(LBYSTD(K) »K=1»NUM0CC)

(IHANDI(K) »K=lfNUMOCC)

( KNOWAY < K ) » K=1 » NUMOCC

)

137)

(TSMOKE <K) fK=l»NUMOCC)

(POPEN(K) rK=l»NUMOCC)

(PCLOSE (K) »K=1» NUMOCC)

138)

(PHELP(K) »K=1»NUM0CC)

(NUMBER(N) >N-:1»20)

C.. COMPUTE REPLICATION MEANS...

DO 20 K=lf NUMOCC

DIST(K)-8QRT( ( (XE(l)-XO(K) ) *»2)+( ( YE( 1 )-YO(K) )»*2)

)

100

WRITE (6 f 131

WRITE (6 f 108

WRITE (6 f109

WRITE (6 »135

WRITE (6 f 136

WRITE (6 »110

WRITE (6 fill

WRITE (6 f 112

WRITE (6 f 113

WRITE (6 f 137

WRITE (6 f 114

WRITE (6 f 115

WRITE (6 f 138

WRITE (6 f 102

WRITE (6 rll9

WRITE (6 f 116

WRITE (6 f 119

WRITE (6 f 106

WRITE (6 f 107

WRITE (6 f 101
73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

20

DT0TAL=DT0TAL+DIST<K)

ST0TAL=ST0TAL+SC0RE<K)

NT0TAL=NT0TAL+NUMSTP ( K

)

IT0TAL=IT0TAL+IPS(K)

SMEAN( III)=ST0TAL/AN

NMEAN(III)=FL0AT(NT0TAL)/AN

IMEAN( III)=FL0AT( ITOTAD/AN

DMEAN (III) =DTOTAL/AN

DO 201 K=lrNUMOCC

DIFF(K)=DEINIT<K)-DIST(K)

DIFTOT=DIFTOT+DIFF(K)

201 NUMSTP(K)=NUMSTP(K)+1

WRITE <6fl27) <XQ(K) fK=lfNUMOCC)

<Y0(K)»K=1»NUM0CC)

(DIST(K) »K=1»NUM0CC)

( DIFF ( K ) » K=1 » NUMOCC

)

( SCORE <K) »K=1 »NUMOCC)

(NUMSTP(K) »K=1»NUM0CC>

(IPS(K) »K=1» NUMOCC)

301

300

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

120

119

121

122

123

124

125

126

127

128

129

130

131

132

WRITE <6»128)

WRITE <6»129)

WRITE (6»132)

WRITE (6»117)

WRITE (6»118)

WRITE (6»120)

COMPUTE NESCAP...

NESCAP=NUMOCC

DO 300 L=l» NUMOCC

IF (SCORE(L) .LE. 0.001 ) GO TO 301

GO TO 300

NESCAP=NESCAP-1

CONTINUE

WRITE (6»126) NESCAP

WRITE <6»102)

WRITE (6»122) NUMOCC

WRITE (6fl30) DMEAN(III)

DFMEAN (III) =DIFTOT/AN

<6»133) DFMEAN(III)

(6»123) SMEAN(III)

(6»124) NMEAN(III)

(6»125) IMEAN(III)

( 6 » 101 )

(

1 '

)

(130( '»' )

)

<130( ) ,/»130( )

)

(57X» 'SIMULATION SUMMARY')

(3X» 'REPLICATION' » I5» ' OF ' r 15 » 70X »

' RUN F0R'»I4»

1 ' TIME FRAMES'

)

FORMAT (57X» 'INITIAL CONDITIONS')

FORMAT (63Xf 'OCCUPANT NUMBER')

(11X»20(I2»3X)

)

(3X» 'INITXO' f 1X»29(I3»2X) f 13)

FORMAT (3X» 'INITYO' fix » 29(13 f2X) » 13)

FORMAT (3Xf 'INTLIM' f lXf29(I3f2X) f 13)

FORMAT ( 3X f

' LBYSTD ' f IX f 29 ( 13 f 2X ) r 13

)

FORMAT (3Xf 'IHANDl' fix f 29(13 f2X) f 13)

FORMAT (3Xf 'KNOWAY' f IXf 29( I3f 2X) f 13)

FORMAT <3Xf'P0PEN ' f IXf 29(F3.2f 2X) f F3.2)

FORMAT (3Xf 'PCLOSE' f lXf29(F3,2f2X) fF3.2)

FORMAT (58Xf 'OUTCOMES'

)

FORMAT (3Xf'SC0RE ' f IXf 20(F4.2f IX)

)

FORMAT <3Xf 'STEPS ' f IXf 20( I3f 2X)

)

FORMAT < 3X f ' PASSES ' f 1 X f 20 ( 13 f 2X )

)

(

' ' ) (57Xf'END OF REPLICATION')

FORMAT (9Xf 'MEANS COMPUTED ACROSS' fI3f' OCCUPANTS...')

FORMAT (20Xf'MEAN SCORE = 'fF4.2)

FORMAT <20Xf'MEAN STEPS = 'fF6.2)

FORMAT (20Xf'MEAN PASSES ='fF6.2)

FORMAT <3Xf 'NUMBER ESCAPED' f5Xf 13)

FORMAT (3Xf'FIN X ' f IXf 20( I3f 2X)

)

FORMAT (3Xf'FIN Y ' f IXf 20( I3f 2X )

)

<3Xf'DIST ' flXf20(F4.1f IX)

)

(20Xf'MEAN DIST = 'fF4.D

FORMAT (3Xf'INIT D' f IXf 20(F4 . 1 f IX)

)

FORMAT (3Xf'DIFF D'f 20(F5.D)

101

WRITE

WRITE

WRITE

WRITE

WRITE

FORMAT

FORMAT

FORMAT

FORMAT

FORMAT

FORMAT

FORMAT

FORMAT

FORMAT

FORMAT

FORMAT
144

145

146

147

148

149

150

151

12

3

45

6

78

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

(JCJUUUUUUCJUUU

f'l

CN

CN

M'TliT

133 FORMAT

134 FORMAT

135 FORMAT

136 FORMAT

137 FORMAT

138 FORMAT

RETURN

END

(20X»'MEAN DIFF D ='»F4.1)

(IXf'RUN TITLE/ '»20A4)

<3X» 'IXHELP' fix » 29(13 f 2X) » 13)

<3Xf 'lYHELP'f lXf29(I3f2X) r 13)

(3Xf 'TSMOKE' f lXf29(I3f2X) f 13)

(3Xf 'PHELP' f2Xf29(F3.2f2X)F3.2)

SUBROUTINE TRACE

THE PURPOSE OF TRACE IS TO PRINT-OUT A SUMMARY TABLE FOR EACH OCCUPANT IN

A GIVEN REPLICATION. . .EACH SUCH TABLE TRACES THE SPATIAL DISPLACEMENT

(CHANGE IN XfY COORDINATES) OF EACH OCCUPANT ACROSS THE ENTIRE SIMULATED

EVENT

SUBROUTINE TRACE ( IXTRCE r I YTRCE r NTHIS f ITIME r NUMOCC

f

1 TOTIME)

DIMENSION IXTRCE(20f 100) f IYTRCE(20fl00)

INTEGER TOTIME

WRITE (6fl)

DO 25 1=1 f NUMOCC

WRITE (6f2) I DO 24 J=lf TOTIME

WRITE (6f3) Jf IXTRCEdf J)fIYTRCE(If J)

CONTINUE

WRITE (6f4)

CONTINUE

WRITE (6f5)

FORMAT (IXf 120( '*' ) f//f48Xf

1 'OCCUPANT MOVEMENT TRACES ' f // f IXf 120 ('')

)

FORMAT (lXfl20( '*') f//flXf 'OCCUPANT NUMBER r 14 r /

f

1 lOXf 'TIME'f/flOXf 'FRAME'flOXf 'X'fSXf 'Y'f/f

2 lXfl20('*'))

FORMAT (12Xf I2f lOXf I2f4Xf 12)

FORMAT dXfl20('*'))

FORMAT (lXrl20( '»' ) f//f55Xf 'END OF TRACES' f//r

1 lXfl20('»'))

RETURN

END

102
1n3

45

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

C

C

C

C

C SUBROUTINE PLOT

C

C THIS PROGRAM PLOTS SMOKE AND OCCUPANT LOCATIONS FOR A

C SINGLE TIME FRAME. ONLY PERSON-OCCUPIABLE LOCATIONS

C ARE SHOUN.

C

SUBROUTINE PLOT (X0» Y0» NUMOCC » ITIME f MAXX f MAXY» ISMOKE

)

INTEGER X0(20) »Y0<20)

DIMENSION ISMOKE(lOOflOO) f IPLOTdOOrlOO)

C BUILD THE PLOT MATRIX

DO 100 J=2»MAXY»2

DO 100 I=2fMAXX»2

IF <ISMOKE(I» J) .GT.O) GO TO 110

IPLOTdr J)=0

GO TO 120

110 IPL0T(I,J)=1

120 CONTINUE

C DETERMINE LOCATIONS OF OCCUPANTS WITHIN THE PLOT MATRIX

DO 100 N=lfNUMOCC

IF (XO(N).EQ.I.AND.YO(N)*EQ.J) GO TO 130

GO TO 100

130 IPL0TdfJ)=8

100 CONTINUE

C PRINT THE PLOT MATRIX

WRITE (6f500) ITIME

DO 300 J=2»MAXYf2

WRITE (6»501) (IPL0T<I»J)»I=2»MAXXf2)

WRITE (6f502)

300 CONTINUE

500 FORMAT (ddlXf'PLOT FOR TIME FRAME NUMBER' » I4»/f 130< f///)

501 FORMAT dX»60(2Xf 12)

)

502 FORMAT dXf/)

RETURN

END

103
FEDERAL INFORMATION PROCESSING STANDARD SOFTWARE SUMMARY

01. Summary date

Yr. Mo. Day

lO 20

04. Software date

Yr. Mo. Day

7 \9 1 2 oil

02. Summary prepared by (Name and Phone)

05. Software title Computer Simulation of Human Behavior in Fires

Version 2

06. Short title BFIRESII

08. Software type 09. Processing mode 10. Application General Automated Data Computer Systems Management/

1 1 System

1 1 Interactive (~1 Support/Utility p Business g Computer Program jg Batch PI Scientific/Engineering p Process Control

1 I Subroutine/Module

1 1 Combination IP Bibliographic/Textual p Other

03. Summary action New Replacement Deletion Q

Previous Internal Software ID

07. Internal Software ID

11. Submitting organization and address Environmental Design Research Division

Center for Building Technology

National Engineering Laboratory

National Bureau of Standards

Washington , DC 2^234

Specific Computer simulation of

human behavior

.

12. Technical contact(s) and phone

Dr. Fred I. Stahl

(301) 921-2627

13. Narrative BFIRESII aids the prediction of escape times and escape routes of building occupants

during fire emergencies. The program executes a discrete time stochastic simulation

of human movement within bounded physical spaces, in response to specified fire

conditions. Unlike its predecessor (BFIRES), BFIRESII ("BFIRES-two") permits the

simulation of behavioral consequences of occupying a smoke-filled environment, as well as rescue activities. Input /output is via punched cards and line printer, or via terminal, in batch mode.

14. Keywords

Building fires; computer-assisted building design; fire research; fire safety; human

performance simulation.

1

1 15. Computer manuf'r and model

I UNIVAC 1108

16. Computer operating system

EXEC 8 Ver. 33R3A

17. Programing language(s)

FORTRAN V

18. Number of source program state- ments

1

1

1 19. Computer memory requirements

1 63,500 36-bit

20. Tape drives 21. Disk/Drum units 22. Terminals

[

1 words

23. Other operational requirements

! 24. Software availability < 25. Documentation availability

Available Limited In-house only

E

(301) 921-2627

I

Dr. Fred I. Stahl

Research Psychologist

BR A355

National Bureau of Standards

Wa-shlngtoo^ DC—20234

4ITT

Available Inadequate

a

same as item 24

In-house only

n

26. FOR SUBMITTING ORGANIZATION USE

185-101 Standard Form 185

1974 July

U.S. Dept, of Commerce—NBM

(FIPS. Pub. 30)
NBS-1UA (REV. »-78)

U.S. DEPT. OF COMM.

BIBLIOGRAPHIC DATA

SHEET

1. PUBLICATION OR REPORT NO. NBSIR 80-1982

3. Accession No.

4. TITLE AND SUBTITLE

BFIRES/Version 2; Documentation of Program Modifications

5. Publication Date MARCH 1980

7. AUTHOR(S)

Fred I. Stahl

9. PERFORMING ORGANIZATION NAME AND ADDRESS

NATIONAL BUREAU OF STANDARDS

DEPARTMENT OF COMMERCE

WASHINGTON. DC 20234

11. Contract/Grant No.

12. SPONSORING ORGANIZATION NAME AND COMPLETE ADDRESS fstreef, aty. state, zip)

same as item 9

13. Type of Report & Period Covered

15. SUPPLEMENTARY NOTES

Companion document to NBSIR 79-1713

Document describes a computer program; SF-185, FIPS Software Summary, is attached.

16. ABSTRACT (A 200*word or teas factual aummary of moat aighificant informatiorie If document includes a significant bibliography or

literature survey, mention it here*) Several shortcomings of BFIRES/Version 1 are discussed. Chief among these are the

program’s inability to simulate rescue activities during fire events, and to

simulate direct interactions between occupant behavior and toxic qualities of

smoke filled environments. This report documents a revised program, BFIRES/

Version 2, which contains new subroutines developed to mitigate these problems.

These subroutines are grouped into two modules: (1) a "smoke" module designed to

simulate the experience of inhabiting a smoke filled environment, and (2) a "rescue" module Intended to permit the rescue of physically immobile occupants.

Additional improvements incorporated into BFIRES/Version 2 include more efficient

file management and data input facilities, and expanded output capabilities.

17. KEY WORDS (six to twelve entries; alphabetical order; capitalize only the first letter of the first key word unless a proper name;

separated by semicolons) ... , ... ..... Architectural research; building fires; computer-aided design;

environmental psychology; fire research; fire safety; human behavior in fires;

modeling technique; programming; simulation of human behavior.

18. AVAILABILITY Unlimited

I I For Official Distribution. Do Not Release to NTIS

I I Order From Sup. of Doc., U.S. Government Printing Office, Washington, DC

20402, SD Stock No. SN003-003-

Pin Order From National Technical Information Service (NTIS), Springfield,

VA. 22161

19. SECURITY CLASS

(THIS REPORT)

UNCLASSIFIED

20. SECURITY CLASS

(THIS PAGE)

UNCLASSIFIED

21. NO. OF

PRINTED PAGES

JJil

22. Price

$9.00

USCOMM-OC


J\I\