NATIONAL BUREAU OF STANDARDS REPORT

10 488

A COMPUTER MODEL FOR SIMULATING

THE RESPONSE ACTIVITIES OF A FIRE DEPARTMENT

Prepared for

The Fire Research Program

National Bureau of Standards

<5Jb§>

U.S. DEPARTMENT OF COMMERCE

NATIONAL BUREAU OF STANDARDS
NATIONAL BUREAU OF STANDARDS

The National Bureau of Standards1 was established by an act of Congress March 3, 1901. The Bureau’s overall goal is to strengthen and advance the Nation’s science and

technology and facilitate their effective application for public benefit. To this end* the Bureau conducts research and provides: (1) a basis for the Nation’s physical measure- ment system, (2) scientific and technological services for industry and government, (3) a technical basis for equity in trade, and (4) technical services to promote public safety.

The Bureau consists of the Institute for Basic Standards, the Institute for Materials

Research, the Institute for Applied Technology, the Center for Computer Sciences and

Technology, and the Office for Information Programs.

THE INSTITUTE FOR BASIC STANDARDS provides the central basis within the United States of a complete and consistent system of physical measurement; coordinates

that system with measurement systems of other nations; and furnishes essential services leading to accurate and uniform physical measurements throughout the Nation’s scientific community, industry, and commerce. The Institute consists of a Center for Radiation Research, an Office of Measurement Services and the following divisions: Applied Mathematics—Electricity—Heat—Mechanics—Optical Physics—Linac

Radiation2—Nuclear Radiation2—Applied Radiation2—Quantum Electronics3—

Electromagnetics3—Time and Frequency3—Laboratory Astrophysics3—Cryogenics3

. THE INSTITUTE FOR MATERIALS RESEARCH conducts materials research lead- ing to improved methods of measurement, standards, and data on the properties of

well-characterized materials needed by industry, commerce, educational institutions, and

Government; provides advisory and research services to other Government agencies;

and develops, produces, and distributes standard reference materials. The Institute consists of the Office of Standard Reference Materials and the following divisions: Analytical Chemistry—Polymers—Metallurgy—Inorganic Materials—Reactor

Radiation—Physical Chemistry.

THE INSTITUTE FOR APPLIED TECHNOLOGY provides technical services to pro- mote the use of available technology and to facilitate technological innovation in industry and Government; cooperates with public and private organizations leading to the development of technological standards (including mandatory safety standards), codes

and methods of test; and provides technical advice and services to Government agencies

upon request. The Institute also monitors NBS engineering standards activities and

provides liaison between NBS and national and international engineering standards

bodies. The Institute consists of the following technical divisions and offices: Engineering Standards Services—Weights and Measures—Flammable Fabrics

Invention and Innovation—Vehicle Systems Research—Product Evaluation

Technology—Building Research—Electronic Technology—Technical Analysis

Measurement Engineering.

THE CENTER FOR COMPUTER SCIENCES AND TECHNOLOGY conducts re- search and provides technical services designed to aid Government agencies in improving cost effectiveness in fhe conduct of their programs through the selection, acquisition,

and effective utilization of automatic data processing equipment; and serves as the principal focus within the executive branch for the development of Federal standards for automatic data processing equipment, techniques, and computer languages. The Center

consists of the following offices and divisions: Information Processing Standards—Computer Information—Computer Services —Systems Development—Information Processing Technology.

THE OFFICE FOR INFORMATION PROGRAMS promotes optimum dissemination

and accessibility of scientific information generated within NBS and other agencies of

the Federal Government; promotes the development of the National Standard Reference

Data System and a system of information analysis centers dealing with the broader

aspects of the National Measurement System; provides appropriate services to ensure

that the NBS staff has optimum accessibility to the scientific information of the world,

and directs the public information activities of the Bureau. The Office consists of the following organizational units: Office of Standard Reference Data—Office of Technical Information and

Publications—Library—Office of Public Information—Office of International

Relations.

1 Headquarters and Laboratories at Gaithersburg, Maryland, unless otherwise noted; mailing address Washington, D.C. 20234.

2 Part of the Center for Radiation Research.

3 Located at Boulder, Colorado 80302.
NATIONAL BUREAU OF STANDARDS REPORT

NBS PROJECT

4314162

NBS REPORT

September 1971 10 488

A COMPUTER MODEL FOR SIMULATING

THE RESPONSE ACTIVITIES FOR A FIRE DEPARTMENT

Patsy B. Saunders

Applied Mathematics Division

(for the Technical Analysis Division)

National Bureau of Standards

IMPORTANT NOTICE NATIONAL BUREAU OF S

(or use within the Government, and review. For this reason, fl whole or in part, is not authi Bureau of Standards, Washing

the Report has boon speciticall

Approved for public release by the

Director of the National Institute of

Standards and Technology (NIST) on October 9, 2015.

ess accounting documents intended

s subjected to additional evaluation

e listing of this Report, either in he Office of the Director, National by the Government agency for which

copies for its own use.

U.S. DEPARTMENT OF COMMERCE

NATIONAL BUREAU OF STANDARDS
V

>'

Y
This project was funded

by the Fire Research Program,

National Bureau of Standards.

ABSTRACT

This paper discusses a computer model for simulating the response

activities of a fire department. It presents the model from the viewpoint

of a user who may wish to run the model "as is" or change it to

resemble more closely the fire department of a particular city. The

paper assumes some knowledge of SIMSCRIPT, the language in which the

program is written.

Keywords: fire department, simulation, SIMSCRIPT.

1
Table of Contents

Page

I. INTRODUCTION 1

II. EVENTS AND SUBROUTINES 8

III. DEFINITION OF MAJOR VARIABLES 12

A. The Temporary Entity CASE 12

B. The Temporary Entity ALARM 13

C. The Temporary Entity RUN 15

D. Event Notices AVAIL, NUCRU, NUDAY 16

E. Event Notices ARVSN, SNDBK, FINISH, and HOME 16

F. The Permanent Entity RES 17

G. The Permanent Entity KINDS 18

H. The Permanent Entity STATN 19

I. The Permanent Entity SHIFT 19

J. The Permanent Entity WDAY 19

K. The Permanent Entity CITY 19

L. The Permanent Entity REST 20

M. The Permanent Entity CATEG 20

N. The Permanent Entity FREE 20

O. General System Variables 20

IV. INITIALIZATION DECK 22

A. System Specifications Card 22

B. Initial Conditions Deck 23

V. EXOGENOUS EVENT TAPE 39

VI. OUTPUT 41

VII. OPERATING INSTRUCTIONS 51

A. Run Deck for Running the Model "As Is" 51

B. To Recompile a Portion of the Program 54

VIII. COMPUTATIONAL RESULTS AND FUTURE DEVELOPMENT 56

REFERENCES 58

APPENDIX: COMPUTER LISTINGS OF FIDOS 2 A-l

ii
LIST OF FIGURES

Page

Figure VI- 1: Sample Output Showing Case

Occurrences and Terminations 42

Figure VI-2: Sample of General Summary Output 43

Figure VI- 3: Sample of Summary Output Indicating

Resource Work Load and Response

Capability 44

Figure VI-4: Sample of Summary Output Showing

Breakdown of Resource Utilization

by Day of the Week 45

Figure VI-5: Sample of Output Summarizing

Fire Service by Type of Case 46

Figure VI -6: Sample of Output Showing

Distribution of Response Times

for the Last Arriving Engine 47

Figure VI-7: Sample of Availability Output 48

Figure VII-1: Sample of Run Deck to Execute

Program "As Is" 53

Figure VII-2: Sample Run Deck for Recompilation 55

Figure VII 1-1: Comparison of Two Basic Runs 57

iii

I. INTRODUCTION

In conjunction with project PHOENIX it was desired to simulate the

response activities of the fire departments of various cities. In order

to accomplish this aim, a computer program or model, FID0S2, was developed.

The language in which the program is written is SIMSCPIPT. This paper

will discuss the model from the viewpoint of a user who may wish to use

the model "as is" or perhaps modify it to model more closely the fire

department of a particular city. Some knowledge of SIMSCPIPT will facilitate the reading, particularly in Sections IV and V. References [2 and

3 ] are major documentations of the SIMSCRIPT language. A reader familiar

with simulation in general can probably read and understand the rest of

the paper.

In a very general sense, the model may be described as follows: a

case enters the system, i.e., the fire department receives a call for

service. The assignment portion of the model acts as the dispatcher by

determining which resources will serve the case. The selected resources

then travel to the case and remain at the scene of the case for a specified

length of time. At the end of this specified time, the resources leave

the scene and return to their stations. When the last resource leaves

the scene of the case, the case is terminated.

Unlike the RAND simulation model for the Fire Department of New York

City [1] , FIDOS2 is quite simple and is not designed to model any

particular fire department. As the model now stands, it is best suited

to model fire departments in relatively small cities. FID0S2 does not
now include provisions for such things as the queuing of cases at the

dispatcher, delayed responses resulting when a case occurs in an area

whose resources are already busy, interruption of service to "low priority"

cases when an urgent case occurs, or "moving up" resources into other

stations in areas where most of the resources are out on call. These

provisions, although obviously important in modeling some fire departments,

have not been of major concern in the applications of the model thus far.

The inclusion of such provisions in the model would over-complicate the

systems simulated to date. It should be noted, however, that the modular

structure of FID0S2 was developed to minimize the difficulty associated

with adding such provisions to adapt the model to a particular fire

department.

The purpose of the simulation model is to estimate measures of the

ability of the fire department to respond "quickly" when needed under

various system configurations. The output of the model gives measures of

response time, utilization, and availability which can be used to indicate

to what extent proposed changes in the system would improve the overall

service.

The basic system parameters which can be varied via input are:

1. The number and locations of fire stations.

2. The amount and location of equipment (only engines and trucks

are now considered)

.

3. The average speeds at which vehicles travel in emergency and

non-emergency situations.

2
4. The starting delay, i.e. the time between the notification of

a resource that its services are needed and the resulting

departure of the resource from its station.

By revising one subroutine in the code, it is possible to change the dispatching or assignment policy used. The policy which is presently coded

will be discussed in Section II (under the description of subroutine

RESAP)

.

Two important terms should be clarified at this time. First, throughout the remainder of this paper the word resource will be used frequently.

As the model is coded, a resource can be either a single piece of equipment,

i.e. an engine or a truck, or else a company, i.e. an engine company or a truck

company, where the individual pieces of equipment comprising the company

act as a single unit with respect to response time and time spent at the

scene of a case. Either interpretation can be applied (so long as it

is applied consistently) in defining the situation to be simulated

and in interpreting the outputs of the model.

The second point concerns the use of the term alarm . An alarm

is a request for one or more resources. All resources associated with an alarm

are dispatched at the same time and remain at the scene of the case for the

same length of time. If they come from different locations they will (in

general) arrive at the scene at different times and will therefore leave

the scene at different times. Thus a case requiring three engine resources

and two truck resources, all of which are requested at the same time and

will stay on scene the same length of time, could be input either with one

3
alarm requesting three engines and two trucks, or with five alarms each

requesting one resource of the given type.

The cases to be served by the fire department being simulated arc

input to the model via the Exogenous Events Tape. The format of the tape

is discussed in Section V. The data on this tape are derived from reports

logged by tire fire department being simulated. A pre-processor program

must generally be written to extract the data from the reports and put them

in the appropriate format. One very important conclusion drawn from this

study thus far is the need for standardized reporting forms . Since the

data and format of the report forms vary among fire departments, a

detailed discussion of a general preprocessor is meaningless. Until such

time as standardized reporting forms are used, each fire department to be

simulated requires a different preprocessor. The help of the fire department will be useful in deriving the required data from the reported data.

Tire following list gives the case attributes required as input to the

model

.

1. The day and time the case occurs.

2. An identification number for the case, such as its log

number.

3. The number of alarms for the case.

4. The location of the case, in (x, y) coordinates.

5. A number indicating the type of case, e.g. public service,

accidental alarm, fire, etc.

4
6. The time of occurrence, the on scene time (service time excluding

travel time to and from the case), the number of engine resources,

and the number of truck resources, for every alami of the case.

It should be noted that the Exogenous Events Tape could be reduced.

It is possible to have an endogenous event corresponding to the occurrence

of a case where the time between such events is sampled from a distribution,

e.g. negative exponential. The log number for the I-th incoming case could

be I, and the remaining case and alaim attributes could be gotten by

sampling distributions derived from historical data. This arrangement has

the advantage of allowing the user to vary the case scenario so as to answer

questions such as

" "How does the system perform if the number of false

alarms decreases, for example after a community relations program has been

initiated?" or "What is the effect on availability and response time if the

number of serious cases (cases requiring many resources) increases by ten

percent?" Using three months' data (approximately 900 cases) from the fire

department records for the city of Alexandria, Virginia, it has been shown

in [4] that the times between case occurrences do follow a negative

exponential distribution. If it is desired to simulate other than

historical cases, it will be necessary to develop probability distributions

for the case attributes based on historical records and to verify the

distributions hypothesized for the city being simulated. These distributions

could then be included in the model, thereby reducing the Exogenous Events

Tape so that it contains only the events which start and stop the simulation.

5
Implicit in the model are several major assumptions concerning

the locations of resources and cases, and the network over which resources

travel to and from cases. First, it is assumed that a grid has (conceptually)

been placed over the city being simulated. As the model is now coded, the

cells of the grid are assumed to be square. (This restriction was imposed

because of the particular grids used in coding the case locations of the

cities thus far simulated. The data were collected prior to the development

of FID0S2.) For the cities simulated thus far, all cases occurring within

a cell were pre-coded as occurring at the center of the cell. The station

locations specified via the initial Deck must be defined relative to the

same grid.

Second, a "metropolitan metric" is used when determining the distance

d between two points (x^,

y^ ) and (X

2

, y2 ). Thus d is calculated as

l d = l x

i

- x

2

I + Wi - y2

\-

It is assumed that the speed of travel is the same in both the x and v

directions so that travel time is simply d/speed, where the speed depends

on the type of case being served. Only two speeds are now used in the

model. The slower, non-emergency speed is used for cases of type 1

(public service), and also when returning to the station from all cases.

Finally, mention should be made of the paths over which resources

travel to and from cases. In general, there are numerous routes of

distance d, as calculated previously, between (x^, y^ ) and (x-,, y ?

)

.

However, the model assumes that routes are parallel to the coordinate

axes and that the entire distance in one direction is traveled prior to

6
travelling any distance in the other direction. There is a probability

of 0.5 associated with traveling first in the x-direction.

7
II. EVENTS AND SUBROUTINES

The simulation model involves three exogenous events, eight endogenous

events, and five subroutines.

Exogenous Event START occurs when the simulation begins. It initializes

several variables, and creates and causes an event NUDAY to end the first

day, an event NUCRU to end the first shift, and an event AVAIL to occur a

half hour after the simulation begins.

Endogenous Event AVAIL occurs every hour on the half hour. It counts

the number of idle engine resources. A resource is termed "idle" if it

is neither enroute to a case nor on the scene of a case. The counts

obtained by this event are used to form the availability distribution for

each shift. Each AVAIL also causes another event AVAIL to occur an hour

later.

Endogenous Event NUCRU occurs at the end of every shift. (The number

of shifts per day and the time that each shift ends are specified via the

initialization deck.) It accumulates the utilization of the individual

resources by shift, and causes another event NUCRU to occur at the end of

the next shift.

Endogenous Event NUDAY occurs every day at 2400 hours. It accumulates

utilization of the individual resources by day of the week and causes

another event NUDAY to occur 24 hours later.

Exogenous Event ALERT occurs whenever a case occurs. It is the input

routine for the case attributes. It creates and causes an event ALARM to

occur at the specified time for each alarm associated with the case. It

also prints the input attributes of the case.

8
Endogenous Event ALARM occurs when one or more resources are requested

to respond to the scene of a case. It calls subroutines ARR and RESAP to

determine which specific resources will serve the alarm, and subroutine

SERVE which assigns the resources to the alarm.

Subroutine ARR determines the time to respond to the scene of a case

for every idle resource. If the company is idle at its station (as opposed

to idle returning from a case), a fixed delay time specified via the initialization deck is added to the travel time. The locations of resources

enroute back to their stations are determined via calls to subroutine

WHERE. The resources are filed into a set RSET ranked on response time,

i.e. the resource which can arrive soonest is the first member of the set.

Subroutine WHERE determines the location of a moving resource. The

calculations are based on the speed at which the resource is traveling,

the coordinates of the origin of the resource, the coordinates of the

destination of the resource, the time at which the resource departed, and

a random number indicating whether the resource first travels in the x

direction or the y direction.

Subroutine RESAP is concerned with the resource assignment policy.

The policy now used in the model selects those resources of each type

which are idle and can arrive on the scene the quickest. Tine number of

resources of each type is an attribute of the ALARM supplied on input.

The engine resources to be assigned are filed into the set ESF.T (ALARM)

and the truck resources are filed into the set TSET (ALARM). If fewer

than the requested number of resources are available, a message is printed

9
indicating that an incomplete response is being made. The number of such

incomplete responses is output at the end of the run.

Subroutine SERVE actually assigns the resources to the alarm. It

sets up various bookkeeping parameters and cancels any event, e.g. HOME,

which may have been scheduled for the resource prior to the present

assignment. It changes the status of the resource to "busy going to a

case." Usually it creates and causes an event ARVSN to occur when the

resource arrives at the scene of the case. If, however, the on scene time

as input for the alarm is negative, it creates an event SNDRK to occur

after the resource has traveled half the distance to the scene of the

case. The motivation for this provision arose from examination of recorded

data from several fire departments. In some instances the time of departure

and the time back "on the air" logged in by the individual companies

indicated that the company never actually arrived at the scene of the case.

This could reasonably occur if another resource arrived at the scene and

reported back to the dispatcher that less than the requested amount of

equipment was needed. The excess resources would then be sent back to

their stations.

Endogenous Event SNDBK occurs when a resource is told to return to

the station before reaching the scene of a case. It determines the location

of the resource via calls to subroutine WHERE, and creates and causes an

event FINSH to occur immediately, thereby relieving the resource of its

assignment.

10
Endogenous Event ARVSN occurs when a resource arrives at the scene of

a case. The status of the resource is changed to "busy at the scene" and

the location of the resource is changed to the location of the case.

Various statistics on response time for the case and the resource are

collected. ARVSN creates and casues an event FENSH to occur at the end of

the on scene time specified for the alarm on input.

Endogenous Event FINSH occurs when a resource finishes serving a case

.

The status of the resource is changed to "idle returning." Case utilization

statistics are collected here. FINSH creates and causes an event HOME to

occur when the resource arrives back at the station. If all resources

assigned to a case have completed their service, subroutine TERM is called

to terminate the case.

Subroutine TERM occurs when a case is terminated. Various statistics

for measuring the service of the case (in terms of time only) are collected.

TERM prints out the case number, and the date and time of termination.

Endogenous Event HOME occurs when a resource arrives at its assigned

station. The location of the resource is changed to the location of the

station. The status of the resource is changed to "idle at the station."

Resource utilization statistics are collected here.

Exogenous Event ENDSIM occurs when the simulation is to end. It

averages various data, converts data to appropriate units, and outputs the

statistics summarizing the simulation. A description of the output is given

in Section VI

.

11
III. DEFINITIONS OF MAJOR VARIABLES

The following list will define all entities, attributes, event notices,

arid major variables appearing in the Definition Deck. Any other variables

used in the simulation are local variables used in at most one subroutine

or event and are of no real concern to the average user. Attributes will

be listed beneath the appropriate entity. In the case of temporary

entities and event notices, a diagram of the storage layout will follow

the definitions.

A. The Temporary Entity CASE

CASE - a call to the fire department for service.

ASET (CASE) - the set of all ALARM’S associated with the CASE.

AVRES(CASE) - the average response time for the CASE. The average is

taken over all resources responding to the case.

CNRES(CASE) - the total number of resources arriving on the scene of

the CASE.

FASET(CASE) - the first ALARM in ASET (CASE).

FIRST (CASE) - the first resource to arrive on the scene of the CASE.

NCOMP(CASE) - the number of resources that have completed their service

to the CASE.

NECO(CASE) - the number of engine resources needed for the CASE.

NOALM(CASE) - the number of ALARMS for the CASE.

NOCAS(CASE) - the user-supplied identification number, e.g. log number,

for the CASE.

12
NTCO(CASE) - the number of truck resources needed for the CASE.

OCCUR(CASE) - time the CASE occurs.

TOTME(CASE) - the total number of resource -days used by the CASE.

TWAIT(CASE) - the time between OCCUR(CASE) and the arrival of the first

resource on the scene.

TYPE (CASE) - the number indicating the kind of CASE.

XC(CASE) - the x- coordinate of the CASE location.

YC(CASE) - the y-coordinate of the CASE location.

Record

0

Word

1

2

3

4

5

6

7

8

Storage Layout for Attributes of CASE

FASET

NOCAS

CXXUR

NECO NTCO TYPE FIRST

XC YC

TWAIT

TOTME AV]RES

NOALM NCOMP CNRES

B. The Temporary Entity ALARM

ALARM - a request for resources to be sent to serve a CASE. This also acts

as an event notice occurring at the time of request.

CAS(ALARM) - the SIMSCRIPT identification number assigned to the CASE

with which the ALARM is associated.

ESET (ALARM) - the set of engine resources which will serve the ALARM.

13
FESET (ALARM) - the first engine resource in ESET (ALARM).

FIRST (ALARM) - the first of the resources (requested by ALARM) to arrive

on scene.

FTSET (ALARM) - the first truck resource in TSET (ALARM).

NECO (ALARM) - the number of engine resources needed for the ALARM.

NTCO (ALARM) - the number of truck resources needed for the ALARM.

NUMRR (ALARM) - the sequential number of the ALARM with respect to the case,

i.e. the first ALARM is the one which chronologically occurs

first.

OCCUR(ALARM) - the time difference between the case occurrence and the

alarm occurrence, on input. It is immediately changed to the

time of occurrence of the alarm.

OST (ALARM) - the length of time which all resources associated with the

ALARM must remain on the scene of the case. If OST < 0, the

resources are sent back to their homh stations after traveling

half the distance toward the scene.

SASET (ALARM) - the successor of ALARM in ASET (CAS (ALARM) )

.

TSET (ALARM) - the set of truck resources which will serve the ALARM.

WAIT (ALARM) - the time between OCCUR (ALARM) and the arrival on scene

of the first resource associated with ALARM.

14
Record Word Storage Layout for Attributes of ALARM

1 Reserved by SIMSCRIPT

2 Timing routines

3 OCCUR

4 NECO NTCO NUMBER FIRST

5 CAS SASET

6 TWAIT

7 FESET FTSET

8 OST

C. The Temporary Entity RUN

RUN - temporary entity created when a resource is out of the station.

DEP(RUN) - the time at which the resource associated with the RUN left

its last location.

IDEV(RUN) - SIMSCRIPT- assigned identification number for the next

endogenous event scheduled for the resource associated

with the RUN.

IDIR(RUN) - a flag to indicate the path the resource follows. If IDIP = 0,

the entire x-distance is traveled first. If IDIR = 1, the

y-distance is traveled first.

NEXT (RUN) - A code number to determine which type of endogenous event

is next to occur for the RUN. ARVSN = 1; FINSH = 2;

HOME = 3; SNDBK = 4.

TOUT(RUN) - the time at which the resource associated with the RUN left

its station.

15
XDEST(RUN) - the x-coordinate of the location toward which the resource

is moving. If XDEST = 0 and YDEST = 0, the resource is

on scene.

YDEST(RUN) - the y-coordinate of the location toward which the resource

is moving.

Record Word Storage Layout for Attributes of RUN

1 D]BP

2 XDEST YDEST

3 TOUT

4 NEXT IDIR IDEV

D. Event Notices AVAIL, NUCRU, NUDAY

The purpose of these three events is explained in Section II. They

have no attributes and the only storage needed are the two words required

for the SIMSCRIPT timing routines.

E. Event Notices ARVSN, SNDBK, FINISH, and HOME

The purpose of these four events is explained in Section II. Each

requires four words of storage, two of which are used by the SIMSCRIPT

timing routines. The fourth word is blank. The third word is occupied

by two attributes which have the same names for each of the four events.

RESNO - the number of the resource for which the event is scheduled.

ALMNO - the SIMSCRIPT identification number of the alarm associated

with the event.

16
F. The Permanent Entity RES

RES - a resource.

CMXRS(RES) - the identification number of the case for which RES's largest

response time (during the simulated period) occurred.

CRES(RES) - the response time of RES for the case it is currently serving.

DAILY(RES, WDAY) - the average utilization of RES on the day of the week

WDAY.

DUTIL(RES) - the utilization of RES on a single day. This is used in the

process of determining DAILY.

IB (RES) - a flag to indicate the status of the RES:1 = idle at the station;

2 = idle returning to the station; 3 = busy going to a case;

4 = busy on the scene of a case.

I RUN (RES) - the SIMSCRIPT -as signed identification number of the RUN

associated with RES. If RES is in the station, IRUN(RES) = 0.

MXRES(RES) - the maximum time it took for RES to respond when called.

NALAM(RES) - the number of ALARMS for which RES actually arrived at the

scene

.

NMXRS(RES) - the number of the ALARM for which RES had its maximum response

time.

PRSET(RES) - the predecessor of RES in RSET.

RALAM(RES) - the SIMSCRIPT identification number for the ALARM being served

by RES.

RUl’I L( RES) - the total number of hours that RES is out of the station.

RWAIT (RES) - the total response time for RES.

17
SESET(RES) - the successor of RES in ESET.

SRSET(RES) - the successor of RES in RSET.

STN(RES) - the station to which RES is assigned,

STSET(RES) - the successor of RES in TSET.

SUTIL(RES, SHIFT) - the total time RES is out of the station during shift

SHIFT.

TARR(RES) - the time it would take for RES to arrive at the scene of a

case. Resources are put into RSET ranked by this attribute.

TUTIL(RES) - the total time RES is out of the station in the current

shift. This is used in calculating SUTIL.

TYP(RES) - a coded number indicating the type of RES. 1 = engine; 2 =

truck.

XR(RES) - the x-coordinate of the location of RES.

YR(RES) - the y-coordinate of the location of RES.

G. The Permanent Entity KINDS

KINDS - a type of case which can occur

AVTME (KINDS) - the average number of resource -hours required to serve

cases of type KINDS.

AVTWT(KINDS) - the average first response time for cases of type KINDS.

CKIND( KINDS) - the number of cases of type KINDS which occurred.

ELAPS(KINDS) - the average total duration of cases of type KINDS.

(Duration is defined as the time difference between the

original notification of the fire department about the

case and the departure of the last resource from the scene

of the case.)

18
IDTYP (KINDS) - a six-character name to be used on output to identify the

type KINDS.

H. The Permanent Entity STATN

STATN - a fire station

XS( STATN) - the x-coordinate of the location of STATN.

YS(STATN) - the y-coordinate of the location of STATN.

I . The Permanent Entity SHIFT

SHIFT - a period of time during the day.

FREQ2(FREE, SHIFT) - the number of times during SHIFT that FREE engine

resources were observed to be idle.

SUTIL(RES, SHIFT) - described under RES.

TME(SHIFT) - the hour of the day at which SHIFT ends.

TSHFT(SHIFT) - the total amount of simulated time occurring during SHIFT.

J. The Permanent Entity WDAY

WDAY - a day of the week.

DAILY (RES, WDAY) - described under RES.

CDAYS(WDAY) - the total number of days WDAY simulated.

K. The Permanent Entity CITY

CITY - the name of the city whose fire department is being simulated.

NCITY is the number of computer words required to store the name

of the city. (One computer word equals six alphanumeric characters.)

NAME (CITY) - the actual characters used in the name of the city. For

example, for the city Alexandria, Va. , NCITY = 3 and

NAME(l) = "ALEXAN", NAME(2) = "DRIA, a", and NAME (3) =

"VA. AAA ", where A indicates "blank."

19
L. The Permanent Entity REST

REST - a resource type.

TYPER(REST) - a six-character name for REST to be used on output, e.g.

"ENG CO".

M. The Permanent Entity CATEG

CATEG - a cell in the frequency distribution for response time of the

last arriving resource.

GLIM (CATEG) - the right hand end point of the interval defining cell

CATEG.

FREQ1(FREE, CATEG) - the number of times (for cases using FPEE engine

resources) that the response time for the FREE-th

arriving engine resource fell into cell CATEG.

N. The Permanent Entity FREE

FREE - a number of possible idle engine resources r Since as few as 0

and as many as NOENG engine resources could be idle, NFREE = NOENG + 1.

FREQ1(FREE, CATEG) - defined under CATEG.

FREQ2(FREE, SHIFT) - defined under SHIFT.

O. General System Variables

AVAVR - an average "average response time," i.e. the average resnonse

time per case is summed and divided by the number of cases.

CASES - the number of cases that were completed.

CINC - the width of the cells of the frequency distribution of the response

time of the last arriving engine resource.

20
CMXTW - the user-supplied identification number of the case having the

maximum first response time.

DEBUG - a flag to print or surpress intermediate output for use in debugging

the model. 1 = print debug output; 0 = no debug output.

DELAY - the length of time it takes for a resource idle at the station to

prepare to leave the station.

FRSET - the first resource in RSET.

IDAY - the index of the day of the week on which the simulation begins;

1 = Monday; 2 = Tuesday, etc.

INSUF - the number of times that there were not enough idle resources to

satisfy the needs of an ALARM.

LRSET - the last resource in RSET.

MXTWT - the maximum first response time over all cases in the simulation.

NOENG - the number of engine resources.

PSHFT - the index of the present shift.

RMXTW - the resource associated with the maximum first response time in

the simulation.

SP1 - the speed at which resources travel in emergency situation. The

units are "grid segments per day."

SP2 - the speed at which resources travel in non-emergency situations.

The unit are "grid segments per day".

TLAST - the time at which the last previous shift ended and the present

shift began.

21
IV. INITIALIZATION DECK

The data deck consists of the system specifications card, followed by

the initial conditions deck, a blank card, and the exogenous events deck.

A. System Specifications Card

The contents and format of the system specifications card are as

follow:

Columns Contents

1 The number "1".

6 If non-blank, the initial conditions deck will be

printed.

7-12 Maximum array number (as shown in the definition deck)

as a right- justified integer. The present value is 64.

13-36 Parameters which set the number of minutes per hour,

hours per day, root to be used by the random number

generator, and unit for reading the initial conditions

deck. If left blank, the values will be 60, 24, 1,

and 5.

37-42 Right- justified integer giving the logical unit from

which to read the exogenous event deck. If left blank,

it is assumed to be 5, the card reader.

43-48 The logical unit for report generator output. There

are no report generators used in FIPOS2.

49-54 Right- justified integer giving the number of lines per

printed page. The maximum value is 59. If blank, it

is set to 55.

22
B. Initial Conditions Deck

The initial conditions deck serves to assign initial values to every

array specified in the definition deck. The format of the initialization

cards is very rigid. The reader is referred to Chapter 14 of [2]. Throughout the following table it shall be understood that all numbers are rightjustified integers in the indicated columns. The term "format" appearing

as the content of columns 50-66 on some cards refers to the format in which

the following data cards are to be read. The particular format used is left

to the discretion of the user, although an example is provided to show the

type of format e.g., I, U, H, etc., which is needed. All format are leftjustified in the field. The comment field, columns 67-80, may contain any

comment the user desires. In the following example, the name of the

variable is the comment unless the card refers to more than one variable

such as on card 3.

Initialization

Card Columns Content

4 The number "1."

12 The letter "R."

50-66 Number of resources in the run.

67-80 Comment, e.g. "NRES."

4 The number "2."

10 The number "1."

12 The letter "R."

15-18 Number of resources in the run.

22 The number "1."

34 The number "4."

23
Initialization

Card Columns Contents

50-66 Format, e.g. "10(12).

67-80 Comment, e.g. "IB."

Data cards giving the initial status of each resource must follow card 2

See the explanation of IB in Section III.

3 4 The number "3."

8 The number "4."

10 The number "1."

13 The letter "Z."

15-18 Number of resources in the run.

22 The number "1."

34 The number "2."

67-80 Comment

4 4 The number "5."

10 The number "1."

12 The letter "R."

15-18 Number of resources in the run.

22 The number "1."

34 The number "4."

50-66 Format, e.g. "10(12)."

67-80 Comment, e.g. "TYP."

Data cards giving the type of each resource follow card 4. See page 18

for the explanation of TYP.

24
Initialization

Card

5

Data cards giving

follow card 5.

6

Data cards giving

follow card 6.

7

Colimns Content

4 The number "6."

10 The number "1."

12 The letter "R."

15-18 Number of resources in the run.

22 The number "1."

34 The number "2."

50-66 Format, e.g. "10(U3.2)."

67-80 Comment, e.g. "XR."

the x-coordinate of the initial location of each

4 The number "7."

10 The number "1."

12 The letter "R."

15-18 Number of resources in the run.

22 The number "1."

34 The number "2."

50-66 Format, e.g. "10(U3.2)."

67-80 Comment, e.g. "YR."

the y-coordinate of the initial location of each resource

4 The number "8."

7- 8 The number "13."

10 The number "1."

13 The letter "Z."

25
Initialization

Card Columns Content

15-18 Number of resources in the run.

22 The number "l.”

34 The number "2."

67-80 Comment

8 3-4 The number "14."

10 The number "l.”

12 The letter "R."

15-18 Number of resources in the run.

22 The number "1."

34 The number "4."

50-66 Format, e.g. "10(12).

67-80 Comment, e.g. "STN."

Data cards following card 8 give the number of the station to which each

resource is initially assigned.

9 3-4 The number "15."

12 The letter "R."

50-66 The speed at which resources travel in

emergency situations, a floating point

number in "grid segments per day".

67-80 Comment, e.g. "SP1."

10 3- 4 The number "16."

12 The letter "R."

50-66 The speed in "grid segments per day" at which

26

resources travel in non-emergency

situations; a floating point number.
Initialization

Card Columns Content

67-80 Comment, e.g. "SP2."

11 3- 4 The number "17.”

7- 8 The number "19.”

13 The letter "Z. M

67-80 Comment

.

12 3- 4 The number "20."

7- 8 The number "22."

10 The number "1."

13 The letter "Z."

15-18 Number of resources in the run

22 The number "1."

34 The number "2."

67-80 Comment

.

13 3- 4 The number "23."

12 The letter "R."

50-66 The number of kinds of cases, left- justified

67-80 Comment, e.g. NKINDS.

14 3- 4 The number " 24 ."

13 The letter "Z."

67-70 Comment, e.g. "CASES."

27
Initialization

Card Columns Content

15 3- 4 The number "25. M

7- 8 The number "26."

10 The number "1."

13 The letter "Z."

15-18 Number of kinds of cases.

21-22 The number "23."

67-80 Comment

.

16 3- 4 The number "27."

13 The letter "Z."

67-80 Comment, e.g. "AVAVR."

17 3- 4 The number "28."

12 The letter "R."

50-66 The number of stations; a left- justified

integer.

67-80 Comment, e.g. "NSTATN."

18 3- 4 The number "29."

10 The number "1."

12 The letter "R."

15-18 The number of stations in the run.

21-22 The number "28."

34 The number "2."

50-66 Format , e.g. "6(U3.2)."

67-80 Comment, e.g. "XS."

28
Initialization

Card Columns Content

Data cards follow card 18 giving the x-coordinate of the location of each

station.

19 3- 4 The number "30.”

10 The number "1."

12 The letter "R."

15-18 The number of stations in the run.

21-22 The number "28.”

34 The number "2."

50-66 Format, e.g. "6(U3.2). M

67-80 Comment, e.g. "YS."

Data cards follow card 19 giving the y- coordinate of the location of each

station.

20 3- 4 The number "31."

12 The letter "R."

50-66 Left- justified integer number of shifts

in each day.

67-80 Comment, e.g. "NSHIFT."

21 3- 4 The number "32."

10 The number "2."

13 The letter "Z."

15-18 Number of resources in the run.

22 The number "1."

23-26 Number of shifts per day.

29
Initialization

Card Columns Content

29-30 The nunber "31."

34 The number "2."

67-80 Comment, e.g. "SUTIL."

22 3- 4 The number "33."

10 The number "1."

13 The letter "Z."

15-18 Number of resources in the run .

22 The number "1."

34 The number "2."

67-80 Comment, e.g. "DUTIL."

23 3- 4 The number "34."

12 The letter "R."

50 The number "7." (The number of days

per week.)

67-80 Comment, e.g. "NWDAY."

24 3- 4 The number "35."

10 The number "2."

13 The letter "Z."

15-18 Number of resources in the run.

22 The number "1."

26 The number "7." (Days per week.)

29-30 The number "34."

67-80 Comment, e.g. "DAILY."

30
Initialization

Card Columns Content

25 3- 4 The number "36."

12 The letter "P."

50-66 The shift number when the run begins,

usually "1," left- justified

.

67-80 Comment, e.g. "PSHFT."

26 3- 4 The number "37."

13 The letter "Z."

67-80 Comment, e.g. "TLAST."

27 3- 4 The number "38."

12 The letter "R."

50 The number of the weekday on which the

run begins, Monday = 1, Tuesday = 2, etc

Left- justified.

67-80 Comment, e.g. "I DAY."

28 3- 4 The number "39."

10 The number "1."

12 The letter "P."

15-18 Number of shifts per day.

21-22 The number "31."

34 The number "2."

50-66 Format, e.g. 3(H3.2).

67-80 Comment, e.g. "TME."

31
Initialization

Card Columns Content

Data cards follow card 28 giving the ending times of each shift in the

day.

29 3- 4 The number "40."

10 The number "1."

13 The letter "Z."

15-18 Number of resources in the run.

22 The number "1."

34 The number "2."

67-80 Comment, e.g. "TUTIL."

30 3- 4 The number "41."

12 The letter "R."

50-66 Number of words required to store the

name of the city being simulated.

67-80 Comment, e.g. "NCXTY"

31 3- 4 The number "42."

10 The number "1."

12 The letter "R."

15-18 The number of words need to store the

name of the city.

21-22 The number "41."

50-66 Format, e.g. "3(A6)."

67-80 Comment, e.g. "NAME."

A data card giving the name of the city whose fire department is being

simulated follows card 31.

32
Initialization

Card Columns Content

32 3- 4 The number "43. M

10 The number "1."

13 The letter "Z."

15-18 The number of kinds of cases.

21-22 The number "23."

N 67-80 Comment, e.g. "ELAPS."

33 3- 4 The number "44."

10 The number "1."

13 The letter "Z."

15-18 The number of kinds of cases.

21-22 The number "23."

34 The number "2."

67-80 Comment, e.g. "CKIND."

34 3- 4 The number "45."

12 The letter "R."

50-66 The number of resource types; a left

justified integer.

67-80 Comment, e.g. "NREST."

35 3- 4 The number "46."

10 The number "1."

12 The letter "R."

15-18 The number of resource types.

21-22 The number "45."

33
Initialization

Card Columns Content

50-66 Format, e.g. "2(A6). M

67-80 Comment, e.g. "Typer."

Data cards following card 35 give a six-character name for each resource

type, e.g. "ENG CX)."

36 3- 4 The number "47."

7- 8 The number "48."

10 The number "1."

13 The letter "Z."

15-18 Number of resources in the run.

22 The number "1."

34 The number "2."

67-80 Comment

37 3- 4 The number "49."

7- 8 The number "50."

13 The letter "Z."

67-80 Comment

38 3- 4 The number "51."

12 The letter "R."

50-66 Number of engine resources in the run;

left- justified integer.

67-80 Comment, e.g. "NOENG."

39 3- 4 The number "52."

10 The number "1."

13 The letter "Z."

34
Initialization

Card Columns Content

18 The number "7M (days per week)

.

21-22 The number "34."

67-80 Comment, e.g. "CDAYS."

40 3- 4 The number "53."

10 The number "1."

13 The letter ”Z.”

15-18 Number of shifts per day.

21-22 The number ”31. M

67-80 Comment, e.g. "TSHIFT.”

41 3- 4 The number "54.”

10 The number "1.”

12 The letter ”R.”

15-18 Number of kinds of cases.

21-22 The number ”23.”

50-66 Format , e.g. ”7(A6)”.

67-80 Comment, e.g. "IDTYP."

Data cards follow card 41 giving a six character name for each kind of

case.

42 3- 4 The number ”55.”

12 The letter ”R.”

50-66 Indicator for debugging type output

0 = no debug output; 1 = print all

debug output.

67-80 Comment, e.g. "DEBUC.”

35
Initialization

Card Columns Content

43 3- 4 The number "56.”

12 The letter H R."

50-66 Number of cells in the frequency

distribution of response times for the

last arriving engine resource.

67-80 Comment, e.g. "NCATEG."

44 3- 4 The number "57."

10 The number "1."

13 The letter "Z."

15-18 Number of cells in the frequency distribution

of response times for the last arriving

engine resource.

21-22 The number "56."

67-80 Comment, e.g. "GLIM."

45 3- 4 The number "58."

12 The letter "R."

50-66 The number of possible idle engine

resources, i.e. one more than the number

of engine resources in the run; leftjustified.

67-80 Comment, e.g. NFREE

46 3- 4 The number "59."

13 The letter "Z."

67-80 Comment, e.g. "INSUF."

36
Initialization

Card Columns Content

47 3- 4 The number "60."

12 The letter "R."

50-66 The cell width in minutes of the frequency

distribution on response time of the

last arriving engine resource; a leftjustified floating point number.

67-80 Comment, e.g. "CINC."

48 3- 4 The number "61.

10 The number "2."

13 The letter "Z."

15-18 Number of possibly free engine resources.

21-22 The number "58."

23-26 Number of cells in frequency distribution

of response times for last arriving

engine resource.

29-30 The number "56."

30 The number "2."

67-80 Comment, e.g. "FREQ1."

49 3- 4 The number "62."

10 The number "2."

13 The letter "Z."

15-18 Number of possibly free engine resources.

21-22 The number "58."

23-26 Number of shifts in the day.

37
Initialization

Card Columns Content

29-30 The number "31."

34 The number "2."

67-80 Comment, e.g. "FREQ2."

50 3- 4 The number "63."

12 The letter "R."

50-66 The delay time for resources idle in

the station; left-justified floating

point number in units of days.

67-80 Comment, e.g. "DELAY."

51 3- 4 The number "64."

10 The number "1."

13 The letter "Z."

15-18 Number of resources in the run.

22 The number "1."

34 The number "2."

67-80 Comment, e.g. "CRES."

38
V. EXOGENOUS EVENTS TAPE

'Hie Exogenous Events Tape drives the simulation by starting the simulation.

causing cases to occur , and stopping the simulation at the end of the run.

The Exogenous Event Tape can be either a deck of computer cards or a

magnetic tape containing card image records. For most runs, the number

of cases is so large that the use of cards is impractical. In the following

description, all numbers are right- justified integers unless otherwise

specified. Cases must be in chronological order.

Card

Number Columns

Variable

Name Format and Content

1 3 — The number "1"

4-7 — 14; the day the simulation begins

(Usually "0".)

8-10 — 13; the hour the simulation begins

(Usually "0".

)

11-12 — 12; the minute the simulation begins

(Usually "0".)

2 3 — The number "2".

4-7 * 14; the day the case is to occur.

8-10 * 13; the hour the case is to occur.

11-12 * 12; the minute the case is to occur.

16-20 NOCAS (CASE) 15; the identification number of the case

21-25 NALAM(CASE) 15; the number of alarms for the case.

26-30 XC(CASE) D4.0; the x-coordinate of the case

location.

31-35 YC (CASE) D4.0; the y-coordinate of the case location.

36-40 TYPE (CASE) 15; the index of the type of case.

(Note : The variables marked by are stored in OCCUR (CASE) .

)

39
Card

Number Colurais

Variable

Name Format and Content

3 1-5 OCCUR (ALARM) M5; the time difference (in

minutes) between the occurrence

of the case and the occurrence of

the alarm.

6-10 OST (ALARM) M5; the on scene time (in

minutes) for the alarm.

11-13 NECO (ALARM) 13; the number of engine resources

requested for the alarm.

14-15 NTCO (ALARM) 12; the number of truck resources

requested for the alarm.

The format shown for the first four fields of card 3 is repeated four

more times on card 3, i.e. card 3 can contain data for as many as five

alarms. If more than five alarms are needed for the case, additional

cards like card 3 are needed. Thus, each case consists of one card

like card 2 and one or more cards like card 3. The last card of the

Exogenous Events Tape has the following format:

Card

Number Columns

Variable

Name Format and Content

Last 3 — The number "3".

4-7 — 14; the day the simulation is to end.

8-10 — 13; the hour the simulation is to end.

11-12 — 12; the minute the simulation is to end.

40
VI. OUTPUT

The standard output from FIDOS2 consists of two main parts. The first

part is simploy a record of case occurrences and terminations. Tt is useful

in examining the characteristics of the individual cases and in giving an

indication of the congestion of the system at a particular time.

When the exogenous event ALERT occurs, the phrase "Case Input" is

printed followed on the same line by the SIMSCRIPT identification number

of the case, the case parameters input on the first "card" for the

case, and the time the cases occurs. On the following line or lines

are the alarm number, time of occurrence, on scene time, number of

engine resources, and number of truck resources for each alarm of the

case. Each of these lines of output contains data for at most five alarms.

When a case ends, i.e., when subroutine TERM is called, the routine prints

the phrase "End of Case" followed by the SIMSCRIPT identification number

of the case , the time the case ends , and the case number specified by

the user on input. A sample of this type of output is given in

Figure VI -1.

The basic output of the model consists of six pages of summary data.

Examples of this output are shown in Figures VI -2 through VI- 7. The

first page (Figure VI-2) is a very general summary of the simulation.

It identifies the city whose fire department is being simulated,

NAME (I), for I = 1, 2, 3; the total number of days simulated, DPMT(TIME),

where TIME is the time at which exogenous event ENDSIM occurs ; the total

number of cases completed, CASES; the mean average response time per

case, AVAVR; the total case utilization in resource-hours (utilization

by type of case is summed over all types and stored in the local variable

TOTAL for printing purposes); and the number of incomplete responses, INSUF.

41
o o

o

^ «/» m

<*• « « U U M <u o O O o

«&. (Ul Ik. 6a. O —» — © Q — O —

«rt l/l <£ <a O V-/

— <0 • D

c. —

c ^

« o

T — — . w

N - « «

® • <0 y a —

• o •

Uft — *c

! M > © "»

if* - T -

<—i r»j n ^ _ n n n n » r» tv —

»N -5 ^ ~ T- O

O — <> -«. -C —

IT O

C

•c 3 r»» 3 ® —

p- —

lP o — O

*V -3 T •

•C — *0 —

y o ./> o

y y

>o — -c —

^ O P* o

— PW — — sr x/s **\ c

— • y • N 3d O

N *’ N C

D • a ^

x o 7 o r o

- »NJ rO fM O •

• •*> o o

y —

— o- • J> o —

^ t>4 • y

»y ® w ^

o o < o — • O « ( • y .

o o

o —

tfl l/>

»*> f* — M

• y

— U.' — c* — (O —

Figure

VI

-1

Sample

Output

Showing

Case

Occurrences

and

Terminations
SIMULATION OF FIRE DEPARTMENT ACTIVITIES FOR THE CITY 0F ALEXANDRIA. VA

NU/DER OF JAYS SIMULATED 123 total number of cases served 915

MC.AN AVERAGE rvESPO'jSE TIME (PER CASE) 3.06 MIMijTES.

TOiAl utilization 034.65 RESOURCE-HOURS

NUMBER OF INSUFFICIENT RESPONSES 1

Figure VI2

Sample of General Summary Output

43
RESOURCE DATA

TO 1 AL No. OF TOTAL HO'XS STmTION ALARMS SERVED OUT OF STATION

CO 1 1 160 80.59

t.v. C'J 2 z 199 111.50

E.J3 CO 3 0 172 79.31

£r.3 CO 4 4 306 145.94

E.i<3 CO 5 5 355 143.

c.lj CO o 6 1 46 77.41

CO 7 7 177 94.41

r*< CO 1 0 196 01.47

;k< CO 2 114 61.52

Tr<< CO 3 3 79 39.30

Tkk CO 4 6 98 50.44

AVS. RESPONSE MAX. RESPONSE CASE MO. OF ALARM NO. OF TIME(MTMUTES) TIME (Ml MiJTES) MAX RESPONSE MAX RESPONSE

2.R7 12.12 1 6 ne» 3 3.63 12.67 1419 3 3.49 12.87 956 3 3.15 12.12 877 1 2.81 16.66 996 3

. 3.84 13.63 1088 1 4.64 11.36 1 600 1 2.97 12.87 1326 5 4.07 12.87 1419 5 4.36 15.91 1695 5 4.35 13.63 1601 1

Figure VI -3

Sample of Summary Output Indicating Resource

Work Load and Response Capability

44
BR£AKuG*N OF RESOURCE' UTlLI^ATIO' DATA

£•<3

L.

c. 43

c.,43

C..'4& l,«3

t <3

I K* T**

TKK

I K*

CO 1

•10 I 0.S6

C J <L 1. >4 CO J 0 • f>6 CO 4 1 .1)0 CO b 1. 32 CO b 0. 70 CO 7 0. »7 CO 1 0.91

CO 2 0.40

CO J 0.13

CO 4 U.S9

0.61 n.7f>

i 1U 0.47

0.94 0 . 4b 0.58

1.11 0.H3 0.59

1.73 0.86 0.85

1.34 1.31 0.93

0.B1 0.60 0.50

0.90 0.67 0.04 0.65 0.63 0.55 0.68 0.60 0.29

0.58 0.28 0.31 0.37 0.40 0.35

F R I bAT SUN

0.97 0.08 n.4n 0.88 1.17 0.06

0.56 0.52 0.33

1.24 1.88 0.97

1.23 1.18 1 . 06 0.65 0.64 0.5f, 0.62 0.69 0.74 0.79 0.64 0.54 0.53 0.65 0.38

0.30 0 • ?9 o.u

0.39 0.44 0.34

Figure VI -4

Sample of Summary Output Showing Breakdown

of Resource Utilization by Day of the Week

45
SUMMARY OF FIRE SERVICE 8Y TYPE OF CaSE

AVlKA&C TOTAL AVERAGE FIRST AVERAGE

Ty’l NJ. CASS -O SOURCt -HOUoS RESPONSE TIME duration

RctMlKED •minutes) •MINUTES)

i P J* Sv 50 U.b‘U9 3. S3 41.44

348 lt.4j»0 2.A? 25.65

MALIC 241 0.4O3H 1.47 11. no

*»CC li) 19 2.3743 3.01 58.08

‘j NJ\i_ 13a 1.4216 2.5b 36.48

o FHc. \?.c 2 . 53ol 2.47 58.04

/ Mj.AlU 3 0.2023 2.28 I 6.04

Figure VI -5

Sanple of Output Summarizing

Fire Service by Type of Case

46
D| SI rt lil'JTI ON OF RESPONSE TINES FOR THE LAST ARRIVING ENGINE

K-aPdNiE Une 1 EN6. CASES 2 ENG. CASES 3 ENG. CASES 4 El 1G . CASES 5 ENG. CAS-S

IN NiNdtes FREQ HEL FREQ FREQ see freq F»rQ REL FREQ FREQ REL FREQ FREQ REL Fre.Q 0. TO 0 .

3

3 0 .0033 0 0. 0 0. 0 0. 0 0.

o • 3 10 l.U 3 0 . 0(135 0 0. 0 0. 0 0. 0 0. 1.0 1 0 1.3 0 0.0146 0 0. 0 0. 0 0. 0 0.

1 .s ro 2.0 213 0.3931 1 0.0143 0 0. 0 0. 0 0. 2.0 10 2.3 116 0.2121 11 0.1571 4 3 0.1547 0 0. 0 0.

2 .

3

ro 0.0 0 •J. 1 0.0143 0 0. 0 n. 0 0. 3-0 1 0 3.3 73 0.1333 12 0.1714 69 0,2402 0 0. 0 0. 3.9 to •* . -j 73 0.1333 U 0.1143 3

1

0.1115 0 0. 0 0. 4.0 ro R.3 9 O.Olbb 1 0.0143 3 0.0108 0 0. n 0.

-t . 3 1 0 3.0 19 U.0329 11 0.1571 16 0.0576 l 1. 0 0. 3,0 1 0 3.3 12 0.0219 10 0.1429 11 0.0396 0 0. n 0. j.b ro h.O 0 0. 0 0. 0 0. 0 0. 0 0.

u • 0 10 6.3 3 0.0091 6 0.0057 10 0.0360 0 0. 0 0. 3*3 1 0 7.0 3 0 . 0033 2 0.0206 9 0.0324 0 0. n n.

/.l) 10 7. j 0 0. 0 0. 0 0. 0 0. 0 0. 7.3 TO C* 0 2 0.0037 1 0.0143 7 0.0262 0 0. 0 0. y.o 10 C.j 1 0.0010 4 0.0571 9 0.0374 0 0. 0 0. O • 3 10 9.0 0 0. 0 0. 1 0.0036 0 0. 0 0.

0.

0

1 0 9.

3

u 0. 0 0. 17 0.0612 0 0. n 0.

1 • 3 ro ll).l> 1 U.001O 0 0. 11 0.0306 0 0. 0 0.

1 0 • 0 10 10.3 0 0. 0 0. 0 0. 0 0. n 0.

lu • 3 i > 1 l.U 1 0.0010 0 0. 1 0.0036 0 n. n 0. 11.0 10 11.3 2 0.0037 0 0. 10 0.0360 0 0. 0 0. 11.

3

1 0 12.0 0 o. 0 0. 1 0.0036 0 n. 0 0.

12 • J to 12.3 1 U.OOlb 0 0. 12 0.0432 0 0. 0 0. 12.

3

l 0 13.0 0 l>. 0 0. 9 0.0324 0 0. 0 0. 10. u 10 13.3 0 0 . 0 0. 0 0. 0 0. n 0. 13*3 ro 14 .

0

1 0.001b 0 0. 0 0. 0 0. 0 0. 14.0 1 3 14.3 0 0. 0 0. 1 0.0036 0 0. 0 0.

1 t.3 ro 13.0 0 0. 0 0. 0 0. 0 0. 0 0.

1 3 • 0 10 13.3 0 0. 0 0. 0 0. 0 0. 0 0.

1 9 • 9 lo 1 o . 0 0 0. 0 0. 0 0. 0 0. 0 0.

1 O * 0 Id 16.3 0 0. 0 0. ? 0.0072 0 0. n 0.

1 3 • S 10 17.0 u u. 0 0. 1 0.0036 0 0. n 0.

1 7 • 0 1 0 17.3 0 0. 1 0.nU3 0 0. 0 0. n 0. 17-3 TO 19.0 u 0. • 0 0. 0 0. 0 0. 0 0. 1^.0 TO la.

3

0 0. 0 0. 0 0. 0 0. 0 0.

1 D • 3 10 19.0 0 0. 0 0. 0 0. 0 0. 0 0. 10.

0

ro 14.9 0 0* 0 0. 0 n . 0 0. n 0. 10-3 10 2C.U 0 o. 1 0.0143 4 0.0144 0 n. ) n 0.

r j r xLi 547 70 270 1 0

Figure VI-6

Sample of Output Showing Distribution of Response Times

for the Last Arriving Engine

47
AVAILABILITY

NO. ^>F IjLE SHIFT 1 SHIFT ? SHIFT 3

.. CO. FREd. REL. FREr.. freo. REL. FREQ. freo. RFL. FRF'

0 0 0. 0 0. 0 0.

1 2 0.0020 0 0. l 0.0010

2 3 0.0030 0 0. l 0.0010

3 6 0.U&61 5 O.onsl 7 0.0071

4 X 3 0 . o 132 17 0.01t3 41 0.0417

D X9 0.0193 20 0.0203 22 0.0224

6 50 0 .0008 68 0.06^1 95 0.0965

7 091 O.905S 674 0.6882 817 0.0303

Figure VI-7

Sample of Availability Output'

48
The second page (Figure VI -3) gives an indication of the work

load and the response capability of the individual resources. Each

resource I is identified by type, TYPER(TYP(I)) , number (the first

NOENG resources are assumed to be of type 1, i.e., engines), and the

number of the station to which it is assigned, STN(I). The data

printed are the number of alarms for which resource I arrived on

scene, NALAM(I) ; the total number of hours out of the station, RUTIL(T)

the average response time in minutes, (1440)RWAIT(I)/NALAM(I) ; the maximum

response time, MXRES(I) ; the case for which this maximum response occurred;

CMXRS(I); and the number of the alarm associated with this case, NMXRS(I).

The third page (Figure VI-4) is a breakdown of the utilization of

the individual resources by day of the week. Each resource I is identified

by type, TYPER(TYP(I)) , and number (again the first NOENG resource are

assumed to be of type 1, engines). The table consists of the variables

DAILY (I,J), i.e., the average number of hours that resource I was out

of the station on the Jth day of the week where day 1 is Monday.

The fourth page (Figure VI- 5) gives measures of the service provided

for each type of case I. The types are identified by number, I, and

name, IDTYP(I). The data are the number of cases of type I that were

completed, CKIND{I) ; the average number of resource -hours required to serve

cases of type I, AVTME(I); the average first response time in minutes,

AVTWT(I); and the average total duration in minutes, ELAPS(I).

The fifth page (Figure VI -6) gives the distributions of response

times for the last arriving engine resource for cases using 1, 2, ..., 5

engine resources. If there exist cases using more than five engine

resources , exogenous event ENDSIM must be revised to print those

49
distributions as another page or pages. The frequencies which form the

distributions are accumulated in subroutine TERM. When a case ends, it

is possible to determine N, the total number of engine resources that

arrived on the scene, and R, the time difference between the occurrence

of the case and the arrival of the last resource on the scene. Then J

is determined such that CLIM(J-l) <R<CLIM(J) . The variable FREQ1(N,J)

is then increased by one. Each time interval I is identified on output

by CLIM(I-l) and CLIM(I). Then for values of K = 1 through 5 the frequencies

FREQ1(K,I) are printed for 1=1 through NCATEG. Also printed arc the

relative frequencies, computed and stored for each K in variables REL(K)

for printing purposes

NCATEG

REL(K) = FREQ1 (K,J) / £ FREQ1 (K,I)

.

1=1

The sixth page of summary output is concerned with availability. The

variable FREQ2(N,J) are printed for each shift J. FREQ2(N,J) is the

number of times during shift J that endogenous event AVAIL observed

N-l idle engine resources, N * 1 through NFREE. Also printed are the

relative frequencies, again computed and stored for printing purposes

in a local variable REL(J) for each value of J:

NFREE

REL(J) = FREQ2 (K,J) / £ FREQ2(I,J).

1=1

50
VII. OPERATING INSTRUCTIONS

The operating instructions explained herein will apply to runs made on the

UNIVAC 1108 at NBS under the EXEC 2 operating system. The simulation model is

stored on the FASTRAND drum under the file name FIDOS2. It will be assumed that

the cases to be simulated are stored on magnetic tape. In this case, the first

card of the initialization deck, the System Specifications Card, must have in

column 42 the number of the logical unit on which the Exogenous Tape is to be

mounted. This number must corespond to the letter shown on the ASG card assigning

the tape. (A corresponds to 7, B to 8, etc.)

Two complete run decks will be discussed. The first will apply to the user

who simply wants to run the model "as is". The second applies to the user who

wishes to change one or more subroutines and events. The following symbols

will be used:

@ = keypunch both a seven and an eight

A = blank.

A. Run deck for running the model "as is". (Refer to Figure VI I -1.)

Card 1

D is the priority of the run.

RUN indicates the RUN card.

NAMEFG is the six character user name.

RUNID is a five digit account number.

MM is the maximum run time in minutes.

PP is the maximum number of pages to be printed.

51
Card 2:

ASC indicates a tape assignment.

A_ specifies the letter of the tape drive.

XXXX is the reel number of the Exogenous Events Tape.

Ca. rd 5:

Keypunch exactly as shown. This calls in the Complex Utility Routines.

Card 4:

Keypunch exactly as shown. This brings the program FID0S2 into the user storage.

Card 5:

Keypunch exactly as shown. This begins execution of the program.

Card 6

:

The System Specifications Card is shown separately here only to show the

correspondence between the tape drive A on Card 2 and the ”7" in column 42 of

this card.

Initialization Deck and Blank Card;

Tli is was described in Section IV.

Last Card:

Keypunch exactly as shown. This indicates the end of the run.

52
Figure VII-1

Sample Run Deck to Execute Program

"As Is"

/

/ /
B . To recompile a portion of the program.

It may at some time be desirable to change one or more events and subroutines

of the model. This change requires a recompilation of the routines being changed.

A sample run deck for recompiling subroutine RESAP, endogenous event HOME, and

exogenous event ENDSIM, is shown in Figure VII -2. The new version of the entire

program will exist on the second file of reel number YYYY mounted on unit B.

There are several major points to be noted in Figure VTI-2.

1. There is no choice regarding the tape drive used by SIM5CRIPT to

output the compiled version of the program; it must be unit B.

2. The Definition Deck must precede the routines to be recompiled.

3. A card with a "$M in column 1 must follow the last routine being

recompiled.

4. Endogenous events are referred to on the DEL and ASM cards with the

letter "X” preceding the name.

To execute the revised program from the tape, replace cards 3 and 4 shown

in Figure VII -1 with the following four cards:

@AASGAB = YYYY

@AXQTACUR

AAPEFAB

aainab

54
0 DARUNANAMEFG , RUNID , NM , PP

0WAASGA

@AXQTACUR

AAINFASIMSC6

0NAXQTASIM

Definition Deck

New Version of Subroutine RESAP

New Version of endogenous event HOE

New Version of exogenous event ENDSIM

$

0AXQTACUR

AAERS

AAINFAFID0S2

AADELARESAP

AADELAXHOME

AADELAENDSIM

AAINAB

@NaASM,*aRESAP, resap

@NaASM, *axhome ,xhome

0NAASM, *AENDSIM,XHOME

@AXQTACUR

aaoutab

A ATE FAB

AATRIAB

@AFIN

Figure VII-2

Sample Run Deck for Recompilation

55
VIII. COMPUTATIONAL RESULTS AND FUTURE DEVELOPMENT

At the time of this writing the simulation model has only been applied to

two cities, Alexandria, Virginia and Washington, D. C. For Washington only one run

was made so that little if anything was learned regarding possible changes in

the system. For Alexandria several runs were made testing different station

locations, different numbers of stations, and different locations for equipment.

The results of this study are reported in [4]

.

Figure VIII-1 shows the relevant details of the two base runs, and their

running times. It should be noted that neither run time includes compilation and

assembly which take approximately 2.5 minutes. Although the Washington run

simulated approximately 3.2 times as many cases as the Alexandria run, the running

time for Washington was approximately 6.4 times the running time for Alexandria.

This is attributable mainly to the fact that in Washington there are 4.5 times as

many resources as there are in Alexandria. Every time a case occurs all resources

are examined as possible respondees, so that the resource assignment section of

the model requires more time in the Washington run. Furthermore, although the

average utilization per case is clearly greater in Alexandria (834.7/915 = .91

vs. 2023.6/2766 = .73 for Washington), many of the cases in Washington used

more resources than the cases in Alexandria. In summary, the Washington simulation

required more computations per case than did the Alexandria run.

The future use of the model may well require revisions in various portions of

the code to more closely model a particular fire department. It is impossible

to anticipate all the desired revisions and expansions of the model; however

the following list includes those changes which seem most desirable at present.

1. Revise the distance- time calculations so that grids with rectangular cells

can be considered.

2. Vary the speeds on links, possibly by section of the city and/or time of

day.

56
No. of days simulation

No. of cases simulated

Alexandria Washington

123 31

915 2766

No. of engine resources (companies)

No. of truck resources (companies)

Total utilization (resource-hours)

Running time (minutes)

834.7

1.34

4

7

2023.6

8.45

32

17

Figure VIII-1

Comparison of Two Basic Runs

3. Provide for resources other than engines and trucks, e.g.

,

ambulances

and rescue squads. This change would probably require a provision for

queuing cases.

4. Provide for a dynamic resource assignment policy. For example case

location and/or time of day may be used probabilistically to determine

"expected case type", which could dictate the response level. This would of

course require some method for determing the effectiveness of the response

,

i.e., some penalty should be incurred if the response is not suited for the case.

Clearly there are numerous changes that may be made to model a particular

fire department. The present version of the model was purposely developed to be

a general model, not specifically tailored to match any single system. The modular

form of the simulation should make any necessary changes fairly easy to incorporate.

57
References

1. Carter, G. and Ignall, E. , "A Simulation Model of Fire Department

Operations: Design and Preliminary Results," IEEE Transactions on

Systems Science and Cybernetics, Vol. SSC-6, No. 4, October 1970,

pp. 282-293.

2. Markowitz, H. , Hausner, B. , Karr, H. , Simscript: A Simulation Programming

Language , Prentice-Hall, Englewood Cliffs, N. J. , 1963.

3. Simscript 1.5 , Consolidated Analysis Center, Inc. , Santa Monica,

California, 1967.

4. Nilsson, E. , Saunders, P. , Swartz, J. , Weber, A., Application of Systems

Analysis to the Alexandria Virginia Fire Department , NBS Report No. 10454,

June 1971.

58
Appendix: : Computer Listing of FID0S2

,-p l L rp IT 1 1 ‘j I f » C 1 1 "7/ 1 inn S

1 ^ S v. R ? P T 1 . s OATrn - MAH, 4 , t»49 VERSION

• IS C 1 1 • r i o '* v * s i > n ; on r / M"- 7.| AT Is i'JSI132 !-Sj.-’sSJ|239SA7A9:U2JuSA7F90t2:i9t> ATfS9ol239c;47e9ni2395A7890l2J ,l567A90l2

c Ase t> T r*«i[T II'? 1 1 p F ; E A SE T | •

T ’IOC A s 2 1/? 1 2 I F 1 / 9 1 rseto • t arr L

~ Or fi||» 1 / r TUll f | L \ / 2 F Fir T (

NECO M |, <4 I 9T k »9 l / 2 f tseti.

r MTf 0 M 2/ M i 5 r y » 1 / 9 I

r 7 yr( 'M/H i 4*1' 1 /2 F

*

r P|BST M M / M l 7 Y Ft 1 / 2 F

r xc S 1 / 2 F RSE SET l / 2 1

T vr S?/2 F VS SET .1 / 2 1

f T A A I T A / F l 09 «L AM 1 / 2 I

r r o t m r 7\ /? F 1 l 1 sun 1 / 2 I T *VoE<; 7 ?/? F

T S' OAt.M ft 1 /? I T n r o M p R 3 / M ! 1 7P "A 1

1 / 2 r

T C MRt s RM / M 1 1 3NAL AM 1 /2 l N N U M « R *4 3/M 1 l 9 S T N 1 / 9 l N CAS S 1 /2 1 1 SSP 1 0 r • M SASF T s?/? I 1 ASP2 0 F • N ffsf t 7 1/2 1 1 7M * TWT 0 F

M F T S» t 7?/? I 1 FCM> TW 0 1 N O S T R 1 /2 • F 1 9PM| T H 0 I

*4 T OF P 1 / F 20MTRES i / 2 F

T X OFS T 2 1/2 F 2|C«XPS I /2 1 T v dest 22/2 F 2 2 N >< * R S i / 2 I T TOUT 3 F 2 S tc I NOS E

T 'IF X T *4 | / M 1 2“C ASES 0 1 T t 0! w M?/M I T 1 OF V *4 2 / 2 1 2SAVTME 1 F 2AAVTNT 1 F

2 7 A v A V R 0 F 28STATN E Z9»S 1 / 2 F

3 Y S 1 / 2 F

3 1 SM I F T E 32SNT IL 2 a F 33DNT II 1 / 2 F

3 V *D A Y E 39oaily 2 F 3APSHET 0 / I 37TL AST 0 / F 38 ! OAY 0 / 1 •

3 9TMF l / 2 F

9 0 T U T I L 1 / 2 F

9 1 C 1 T Y E

9 7 N A M E 1 I*

9 3 E L A P S 1 F

9 9 C < I N 0 1 / 2 I 9 S P F S T E

9 6 T Y P E P 1 t •

».UC®'.V7 97PRSET 1 /2 1 n u o a y ;? 9BSPSET 1 /2 I 99EPSET 0 1 SOLPSET 0 1 5 | NOENG 0 I *

A-l
N » B

V S l. 4 N S N 0 0 K 4 N F|HSh1 N HO*E 1 N »VA l|_2

SZCOAYS I I 5 3 T SHF T l E ^HimvP 1 I SSDEBUS 0 I 5&C»TE6 E 57CU1M 1 r bbfbfe E s?iNsur o i fcoctNC o r AIFBE81 2 /* * *2fBE82 2 /* * *3DEL»V Q f 6BCBES I /* * N B E S N n 3 1/ 2 I N *L*NQ 32/2 1
EVENTS

l J E*OGENOUS

2 start (1)

) ALERT « 2

M F*'0S|M (3)

a endogenous

A alarm

1 SNUB*

1 0 A R V S N

1 1 r i nsh

1 ? HOME

! 5 nucRu

1 «fl nuo» r

1 > AVAIL

1 A END

A-3
I 7 20

? I 27

23

2m2S

7a

77

30

3 i 3?

3 3 3m

3G3a

37

MO

EXOGENOUS event s^* r t

cC EXOGFNOUS EVENT START IS THE flRcT EVENT OF THE SIMULATION. iT

C SETS UP The CURRENT SHIFT AND DAY OF THE MEr*.

C « ID CREATE NUCRU

CAUSE NUCRU AT TME(FshFT)

LET TLAST > TIME CREATE NUOAY

CAUSE NUOAY at TIME * 1.0 LET CL IMI | I « ClNC

00 TO 10. For ]a<2) (NCATFGt

LET CLIMIIl . CUM! 1-1 »*CINC

10 LOOP CREATE avail CAUSE AVAIL at TIME * 1./H8. RETURN

END OF START

A-4
r>

r\

r> endogenous event nucru

c

c

ENDOGENOUS EVENT NUCRU OCCURS when there IS a CHANGE of shifts ^ ^V^,,MUL#T£ - SHIFTS Uo,o*%l

H

'cZU

DO TO 3D, For EACH RES

IF I B C IRS) eq i, GO TO 20

IF TOUT( IRUN( IRS) ) GR TLAST, GO T n 10

LET T U T 1 L ( I

r> S ) * TijT ILC fRS) TIMf - TLAST GO TO 20 ‘ In LET T U T I L ( I u> S ) 3 TllTlLC IRS) T I Me -TOUT ( I RUN < I RS ) ) 20 LET SUT I L ( I ps , PSHF T ) * S U T I L ( ! R S . P S H F T » TUTlL(JRs)

LET TUTIL ( IRS) 0.

3 n LOOP

LET TShFT (PcjhFT ) s TSHFT(PSHFT) TIME-TLAST

let PS MET = PSHFT 4. 1 IF PSHFT GR NSH I FT , LET PSHFT = I LET TLAST = TIME

LET DD = DPftRT (TIME)

IF DD+FLOAT ( THE ( PSHFT ) ) IS TIME, LET DD*DD+1.0

CAUSE NUCRU AT D 0 TME (PSHFT)

LFT DEBUG = 0

RETURN

END OF NUCR ( j

A5
; n endogenous rvrNT nuday

7 \ 17

c

c ENDOGENOUS event NUO»y OCCURS AT YhE 5AART OE * NCR OAY. IT IS

7 1 c ENDOGENOUS rvENT NUO*Y OCCURS AT ThC ST»RT OF A NER DAY. IT IS

7m c US E 0 TO ACCUMULATE UtILITATION BY DAy OE the reek.

7 S c

*

7 a LET ILASt . op ab T 1 T ! ME 1 77 LET mil ILAST - <<LAST/7I»7

l nn IF MIL tO 0, LET MIL . 7

1 O l let inde* . MIL-I*I<>AV

l 02 IF INDEX GR 7, let InOEX . INDEX - 7

1 n 3 LFT COxySiInDEX) • c 0 A V S 1 1 NOE A 1 * 1

1 n do to jo, e or each Res irs

1 ns IF I FT f IRS) FQ 1 , GO TO 70

1 OA IF TOUT I 1 RUN ( |RS I) SR HasT. I. GO TO |

0

107 LET OUT I L 1 I RS ) • 1 .0

1 1 0 GO TO 20

I 1 1 1 0 LET DUTIL(IRS) - OUTj L (|r s , * T 1 ME - T OU T I t R UN II R S I

1

1 ! 7 20 LET DA | LY ( los, INDEX ) DAlLYlIRS, INDEX) DuTlLURSI

1 1 3 LET DU! I L ( 1 RS ) • 0.

1 1 M 30 LOOP

1 1 S CAUSE N U 0 A Y AT TIME . !,n

1 1 6 RETURN

1 1 7 END OF NUOAV

A-6
I 7 0

1 7

1

I 72 173

I Jt

I 75

174

177

1 jn

ENDOGENOUS EVENT *V»||. LET 1C . I 00 TO 10. FOR l-tlHNOENfi) , IF I H ( I | LS 3, LET IC - | C * I 10 LOOP

LET FRE87 ( I c .PSHFT I • Fr f

0

2 I l C , PsHF T ) « | CAUSE AVAIL AT TINE » |,>2<». RETURN

END OF A V A |

E

A7
I 3 I

I 3 2

1 3 3

I 3 9

1 3S

1 34

I 3 7

I MO

I M 1

I M 2

I “ 3

I M M

I MS

I M 6

I M 7 ISO

i s i

I S 2

I S 3

I SM

I s s

I G6

I S 7

I (.0

I 4 I

I 47

1 43

I 4 M

I 4 S

I 4 4

I 4 7

I 70

1 7 1

I 72

1 73

I 7 M

1 7 S

I 74

1 7 7 200

20 | 70 ? 203

2 n m 2ns

7 0 6 70 7 2 I 0

7 1 1 7 I 2

2 I 3

7 I M

2 1 S

2 I 4 2 1 7 720

2? I

EXOGENOUS EVENT E N D S j h

0 I MENS ION | SUM ( S I ."Et < S t

ft R 1 T £ UN TAPE 4, N»Me t l ) 'NAME ( 2 » ,N»ME ( 3

»

FORMAT | ' I •‘S22 1 ‘SIMULATION OF FIRE DEPARTMENT ACTIVITIES FOR THE

• C ITT OF • ,3A4> let total n. let avavr avavr.

I

<*mo./flOat<casEs)

let cases • Cl 00 TO 10. For | • ( | I InkINOS)

IF CKlND(l) EQ 0 , GO TO in LET TOTAL TOTAL AVTmEIII

LET CASES • CASES » C F I NO II) let A V T ft T | | j . AVT*T ( I

) . I MMO./FL OAT ICR |N0 I I | » LET ELAPSMl ELAMS ( I I • | MBO. /FLOAT «CK I ^0 ( I )

I

LET a V T m F I I ) . A VTME ( | )

,

7M . /FLOAT ( CF I ND( I I | in loop

LET TOTAL m TOT AL .29

.

ft R I T E ON TAPE 4, OP Art ( TIME 1 .CASES , AvAvR , TOTAL . INSUF format (///////////////» number of oats s i muL ateo •

»

s i «’

1 5/ / • total

. NUMBER OF CASES SE R VED

. *s | R , I 5/ / • MEAN AVERAGE RESPONSE T I »r (PER

. CASE I • ,SS,n2,2, * MlNUTFS'//* TOTAL UTILIZATION* ,Slv|08. 2.* RESOUR

• CF-NOURS*//* NUMBER of INSUFFICIENT RESPONSES • , S I 0 , I S

I

V R I T E Oh TAPE 4 FORMAT ( • I • ,SMR, 'RESOURCE 0 A T A * / / / s 2 2

. • T 0 T A L No. OF TOTAL HOURS

. AVC,. RESPONSE Mu. RESPONSE CASE NO, OF ALARM NO. 0F*/S|2,

• •STATIO.N ALARMS SERVED OUT OF ^TaTIOn T I ME I M I NUTE S I T I ME ( M | NU

• TESI max RESPONSE M Ax RF SPOnSE • /

>

00 TO ISO, FOR EACH RES I let t r mp • o. LF T J • I IF I GR NOENG, LET J.I-NOFNG

IF NALAMIll LE 0, GO TO 100 LET RUT I L I I I « RUT I L ( 1 | .?M

,

LET MXRFSII) • MXRFS ( | ) . | r R 0

,

LET TEMP • RT A I T ( I I • | MHO. /FLOAT I NAl AMI |

I ) Too 4 W I T F ON TAPE 4. TTPeRITyPI I I ) .J.STNI | | .NAlAMI I ) .RUTILl I I .TEMP, .MXRES(l),CMxRS(II.NM,R5i n

FORMAT (• • . A 4 , I R , I 5 , I 1 s ,o | 2.2 ,o | 3.2 ,D I 2.2 ,2 | I 2

l

ISO LOOP

ARITE on Tape 6 FORMAT I * I » ,S I 9

, 'BREAKDOWN OF RESOURCE UTILI2ATI0N 0 A T A * / / /S I 4 , « A V .ERASE HOURS OUT OF STATION BY OAT OF «E E K • /S I 7 , • MON TUE

...FD T H M FR| SAT SUN*|

00 TO 190, FOR EACH ftOAY J

IF COATS! J) LE 0, GO TO t 9n , 00 TO ISO, tor EACH res I LET OAILTII.JI . DA I LT I | i J ) .2M ./FLOAT (COATS I J >

)

IBO LOOP

190 LOOP

DO TO 200, FOR EACH RES I LE T J • I IF I Ci R NOFng, LET J . | .NOENG

ftR|TE ON TAPE 4, TTPER ( T YP ( I 11 , J ,0A ILT I I

,

I I ,0A ILY (I *2 | | .DAILY I I ,31 . 0 A I L T ( | » 9 j ,DaILY( I .5) , 0 A I L T I 1 .41 .DAILY! I ,7) FORMAT I • *

, A 4 , I 3,52,704. 2 ) 200 LOOP

DO TO 2S0, FOR EACH SHIFT J
m111

7 jh 77S

116

111

2 JO

731 232

73 3

2 V*

2 35

2 16 Hi

7«n

1 M I HI

2*1

2 ** 2«S

2*6 7*1 2SO

7=. I 7U

2S3

is.* 2SS

7*6

7* 1 7*0

7*1 7*7

7*3

’ *

M

7 * S

2 ** 7*7 770

7 7 1 272

7 7 3

7 7 M 27S

2 7*

77 7 300

30 1 302

303 30M

3 OS

30*

307

3 | 0

)| I 3 I 2 313

3 I M

3 I S 3U

3 I 7

ir iSMriui L r 0., 60 TO ?so

00 70 7*n, row EACH *rt I LET SUTILI|,J| » SUT It I I , Jl •{<!, /TSHF T IJI ?M0 LOOP

2S0 LOOP

»R|TF ON TAPE * . rooH»T i •

i • ,s i * , ‘summary of fire service bt type of casf*//S23,.av

•FRaGE TOTAL average first AVFRAGE , /SSt*TVPE NO, CASES RESOURC

• t-HOURS RESPONSE time DiiRATI 0N'/S2S. '«E0UIRED IHlNUTESI

• (MINUTES]./)

i\R|TE On Tape G, I . m TP , I t ,C* INO ( | ) , AVTME ( I > , AVERT II » .ELAPS I I I , • FOB EACH KtMOS I FORMAT I l3,GI,A*,t8,oiO.<iinU.2,OI7.2>

00 TO 3 1 0 , FOR J«( I 1 (SI LET ISUMIJI • 0 00 TO 300 , TOR | { I I iNCATEG)

lft isumiji isumiJi fresiu.ij

TOO LOOP

3 I 0 LOOP

» R I TE ON TAPE 6 FORMAT (• |

( S|9. 'DISTRIBUTION OF RrSPONSE TIMES FOR THE LAST ARR I

V

• I FT, ENGINE'///* ReSPoNSf T|ME*,S7,*I EnG. CASES 2 ENG. CASES 3

. ENG. CA5FS H ENG. CASES 5 ENG, C*SES«/» IN MinUTES', S7,

• * E R F 0 REL E RF 0 FRE8 rel FREQ FREQ PEL F»CO FREQ PEL FREO FrcQ

• BEL F Be 0 * I LET Cl • 0. 00 TO 3*0, FOB ) • I I I ( NC ATEG

I

0 0 TO 3SS, for Jp I I > I 5

1

lft rtliji • n.

IF ISUMIJI fj

E

0, LET REllJI . FL0ATIFRE8I IJ. I ll/FLOATI ISUMIJII

3 S S LOOP

LFT C 7 . C L I M | I I

T B | T F ON T A P F 6 , C I .C2.FBE8I I I , I I .REL « I » .FRE8I 17, I I .RCLI2I . • FBFRI I 3, I I , p I. L I 31 .ERfOl It, I I , R E L I 1 1 *FRE8| ls,l I ,REL(SI Format I DM. | ,* TU*|07,|,a*,|m,S2*0|, iIiS3,I*|,S2,D|« <I,S3,I <I,S7,0|,S,

• S3, I 1,52,01 ,M,S3, I

** . 5 2 • 0 I , H , S 3 I LET Cl • C 2 3*0 LOOP

,*R|TF ON Tape *, ISUmi I I'lSUMlI) ,lsUM|3> .ISllMMI .ISUMISI FORMAT I *0*. S3, 'TOTALS*, l|M, Ml ISI 00 TO S I 0 , FOB I I 1 I I 3 I LET I SUM II) • 0 00 TO SOO, FOR J I I I INEreEI

LET I Sum I | J . I SUM I I ) EPEQ2U.iI

SOO LOOP

S I 0 LOOP aritf.ontape*

format I'M ,S3S,' AVAILABILITY'///' NO. OF I OL r * , S I 3

1 • SM I F T l'.S|3,

. ‘SHIFT 2* , SI 3, ‘SHIFT 3 * / * ENG. C 0 , • , S I 1 , ' F RES . REL. FREQ. FREQ.

. RFL. FREO. FREQ* REL. FREQ. 'I 00 TO SSO, FOR |o| I I |NFreE>

DO TO 6 20, FOR J» I I I I 3 I LE T MEL I J I • 0.

IF ISUM(J) GR 0, LET REL ! J I FL0ATIfR£Q2( I .J) I/FLOAT I ISUMIJI

I

S20 LOOP

LFT K» I - I

•v R | T E ON tape 6, It . r RE 8 2 | I , 1 I ,R£l t I > . FREfl 2 | | , 2 ) , REL I 2 I t FRE 02 I I , 3 I , • REL I 3 I

FORMAT IIS,5IS.I5,S3,Dl.R,SA,l5,S3,OI,RtSA,|5,S3,OI.H

S5P LOOP

STOP

END OF ENOSIM *
320

321 322

3 2 1 374

3 2 S

3 2 6 122

3 30 331 332

333 314

3 3 5 336

337

3 4 0 34 1 342

34 3

3 4 4 345

346

34 7 350

15 I 352

353

354

355

156

357

360

36 I 362

363

364

EXOGENOUS EVENT »LE r T s x v f event card

r

C EXOGENOUS E«ENT ALERT ACTS *S AN INPUT ROUTINE. IT OCCURS pMENEvER

C THE EIRE DEPARTMENT is NOTIFIED THAT ITS SERVICES ARE NEEDED AT A

c particular case.

c CREATE CASE READ NOCASICASEI.NOAlmCCaSEI.XCICASEi.yCiCaSEI.TTPEICASEI

format ( S 3 , 2 I 5 , 204 , 0 , 1 S

)

LET OCCURlCASEl • time

let N-NOAIM(CASF)

LET E I RST ( C ASE I 0 ARITE ON Tape 6. C ASe ,NOf ASICASE I .NOALMiCASE I . XC (CASE I ,YC 1C ASE I

,

• type (Case i »occuric*sei

format (• CASE INPUT*. | In. 215. 205.0. IS. H3, 2. 21 on TO 40, FOR | • ( | I I N

I

CREATE ALARM

FILE ALARM jm ASET(CaSE)

LET CAS(»LARM) CASE

let NUMhR(ALARM) N. | .

|

40 LOOP

R F a n OCCUR I T | , 0 ST I I » .NECni I I .NTCOII I A FOR EACH I IN ASETICASEI

FORMA T 5 I 2Mn , 13,12)

LET NEC 0 ICA 5 E) 0 let ntcoicasfi • o 00 TO 50, For EACH AlaRm |n ASFT(CASE)

let NEC0ICA5E) • NECoiCasE) NECOl»LARH)

LFT NTCOICASFI nTCoiCasEI NTCO(ALARH)

lft occurialarh) • time . occur i alarh

i

CAUSE alarm at OCCUR(ALARm)

50 LOOP ARITE ON Tape 6, NUMrr(alaRM) ,OCCURIALa s H| ,0ST|ALARm) j n£ C o I alarm) , .NTCO I AL ARM I

' FOP E*Ch ALARM |N ASETICASE) I format 5 I I 5 , M4 . 2 , 2 »H I . 2 . 2 i 21 2 I RE TURN

END OF ALERT

A-10
>*s U4

3 a 7 370

37 1 372

37 3

3 7 H

3 7S

37*. 377

•trio •*o I •<02 «03

Rfm

•*os

••06

•*07

•*

I 0

“ I I

endogenous event alarm

C ENDOGENOUS event alarm OCCURS WHENEVER IT is OESIREO TO DISPATCH

c more resources to the scene or a case#

c LET CASE CAS(ALARH)

IE DEBUG EQ I, AR|TE 0 N TAPE A, NOC AS I C »S I AL ARM » | , C AS I AL ARM »

• NUMRR I AL ARM ) .TIME FORMAT I* InSIOE alarm EOR CASE * , I S * * I <> • I I 0 ,

• ALARM NO,*, SB,* AT

• TIME*, M3. 2, 7»

C A| L ARR 1 AL ARM | CALL RESAP(ALARM)

IE ESET(ALARM| IS EMPTY, GO TO 20 DO TO 10, EOR EACH IRS IN £SCT|ALARM|

C A i L SERVF I ALARM. |RS)

10 LOOP

20 IE TSETIALARMI IS EMPTY, RETURN

do to 30, eor each Irs in tsetialarni

CALL SERVE(AlARM,|RS|

30 LOOP RETURN

END or ALARM

A- 11
*, I) M I* f H I f | Nf • Mil | *L A |

•« i 3 m I m

* l

«=. H | h

'*

1 7 H?0

M? 1 *22

*?)

* ?*

*2** *2 6 *2 7 MO

* 3 I u 3 2

M 3 3 MH

•* 3S

m 36

* 3 7 ^vO

<4 <4 | 4 q 2

m M 3

M m m

*4 M S

M M 6

M M 7 *4c,n MC» j * S 2 **.3 MS

C

c SUM R OU T I NE »BS OETERm|NEs THE TIME IT BOuLT) TAKE f OB EACH RESOURCE

C 10 arR|vE a t The SCENE or THE CASE. TmE RESOURCES arc rut in a

f B«n»IO SET R S F T . c |0 IF RStl IS EMPTY, 60 TO ?n REMOVE first IRS F R Oh RsFT

60 T 0 | 0 , 70 LET case • CASIALARM)

do to 90, mo each Res irs 60 TO ( 70 ,60 .90 ,90 I » I e I IRS I SO LET DIST » I T 1 ME -DEP (

| RUN ( I RS I I I «SP7

|E | 0 I R I I RU 1 I I RS I ) Eq |, go TO 60 CALL a m L R E I a » X R ( IPS) , K 0 E « T ( IRUNI IRS) I ,**OIST)

IT 0 I S T E Q 0,, 60 TO 70

C A | L yih£RE(«»YR(IrSI,y0EST(!RUN||R5II.»*0IsTI

60 TO 70

6 C CAI.I Y HE RE ( .. YR I I RS » , yDEsT ( 1 RUN | IRS I 1 , »»D I ST I IE DIST Eo n,, GO TO 70 CALL *hfRE(.»»R|IRS),»DEsT«!RUN||RS)),»»DIST)

71 lFT n - APS ( xc | C ASE I ,S-«R ( IRS » » ABS I VC (CASE l + .S-VR I IRS »

1

SO LET SPEED . SPI

IE TYPE(CASE) LS 2 , 1 ET SPEFD • sP?

L F T TARR(IRS) • D/SPEED

IF 10 1 I R 5 I EQ 1 , LET T arr 1 | RS I • TaRRIIRSI DELAY

FI; E IRS IN RSET

90 LOOP

IE RSET I.S EMPTY, REtuRN

IE nE RUG E Q 0, RETURn

00 TO 100, E 0 R EACM IRS in RSET

a.R|TE on Tape 6 . IR5,TARhiIRSI,*r(|RS),YR(irS).IBIIRSI

format (• RSET CONT A I NS

•

1

5

,MS , 2D*t . 0 , I S

>

Too LOOP

RF TORN

END OF ARR

A-12
VSA subroutine “Hr r f (»«,o*.bisti

VS7 C H»0 C SUB R OU T I NF ’HERE DETEp*M| W f S THC , ,

• COORDINATE Or

“Al C traveling fb 0 h > to *d »hicm has travelcd a total

r RAJ LET DEL* » D*.R*

VaR LET AOEL* • A BS 1 DEL *

)

14 AS IF ADEL* LE OIST, GO T 0 fn nt IF DEL* LS o. t LET R* • RX-OIST

A A 7 IF PEL* GR f) Jt LET R* • RX « OIST

A 7 0 IF R* LS 0,, LET RX . 0, *71 let dist o. VT2 RETURN

•*7 J ID LET RX D * A7A LFT OIST a D|ST - A DfL * A 7 S RETURN

A 7 A ENO OF AHCRE

I RESOURCE

distance out

A-13
•* 7 7 SUBROUTINE OFS*P(AL*BMD

soo r SOI c SUBROUTINE RESaP CONCERNS THE HESOii«CE ASSIGNMENT POLICY. IT SO 2 c selfcts the particular rfsouhfES rhIch »ill respond TO THE ALARM.

snl c , son UFT C»st • C A S

(

alarm ( SOS trr nfn • o S04 lft ntr o SO 7 lo IE BSE T IS EMPTY, GO TO JO S|0 REMOVE FIRST | R 5 F R Oh R$ET

S 1 1 IF 1 B I 1 RS I OR 2 , GO TO 10

S 1 2 IF TTP( IRSI FO 7, 60 TO 20

S 1 3 IT HER 6E RECO(ALARM), GO TO 10 Sis FILE IRS IN t SET 1 AL*RM

1

s i S LET MEN • nth I s 1 4 GO TO 10

s 1 7 20 IT NTB GE NtCO(ALaRM) , 60 TO 10 s?n FILF IRS I N tseti alarm | S 2 1 LET NTS a NTR 1 S 2 2 GO TO in

S 7 3 30 IF FSCTIALARMI IS EMPTY. f,0 TO No

S 7 s IF fif Rvf, EG 0, GO TO MO

S 7 S s R | T E ON T A ° E 4. | RS ,TAR(k IBS 1 , 1 8 ( ]RS 1 ,TYP( |RS) , FOR EACH IRS IN

S 7 4 •ESFT|ALARM|

S 2 7 format (.' ESET C0NTA|mS*'|S.H5,21S|

S 3 0 MO IF TSETIALAOMI is empty, GO TO SO

s 1 1 if or bug fo o, go to so

s 37 * R I IF ON tape 4, 1 RS , TARR ( t RS 1 , 1 B ( I RS 1 ,TyP 1 IRS 1 , FOR EACH l»5 IN

S 33 . TSE T | ALARM

|

S 3S FORMAT (• Tret C0NT A I nS » * I 5 ,MS ,2 1 5

1

S 3S so IE f'E*'l » NTR EO NECO 1 AL ARM 1 +NTC0 ( AL ARM I , Return

S 3 4 *R|TF ON TAPE 4. N F C 0 | C A S E 1 , NE C 0 1 A L A R M ) , NE N

S 3 7 FOR“AT <31 1 0 » SuO LET NECOICASEI • NECoiCASFI - necoial* bm > nen

SMI lft mtcoicasfi • ntCocCasei » ntcoialarM) « ntr

S M 7 lft |NSUF . INSUE « 1 S M 3

•',0 1 T f ON Tape 4, T I Mf ,NUMRR ( ALARM ) .NOCaS ICAc I Al ARM ) » ,NECO<ALARM|

,

Sms Iiurni ALARM) .MEN, NTR sms FORMAT ('OAT TIME*, Mr. 2, ALARM N0,*,l2,* OF CASE NO. « , 14.’ RECE

SM& • 1 VF S AN INCOMPLETE b ESPONSE . • / • THE ALA»M CALLS FOR* .12.* ENGINE C Sm 7 • OmpanIES » n n < , I 2 ,

' t RUCk COMPANIES. ONlY'.IJ.' ENGINE COMPANIES AN ssn . 0 •

,

I 2 ,

• truck companies are AVAILABLE. *• SSI R r TURN ' S S 2 ENO OF RESAP

A-14
S*^3 SSH

r

» r.S SSA

S*7 S60

*62 *63

SAM

* 6 5 *6 A *67

*70

* 7 I *72 *73

5 7M

0 7S

* 76 ^7 7 600

ATI 602

A 0 3

A n q Ans

AHA

a n 7 A 1 0 61 I 617

6 I 5 6 I 4 6|S

6 I 6

6 1 7 6 7 0 67 1 672

673

6?4

6 ?S 676

*77 6J0

SUBROUTINE SERVE I AL»RM , | RS

I

C

c iuntimir i ne strve is r*u.rn >*hEn a resource IS ASStGNrn TO sfRVE A

c PARTICULAR ALARM, JT SETS UP BOOKKEEPING DEVICES FOR DATA ON

C RESOURCE UTILIZATION,

C « LET CASE • CASIALABN)

let temp • TIME TArriirSI

IE 0€ BUG FQ I, WRITE ON TAPE *, jRSiCASC.TlME.TARRI (RSI .T emp format 1> SERVE • « 2 I I 0 , 3mj , 7, 2 I GO TO ( 30 , I 0 , 20 . 2SI « I B < I RS ! in CANCrL HOME CALLEO * DE V ( | RUN I I RS II OFSTOOY home CALLED I OF V I I RUN « I RS »

I

GO TO 40

70 CANCEL ARVSM CALLED I DE V ( I RUN ( I RS I I orsTROY ARvsn CALLED I DEV ( I RUN t J RS I

t

GO TO 40

2S CANCEL FINSm CALLED I OE V I I « UN «! R 5 I I DESTROY ElMSH CALLED IDEVI IRUNI IRSJ

)

GO TO 40

JO CREATE HUN CALLED IBuNlIRS)

let tout m run i i os i » - time

40 LET DFP I I RUN| IRSI I • TIME let E RANOM

LET I 0 I R I I PUN ( I RS ) > m 0

IF E GR ,S, LET I D

I

R I I RUN ( I RS I ) .1

LFT IPI IRS) • 3 LET »»L»"I IRS) »L*RM

LET KDESTl InUNI IRSI > • XftCASE) .0 LET YOEsT (

I

PUN (

I RS I I « YCtCASF) .5

I e OST(ALARM> LS O.i GO TO 1 00 CREATE ARVSM CALLED | DEv | I RUN I I RS 1

)

STORE IRS IN RESNOI IDEVI |9UW| 1RSII

»

STORE alarm IN ALMNOi IDEVI IRUNI IRSI II CAUSE ARVSM CALLEO • OE V | I RUN I I RS II AT TIME TaRRIIRSI

LET NEXT I IRUNI IRS) I » I RE TURN

TflO LET TEMP • nsTIALARM, . taRRIIRSI

IF TEMP LE n., LET T£mP . T ARR I I RS I / 2 .

0

CREATE SNORE CALLED IDEVI IRUNI IRS)

>

STORE ALARM IN ALMNO) (DEVI IRUNI IRS) )) STORE IRS In RE SNO « * OE V ( I RUN <1 RS II » CAUSE SNDBK CALLED lOEVl IRUNI IRS) I AT TIME » TEMP

LET NEXT! IRUNI I R S | I 4 RETURN

ENO OF SERVE

A-15
* 1 I A 12 A13 Alt

A1S

A YA '17 *10

AM I AM2 Am!

A M M AMS

A M A AMT ASO

AS I AS?

AS 3 ASM ASS

ASA

AST

aao

FMOonFnmis rvENT snOr*

STORE ALMNO(SNDPX) IN A L i R m STORE RESnOISNDHM 1 N IRS

IF PFPUG FQ |, WRITE ON T»PF A, I Rs . NOC AS « f AS I ALARM |l

. NU“I'» I AL AR « | , T I he fot-at (• i-'smr snO(,k < 1 1 n , mi . ? ) or S T ROY snook c»llf.o idevi IRUNIlRSl ) LFT SPEFO « SP2

IF TYPE (CASiALARM) I GE LET SPEED • S^l LET 0 1 5 T • (TIME-OEP( (RUMORS!) JmSPEED

|F 1 0 I R I I Rii>i ( I PS ) 1 £q I, 60 TO 70

CAL' «HtRF(..XR( IRS), lOrSTI IRUNIlRSl I, ••DISTI

I r 0 1 ST EO 0 , GO TO 50 CALL WHrRF I *»YR I IRS) .TOESTI I RUN <|RSI)«**DIST)

r, o t o s o 20 call WHERE I **YR < IRS > .YDESTI IRUNt |RS> > t«*OIST)

IF OIST El) 0, GO TO 50 CALL *hfRF(*»*R(|RS),xOFSTI|RUN(|RS)I,»*OI5T)

SO CREATE FlNSH CALLED I DEV I 1 RUN ( t RS ) ) STORE ALARM |N ALMNOi lOEVI IRUN( IRS) I I S T o R F IRS I*' RFSNOI l0F»l |RUN( IRS) ) ) C»"SF FINSh CALICO IflEV I IRUNI IRS I I AT T I HC RFTURN

END OF SNOB*

A-16
AA

I

AA7

AA 1 *A1

A AS

A A A aa ; A 7n

A 7 1 A7?

A7 1 A71

A7S

A 7 A

A 7 7 7no

'n i m?

703 ?1*

7ns ?n»

'07 '10

7 I I 'I?

7 1 3

7 | s

' I S

' IA

'I ' 770

' 7 I '77 '71

'7«

' 7S '7A

'7' '10

'll '17

'll

endogenous r vent aRV$n

c

c ENDOGENOUS EVENT ARVsn OCCURS RMEN A RESOURCE ARRIVES AT THE SCENE

C OF A CASE,

C STORE RESmocaRVSNi I »| |R; ( STORr ALNUOIARVSNI In alarm

LET IRC |RS) • 1 LET CASE CAS<ALA*«|

IF OERUG EO I, RRITt ON TAPE At I RS • C *S* t T I ME FOR w AT i • AqvSN* ,71 lo,M 3 , 2 t 2 l LfT X R ( I R 5 1 • XOEST I |RUN| IRS)

I

LET t R I I R S ) • ynESTl jRUni |RS] I LET XOEST I I -jun ( ! RS I I • 0 . LET TOEST I

| HUN t I RS • » 0.

IF TIRSTICASE) NE 0 . GO TO SO LFT F I RST | C asE | • I Rs LET TPAJTlCASF) • TIme-OCCUR(ALARH)

IE TAAIT(CASE) LE m*T*T, 60 TO 50 LET mxt.-.T . twaIT|C*SEI

LFT C H X T A . NOCAS(CASE)

LFT RMS T A » IRS SO IE E |RST I ALnRMl NE o, GO TO AO LFT EIRST(ALARM) • IRS LET TTAITIALARM) o T|mE-OCCIIR(ALARM)

AO LTT temp . T I ME-OCCUr ( ALARM I LFT CRESIIRSI • TEMP

L F T R A A I T | | R S I • R»A|T<|PS) TEMP

LET AVRfS(CASF) • AVrfSicaSF I TEmP

LFT CNRFSlC'SE) • CNrES(casE) | LFT II A L A M ( |RS) « NALamI IRS) I IF temp LF m X RE 5 I I RS | , GO TO TO LFT MXRESl IRSI • TEMp

let c m xrSi irs) • noCasicasialarmi ) LFT NMSHSIIRS) > NU«BR (ALARM)

7 fl DESTROY ARVSN CALLED IDEVI IRUNI |RS) ) let NEXT 1 IRUNI IRS) I • 7 CREATE FlUSM CALLED I oE v | I RUN I I RS )

)

STORE ALARM |N ALMNO| (DEVI IRUNI |RS| )

|

STORE IRS IN RESNOI IDEVI |RUN| IRS) )

I

CAUSE FINSh CALLED IDEVI IRUNi IRSI

)

AT TlHC * OSTIALARMI RETURN

ENO OF ARVSN

A-17
73"

7 3S C

7 3* C

7 17 C 7mO c 7M 1 7m?

7 m 1 Nt

7 ms

7 M *

7 M 7 7S0

7 S 1

7 S 7

7 S 3 7SM

7 S S

7 S 6

7 S 7 7*r

7*1 7*7 7*3

7*M

7 * S

ENDOGENOUS EVENT F I n SN

EH0fir.fM0U5 rvENT FINsm OCCURS »MEN a RESOURCE FINISHES RENDERING

assistance to »n al*rm,

STORE »LNNO(F|NSH| In Alarm

store pisnoifinshi In ips IFT r» r.r fASI«LA»N| « |E nr hug TO I, *R|TE nN tape a, I RS >C A$C , T | mE format i« r insh* ,7l ln,Hj,2,ii otstrov finsh callfd i

o

r v c iruni irsi

i

lFT UlST - » It S I X R ( l R SI“XSISTN( IRSI I I AbS|VR||RSI-VS<STNi |RS»

m

create home called I OE V | I run | I RS I I STORE IRS | I RE S'JO ( I OE V ( t RUN I I RS > I I C A U R E home called IPfvI IRUNI |RS)

I

AT T | Nf * 0IST/SP2

LET XOEST (l»UN( IRS) I • XSlSTNIIRSll

LET YDESTi IRUNI IKS) I YSISTNIIRSI)

LET I 0 I I RS I • 2 LET OFP I 1 RU-| I I RS II * TIME

LET NEXT! | RUN (I RS ) I 3 LET NCOmP ( C A SE I NComP ( CASE ) 1 let TOTmEicasEI • TOtmE < C ASE > *T I ME-OCCUP I A| ARN|

|E NCOMP (CASE! LS NE C o(CaSE)*NTCOICASE| . RFTURN

call TERMICASEI RETURN

END OF FI NSH

A-18
. 1 n 3 A

. I r 17

• I o •• o

• l ci i . I ot*

• 10 HJ

. iru

. IONS

. I'll*

• 1017

. IOSO

. nst

• I0S7

. MSI

. I *>S1

• MSS

. MSA

. I 0 S 7

• 1 o*o

. I O* ! . IDA?

. Mai

. 8 0AM

t I06S

ENDOGENOUS EVENT HOHf

rc endogenous event MO H r occurs »hen i RtsouHfr iRRivcs at its

c ciuc station,

c STORE RESNOlNOHf) |N | R <; lr DEBUG EQ |, ».R|TE ON TA»E A, |R$,T|HE fOO-AT {I HOHf •

, I |

0

.

m

l

,

f . t t . DEsTwOT H0Nf CALLED |DEV| |RUNl |RS>

I

LET |B||»S 1 . | LET «R( |RS| . ISISTNf |RS1I LET Y R | I R S I . YSISTN, |R S , , LCT RUT I L ( lost RUT| L I|RS) , T I ME • T OU T < I RlIN I | RS I I IE TOUT I I RU*!t I RS I | Gb TlaST, GO TO 10 LET TUT|L(|b$i T U T | L j t 9 s I TI«E - T L * S T GO TO 70

JO LET TUTIL(lBS) • T U T | l

I

| R $ ) « TIME - T OUT ( | RuN (

| R S |

)

70 IE DPARTITInEI EQ ORiRT|ToUT|IRUN(|RSI|l, GO To 30 LET DUTILllBSI • 0 UT|lI|R 5) » T I HE - E L 0 A T ( f)P » R T l I | wr i » GO TO 10 30 L f T OUTIUIRSI OUTfLMRSI « T|H£ - TOUT I | RUN ( I RS I I 10 LET IRUNI IRSI a o Rf TURN

END OE HOME

•HOME

A-19
7 ** SUBROUTINE TCRHICASC)

7*7 770

7 7 « 777

77 J

7 7 R

7 7 S 77*

777

I 000

I 00 | IC07

1001

I 00«

IOOS

100*

.1007 1010

loll 101? 1011

I O |

*» MIS

Ml*

10 17 M 70 M7I

1077 M71

1071 I07S

102* M7 7 MJO MJ

I

I0J? M 31

I 0 JR loss

c

f

e SUBROUTINE Tf«H OCCURS *Mf N 4 C»SC IS TERMINATED,

#.ritc ou T*of *, c*se ,t i me ,noc*s i c*sc

i

E0 q"AT I S 70 « r end 0E C*sr • , I I 0 ,M J , ? . ? , I

I 0 I

I E TYPElC*Sri US It GO To R 0 ir typeiCasfi gr nsInos, go to mo ttT ELAPSITrPElCASE I | • r .4 P S I T r P E ( C * ST I I Iht - OCCURCCASEI

LET C* InOi TVPE K»SE I | • r s I NO I T rPE ( C 4SC 1 | » l LET A VT»T I TYPE (CASE I » « 4 vT*T I T YpE (CASE I t l*AlT(C4sr>

LET A VTME ( T rPE I case I I a V T «{; | T Y P C I C A S E I 1 TOTMEICASd

RO IE CnRESICASFI GR 0. LET 4 V A V R . A V * V R AVRESiCASEI/

•FLOAT I CURES If ASf I I IE CNRESHASfl GR 0. LET CASES CASES I LET 1C • 0 LET T m A A 0. SO I E 4SETIC*SEI IS E m R T Y • r.O TO *0 REMOVE EIRST ALARM Er 0 M 4SfT(f4Srl

I E i;CCO(*LAbm| tO 0. GO TO SS S? IE rsET|AL4-»M) |S EMptr, GO TO SS REMOVE EIRST IRS ERO h ESETIAL*RmI

IE CRESI I®S| LS 0.4 GO To S7 LET 1C • 1C.

|

LET S144 • OCCUR(AL*om| . OCCURlcASEl « cRrsiiasi

IE SMA* GR T M A X ,LET T M A X . SMAA

GO TO S 7 SS Ot STROy Harm

GO TO SO *0 IE 1C €0 0, GO TO 70 LET T M A X ThiuU 110

, 00 TO AS, Ear |<t| I (MClTrr.l

IE T M A x GR CLIMlI | , GO TO AS LET EREQIIIC.II • EReOUIC.II I GO TO 70 *S LOOP

LET EREOI I IC.NCATEGI EREOI I |C .NCATfSl I 70 oestroy Cast return , END or term

A- 20