NATIONAL BUREAU OF STANDARDS REPORT

10 432

A SEARCH AND RESCUE SIMULATION MODEL FOR THE UNITED STATES COAST GUARD

VOLUME III

PROGRAMMER LEVEL DOCUMENTATION FOR

“PREPROCESSOR”

Sponsored by

U. S. Coast Guard

U.S. DEPARTMENT OF COMMERCE

NATIONAL BUREAU OF STANDARDS

, 1
NATIONAL BUREAU OF STANDARDS

The National Bureau of Standards ' was established by an act of Congress March 3, 1901. Today,

in addition to serving as the Nation’s central measurement laboratory, the Bureau is a principal

focal point in the Federal Government for assuring maximum application of the physical and

engineering sciences to the advancement of technology in industry and commerce. To this end

the Bureau conducts research and provides central national services in four broad program

areas. These are: (1) basic measurements and standards, (2) materials measurements and

standards, (3) technological measurements and standards, and (4) transfer of technology.

The Bureau comprises the Institute for Basic Standards, the Institute for Materials Research, the

Institute for Applied Technology, the Center for Radiation Research, 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 an Office of Measurement Services and the following technical

divisions:Applied Mathematics—Electricity—Metrology—Mechanics—Heat—Atomic and Molecular Physics—Radio Physics -—Radio Engineering -—Time and Frequency -—Astrophysics -—Cryogenics.

THE INSTITUTE FOR MATERIALS RESEARCH conducts materials research leading to im- proved methods of measurement standards, and data on the properties of well-characterized

materials needed by industry, commerce, educational institutions, and Government; develops,

produces, and distributes standard reference materials; relates the physical and chemical properties of materials to their behavior and their interaction with their environments; and provides

advisory and research services to other Government agencies. The Institute consists of an Office

of Standard Reference Materials and the following divisions: Analytical Chemistry—Polymers—Metallurgy—Inorganic Materials—Physical Chemistry.

THE INSTITUTE FOR APPLIED TECHNOLOGY provides technical services to promote

the use of available technology and to facilitate technological innovation in industry and Government; cooperates with public and private organizations in the development of technological standards, and test methodologies; and provides advisory and research services for Federal, state, and local government agencies. The Institute consists of the following technical divisions and

offices: Engineering Standards—Weights and Measures — Invention and Innovation — Vehicle Systems Research—Product Evaluation—Building Research—Instrument Shops—Measurement Engineering—Electronic Technology—Technical Analysis.

THE CENTER FOR RADIATION RESEARCH engages in research, measurement, and application of radiation to the solution of Bureau mission problems and the problems of other agencies and institutions. The Center consists of the following divisions: Reactor Radiation—Linac Radiation—Nuclear Radiation-—Applied Radiation. THE CENTER FOR COMPUTER SCIENCES AND TECHNOLOGY conducts research and

provides technical services designed to aid Government agencies in the selection, acquisition, and effective use of automatic data processing equipment; and serves as the principal focus

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 — Sys- tems 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 Measure- ment System, and provides appropriate services to ensure that the NBS staff has optimum accessibility to the scientific information of the world. The Office consists of the following

organizational units:

Office of Standard Reference Data—Clearinghouse for Federal Scientific and Technical Information —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, DC. 20234.

- Located at Boulder, Colorado 80302.

:1 Located at 5285 Port Royal Road. Springfield, Virginia 22151.
NATIONAL BUREAU OF STANDARDS REPORT

NBS PROJECT

4314561 June 1971

NBS REPORT

10 432

A SEARCH AND RESCUE SIMULATION MODEL FOR THE UNITED STATES COAST GUAR

VOLUME III PROGRAMMER LEVEL DOCUMENTATION FOR

"PREPROCESSOR”

by

S. S. Karp, L. K. Cummings, M. D. Maltese, A. L. Weber

Sponsored by

U. S. Coast Guard

NATIONAL BUREAU OF S'

for use within the Government, and review. For this reason, tt whole or in part, is not authc Bureau of Standards, Washing

the Report has been specilicall;

IMPORTANT NOTICE

Approved for public release by the

Director of the National Institute of

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

sss accounting documents intended

i subjected to additional evaluation

; listing of this Report, either in

ib Office of the Director, National

by the Government agency for which

copies for its own use. <NBS>

U.S. DEPARTMENT OF COMMERCE

NATIONAL BUREAU OF STANDARDS

PREFACE

This volume is one of a series which documents a Search and

Rescue Simulation Model for the United States Coast Guard. The

material reported in this documentation was developed by an interdisciplinary team at the National Bureau of Standards with representation from the U.S. Coast Guard under MIPR Z-70099-0-01935.

The complete documentation is comprised of the following:

Volume I Executive Level Documentation

Volume II Analyst Level Documentation

Volume III Programmer Level Documentation for "PREPROCESSOR"

Volume IV Programmer Level Documentation for "OPSIM"

Volume V Programmer Level Documentation for "POSTPROCESSOR"

Appendix A Flow Charts for Programmer Level Documentation

Appendix B Program Listings for Programmer Level Documentation

The study was initially conducted under the supervision of Martin

J. Aronoff; subsequently efforts were supervised by Richard T. Penn, Jr.

Technical Project Leadership was supplied throughout the project by

Stephen S. Karp. Other participants from the National Bureau of Standards

Technical Analysis Division included the following:

Susan S. Chamberlin Elizabeth E. Leyendecker

'Linda K. Cummings Marcia D. Maltese

Mary Jane Duberg Patsy L.B. Saunders*

William Elliott, III Wayne A. Steele

Walter G. height Michael R. Vogt

Joel Levy Arnold L. Weber

i
Valuable advice was received from Alan J. Goldman* and Prof. Gustave J. Rati

of Northwestern University.

U.S. Coast Guard participants included:

Paul D’Zmura Gerald L. Underwood

Thomas T. Matteson Robert R. Wells

Support services were furnished by the following members of the

NBS Technical Analysis Divison:

Mary M. Abbott Frances E. Jones

Theresa I. Conrad Lucinda I. Farrell

* Staff members of the NBS Applied Mathematics Divison

11
PROGRAMMER LEVEL DOCUMENTATION FOR "PREPROCESSOR”

Table of Contents

page

I. Introduction 1

II. Case Assembly Processor 3

III. PCP - The Program for Calculating Case Parameters 7

A. The Software 7

1. Main Program PCP. 7

2. Subroutine NEEDS 17

3. Subroutine NUCASE 20

4. Subroutine READ 23

5. Subroutine FIELD 23

B. User’s Guide for PCP 26

C. Example PCP Output and Interpretation of Output .... 32

IV. DEMGEN and HIST 36

A. Introduction and Description of Programs 36

1. Program DEMGEN 36

2. Program HIST 46

B. Subroutines within DEMGEN 52

C. User’s Guide for DEMGEN 65

D. User’s Guide for HIST 83

V. SELECT. 85

FIGURE 1 2

FIGURE 2 35

FIGURE 3 10

iii
FIGURE 4

£age

21

FIGURE 5 .... 31

FIGURE 6 . . . 53

FIGURE 7 77

FIGURE 8 84

TABLE 1. 26

TABLE 2. 33

TABLE 3 50

IV
PROGRAMMER LEVEL DOCUMENTATION FOR "PREPROCESSOR”

I . Introduction

The objective of the Preprocessor, PREPRO, is to prepare a set

of Search and Rescue cases to be simulated in OPSIM. Figure 1 is a

macro level description of PREPRO. Here it is shown that the SAR

Assistance Reports go through a series of cleaning routines to produce

the OPFAC FILE* which contains a set of cases organized by OPFAC.

Multi -unit cases are assembled via a sorting program called MUTAPE to

produce a CASE FILE. To include the C-130 interdistrict cases, a

program called MUC130 merges the C-130 cases with the CASE FILE to

form the PCP CASE FILE. MUTAPE and MUCL30 are called the CASE

ASSEMBLY PROCESSOR.

Once the PCP CASE FILE is prepared, the remaining major steps of

PREPRO can be carried out. The first step calculates the case parameters from the input PCP CASE FILE; the software designed to accomplish

this task is designated the Parameter Calculation Program (PCP) . The

PCP produces the SARSIM CASE FILE for input to the second step, the

Demand Generator, DEMGEN, or the HIST program which orders the cases

chronologically. DEMGEN or HIST produces a CASE TAPE* the exogeneous

event tape input to OPSIM.

Several options are offered to the user in preparing the final

CASE TAPE:

*7TFTLEtt refers to a collection of SAR cases not necessarily arragned in

chronological order. "TAPE" refers to a FILE in which the cases are arranged chronologically.
MAJOR STEPS IN PREPRO

DEMGEN

GENERATE

DEMAND

PCP

CALCULATE CASE p* 1

PARAMETERS

S C ADC TM 1 .. "1 CASE FILE

J

HIST

ORDER CASES

CHRONOLOGICALLY
• The user may use the historical dates and times of

occurrence of all cases 5 and the associated case parameters with the HIST option.

© The user may randomly generate the dates and times of

occurrence according to hourly exponential distributions

,

and the full case descriptions relative to the generated

time period.

« The user may increase or decrease the case load, and choose

to do this relative to the specific case type, the specific

station, or across all cases in the entire district.

© The user must specify the scenario limits -that is, the exact

time span over which the simulation will be run.

© The user has the option to validate his generated occurrence

times against the input values of the arrival rates.

Normally, the mode is to run the CASE ASSEMBLY PROCESSOR, and

PCP once, generating the final SARSIM CASE FILE with single unit, multiunit, and C-130 case descriptions, in that order. Many runs can be

made by DEMGEN, depending on the user selected option.

The next sections discuss the CASE ASSEMBLY PROCESSOR; PCP and

DEMGEN.

II. Case Assembly Processor

The case Assembly Processor is two FORTRAN V programs which

produce the tape that is input to PCP.

MUTAPE assembles the multi-unit cases from the district tape

(OPFAC FILE) by gathering together from the participating OPFAC's

- 3

-

for a single case all of the C --cards (SAR Reporting Command data)

and associated D-cards (Assisting Resource data) . These multi -unit

cases are gathered at the end of the single unit cases. The output CASE FILE is a tape with all the single unit cases followed by all

of the multi -unit cases

.

MUC130 is a cull routine that extracts all of the C-130 cases

for either the east or west coast and merges them at the end of the

CASE FILE. This new file is called the PCP CASE FILE and contains

all of the single -unit cases followed by the multi -unit cases and

finally the C-130 cases. Since all of the C-130 cases are in the

district 5 or 12 tape, the input to MUC130 is either the district

5 or 12 tape and the CASE FILE from MUTAPE.

A sample of the C-130 cases from the PCP CASE FILE follows:

- 5 -
If

CV

G c c: >- >- CM >-G C'7' r c. ; 3 3 c > O >~

C >- 0 >- >- rH >- e V

C >-A >- 0o >-GO

C >- G? C? c > G 7

ij- 3 <\ r\ 7‘ . a «—1

«—<

rH »H »H rH

r

—1

rH rH rH r—

•— rH »—• H r— r~‘ *— A.4 O' 7i Oj —4 r- rH

A Cs

C\‘ "vi

H

d 3 d

d ^y- 3 £ «—1

r—4rH *h ro rHO -H

O rH

O rH

X rH Oj rH rH rHX rH Ifd

X *H ra co rH

r-1 7 c d _ a rO H H r- CM X G 3 X 3 3 3 X X d rO CM X d* 3 X X 0 d Is- X c O Is- rH X f f H A 2 ra G O X 3 c C l_ r ' rr G r< d ro 'Cr- ^5 c 7c 3 ra a X C X ro 0. a CM x r rH f« . ro X cC ro rH X d 3 «-h G Cl Cf CL CM r 3

L£ cr c: rd 0 d (_c 3 rH C_' 3 3 c r- 0 C' «H 0 rH 0 AJ

G *H 3 AG rH 0 rH

G

r—1 c fo 77o rH C> Id Cs *HG

A Cc Jo LJ O X 73 0^ r^ 'M 0 X 0 a ,a O ^ 3 fa «*4 r- X G h- 0 3 0 0 0 X r- X G d G •H G X 0 d d *H O 3 Cf K) O X i g cC £ G O CL 0 CM O' 5 Cl ro 3 C“ 3 G a. G G G G 0 G rH C rH X rH G A O A G A G Q G G 3 Cl Cr G G — C 0 sX Q; Gi CZ ^D 3 O 3. r- 7r Cl 0 Q 3 3 C X O G *H 0 0 O O O G X G C c G G- G G G a e r-i Is- d G G G 3 Q

•3 r^ 3 X

d rod 77 77 ra 3 C\J

G CMC CM

G roO d* o ro 0 roG rG

H

X

G 0 x Is- Ll- 7; Gx

A

d G. r^- 3 3 d 3 3 O' 3 X 7 3 3 X d/

O

OO

G 0 OGCGG 0 GXG Is- H 0 ' G

r cs r*>

H 7* *'l

G

G

G f- 3 ,—. L r'c d u7 «-H CM CM 3 G (7- ro f? 3 ra rO X X X G Is- d* rH rH c ro X O Is- rH Is- X A rH 0- d C- G X fr Cs G G rs

Q* <r

G

G

G c\ 3 iT 3 CM C? CkX 3 3 3 3 c Lia

x O' CM

G OJ 0 ro 0 «HAX 3 r^-

g

a

C

d

d

—i G Ci Ci cc O'

XO c T— c. »— c «—w

«—<r—i { r rH 7 G 3 c CM

G rH rH rH rH r- A' rH rH T—<

a: r— r— rH r—A c* rH

d

C r— r— Ci 7. r—

T—

A c

ij x; 3 77 3 T

O CM 3 X 3 C^: Cl

O r_a 3 i~o rHO

X 0 rO 3 O

O

G

X

O 0 GdG rH 0 XO

d C? rH

G 2 7 XG

X Cs 3 *7 3 X *—1 X CM CM rO •7 3 a G G- G d G X O -X «—1 3 *H rH rH d* A Is A H A X C~ Cf G T I li 2 G X rH 7r d _ ~

-f

d 7 “L- >- 7 f- Cf: 7 CM 77'

G 7.: C. 3 r 3 r—

7 r—

rH 3. 0 “7

A 0 C< 7 c«== r. . If' 3 -7 >- 3 __ 3 Z. 3 >- 3 3 3 ' Qi 3 a* i7 G1 3 id 3 O >- O CL G 3 G >- G 3) G 77* rH 7 G d G >- O 3 7 3 O 3

>- c. >- 3 >- 3 3 d I c > 3 Cr f >-

G 77;G 3 G 3 c 3 G 3 C >-

G >-G 3 G 75C > G Cs *7 3 G 3 7

z?

—

g CJ: 3 CM 3 in 3 d* 3 3- CC rH 3 3 d «HO -cO

X

OXG

X 0 X

G

X

O rH

d rH

O *HG

d

d d*

G Cs C? c XX 3

r— 2 2 3 3 «—< X1 *—<

r_a 3 X 3 3 3 rH ui CM

G Is- O CC

G rH CM OJ to

X

O rH

XA 0 Is- Xd

d 3 0 3 2 Is- f- r- 3

r— c 7; c - K' -0 tr> «-s r^ d- 7 r

n C.v r". Qi ro

H rH

d

n Os! rH rHX

C

X roX ro

X OJ rH cc rH

X

dC

AX C?

X

x X'C ‘ L rH 0 v£ «-H X 3 X 3 7? ra ro 3 3 C3 X G ro G X O (O O 3 rH 3 G *H 0 X 0 IO rH X G d d r- tH Q: 7 Is- —4 X Cs

*= *—<

g

Q 3 3 3 3 3 r*-* «—1

fa 7*q ci

OC «H c 3 G 0 O rH

O rH

O •H1 0 OG «H c rH

O

Gd 0 O Ci 7?

G c cr- 3

r* c c Xc 3 CT c~ d- CV

G 3 O: 3 O' 3 3 c? 0 O 0 c 0 X

X d*

X 3 3 rH c 0 O

O c G •XX

Qd

G

X 2 Cs

G Is* G 7

—I 3 r- •3 c 0 G •d 0 CM

G

O 0 0 X X; f>G

G

G d*G

—4

d* 0J <—t ' r 73 0 d

G

d

G ~ X 3 G O 0 3 O 3 a

"* 0 (T 3 3 rH c 0 O

O

G 0 G 0 G

G

C

X

G

X

G

X

O c G

d

G

a 3 G

G

G 3

cr 3' 3 3 CM 3 CM

d CM 3 3 c- CM 3 3 3 rHG 0 C

O

O 0 G 0 O C\J

OOO

OO

OO C'G

d

d ^ G

d 7'

G

O 0 2-

V 0 C.

Q G= CC

OXO

O •X) 7 - 3 G

a 3 3 rH

OG c 0 O 0 O c GXXX

O c d d.-O c G

dd o X fS ' r.

A

O

X 3

£> CM

X 0 3 D 0 X

X 3 X)

a 3 a

XG

X CM

X rOX rOX

X 0 Is- x

G 0 G

X

G

X

X Z _£X r- 3 £ Xd

X i h •—< O 3 rO X •—( 3 *-4 3 fa d 3 a 3 CM CM d* <H c C X 0 rH to Al G rH G rH G X O 0 O d *3 A X fa *'i X 0 X

t; M.

L vC c.

X 3 X, c; 0

'- Kj f C

X <7 CM c. 0s- c. CM

G

X c X

C

X

G

X

C

A

m

G l_ : x c G c 0 r

X» O r- rrX ro iX CM 3 Q

r OJ 3 3 3 rO X' rH

CX 0 rH

O ro

XXX rH

O

H

O «—1 G

A

X C\ CrXX G: 2 r

—1 X cc fs ' e 2 AJ

»H

O 3 -3 d"

H ^\J

H d- 7 a ..a

O

a ra fc

O ro

X

X O' fO CM

O rH rHGHGO

OO

A

X rHd

d

d 3 A 3 2 dA O'

d

(~b vC cr c? ra vC dX

a d* ra re; rH 3 3 3 X c OX 3 X

Or

X

O

X roX

O

X

G

G rH rH

H 3 d -h

A Cf

d

G CC O' 0- 7; c 77' 3 7 r~ Z c • 7- r f ff rH 3 c. 3 rH ~ —4 3 c 3 rH 3 O 73 c 7 A 7 rH d c rH r 7' rH - A - cr.

>'? 3 3 G in CM

X '0

v*a 3 X c~ 3 ci

O <-<

O vC d* 1^X 3 3 H

x

X

XO

X c ^4X 0 C 3 A rH 0 Od r- 0 a f «H 0 _3 3 3 »“ *—< 0 7J *3 3 d 3 :a 3 rH c O C G O O 0 O H rH •H rH O O d A d A 7 77 G O ra 3 0 O G i « fo < A 3 3 x: CM X C H 0 '3 3 X 3 a 3 d* r—1 O ^4 CM IO CM 0 X O G O fO X ' <L A rH rH X ra fa 0 X G Ci rH O Is* i

C" r*7 3 r

—1

3' c\. '_*• cr (i u; 0 X c C

G CMO d* c X 0 OG

d f' X c —

H

7* ' r—.

rH f!. fr C~

G

C ( r c

ra

X cc Cs

d CM CLJ

X crO

d 3 Q

X 3 3 3 X O'* d*

X CM in

X CM rH CM

X roX rH

X

X CO 0 rH

dd 3 *HQ Cs

X cc

A

G 3 0 H O '\j 0 rH rH :3 a 'M 1 3 3 0 0 G G <H rH O —4 rH AJ O <—1 O A 0 H rH 0 *H f«- ^2 A —I

ra 5.

G

H

a < cl (c •3 cr cm CM H X Cr 3 G 3 >- a r- H O X X r- to 3 3 G X X X X < c. rH rH X d Li d- rH >- Q r- X CC

C • s_ c> 3 X •H CM C- r> 3 H C- d f- G Is- G r- G 3 rH X rH r- rH A A CC A C= 3 x O rH G Is- G Vi rt 3. f vD C' X d Cvj c C_c 0 3 rH CM 'J 'X cr- *h X r—, Q 0 G G G X c O X X sJ l: C r- .—I

CM LLG .£

;~

G

r

B j? r^- zZ

X dX d*

r ~r .a

X *3 r^

a

Xd Is- d*Xd

X

dX d*XdX -d

Xd -JX d- j 3 rQ

d

A 7. X

d r- 7

.72

O rO 3 3 x. 0 X; c rO 0 3 ro . a 0 ro 0 ro 0 rOO ro 0 rOG rOG to

OX 0 r<lGX

d Cr

CXO 17

a 0 X

G 2

i_ - G r~i O 0 «H 3 r—1 V “ c_ 3 0 3 G tH

G rHC <sH

G 1—1 O rH

G •H

O rH

O rHO 1—s C «H

dd

G

H

O fiG r—1 G Cl "- G 3 •3 .3 3 O d 3 r G a 0 C d 0 X G O O X d> O O O O G d G d O G <d G 3 C G G .3 f- O G c 2•" X O •3 O O 3 3 0 3 3 a O 3 •G 3 O O d O O G «H G O O 3 O O O X d G O X O d d o O 3 ;a O G G 3 T cc CT r 3 3 3 3 X d 3 fr. ro C r- 3 O O d1 O O O c O c O d d rH O *H O A' O Is- O d* C? O G Is- 3 X G c 7 G ,0 ZO X d* X •—4 0 *7- a 0 3 G a X X G X G X G X K D O X O X O X O x 0 X d 3 x *0 Is- 3 X 3

c* c KjO ra 0 d> fo

d d*O

O CMGO

G

d

d i> 3 0 r—.

C' £_ •Q O 3 3 ra O 3 0 3 O 0 73 a G 0 X) O G O O G 0 O O G O O 0 O G O G O 0 O 0 3 d A G d fa O O G

O

a

O “H 3 3 •3O 0 d

O 3 7a •73OO

G .73

OO

G

GG *H

O

G r—4 _

O

G

GO

G

O

OG

G

O 0 d

d rH

O

A 2 O

O

GG 3 C" *7 •3 x

—• if »H

r

d rv*

d 3 O

X d- HdX

G

A

X • Hd C7N rf rH •~

X - K'

O

A 3 3 r-1 3 IT 3 3 ad rH * O faOd

O CM

O «HO A) 0 rH <G

d

OG HO rH

O rHOA fa fa 3 XG 7 O —4 CL rH * O 0 '3 3 X 0 G' O X 3 3 O rO d X 73 G d O O' 0 T O d 0 0 O X O r-4 H- C X O X C d fo fo 3 3 X f : O G O 0- * ~- CM f—1

"= (.« CM 3 »-H c X rH rX

O * CM 3 X rHGG

O AJ rH rH

O rH rH to

A * -H rHA rH

X rH 3 j c O ra

d

AGO * g cC H J 3 CM »-H X GJ 3 G «—1 d G a d* H C X 0 X G 3 0 rO g X 0 r- d O O C A G X d d X 3 a L_ H J rH HC g 0 O' 3 3 O O •H 3 CnJ C Q. G “O d O ra O O c O O 0 O O 0 rH G <H G rH * O CM G A O A Q lr C O 0 O 3 G A T

fi 3 3 3 •3

a 3 CM 3 H 3 3 i a

G

XO

a

GGG

GGGGGG

G

GGGG

G 3 O -HGG

a 7 0 G .3 3 3 3 G 3

-H

A 0 ;i r-

—1 T

O CM 3 a ? G 0 O -O

a

X

G

OGO

O X)

G

X

G

G

G -dG <H G*G G>

O 3 G e .f -H

X 0 3-G

O .3G Oj : U O 0 0 O 3 O »—1 0 i a Cl rH G G' CM X G O O G* O CM G CM O G G «H 0 3 O O G O H O J- .i -d 3 A i 3 3 'G G f;

•. j . 0 3 J' 3 d 0 a 3 T O G G LJ O' X rH *G 0 O AJ O -H 3 X *H G 1 G 3 G 3 G : . 0 f- G tH a 3 G f 3 G 3 3 3 3 3 rH *H r: «-H d '•AJ O d> G M O rH O —l G AJ G -4 3 >—1 M —4 G G O zZ* •3 *a “a 0 3 L rH 3 _

— 3 r 3 ,7i cr* 3 CM 3 X

O 3 aO

G ro 3 •H

G

X

O Is- G 3 OOG

X

O 0 G

GO r—| G

X

O 3 '> -H 3 X •aX 3 d

G

Hg 3* 3 O «—» 3 CM

d 3. s rOd <d 7? G

GdG

GOGG rHG *HG rH d*

M

G

A .3A

O i 7 O 3 3 J. 3 G rH ‘.'*1 o . G "r- :7v d 7 O 3 O ra r*\ O 0 r~- CM O d O G O G C O O lL O O O X G G d d> O rr- -C 3 O G X f. G 3 a O 3 d § —1 3 AJ 3 3 3 a 3 O G *: D 3 d G *H G O G G O G G J— G O 3 < *H 3 G G 3 G 3 1 D G 3 a X 3 3 3 c 3 3 *H 3 a 2 0 X O O 3 •3 •a CM G G) X 7a CM O G G G O G G G O X O 3 G O Is- O G 3 G G MiG 3 G '3 G G G 3 G •

7?

X 3 7* *—( 3 -0

dOO .;a 0 dO rO

d GO

OGG

C

G

G

CG 1—d

X G*

O d*

O G>dGG

d '70 3 O 7 >3 cr

GG 7 j t O •3 3 M 3 O 3 a a O J O a D G O G G O A G G G > G O 3 _J 3 3 G G G G ^ d G G }- 73 >- 3 3 G J

f! •1 3 3 3 7? 3 3 n 3 3 3 3 a AJ

G

X ~j "I

GOGGG

OGGG

O VX 7 X 3 GGG 3 G 3 7 "3

O

G 3 a

T 3 *3 3 X < • a O X Cl 3 0 0 0 3 3 3 3 O O G Li O CM O O O G O G O G G Is- *3 O O O G G 3 O G _1 G G Is- j G G G O

f\j '7 . cr 0 3 Cc

O vD 0 0 3 O 3 :_«=

O

O 3 d- rj> 0 rH

O

OG

OOO

O

O

O

O 0 O 3 O

OG

OOO

dG 0 G c is

O

O .3 3 7* I —» C 3 7 .0 3 0 3 X O a 0 G »-H ri X O 0 O X O O G X G X C5 C G HH 0 7' X G X G d ^ D 3 O 7 f f _ -H | J _a PS. 3 3 a 3 r- 3 3 a a G —4 a X G X G X O X G 0 G O G 0 G 0 3 X 3 0 3 113 3 -H a Tv 3 O' 3 J 3 0 —4 3 a 3 3 0 3 O 3 a a 0 G l0 O G O CM 0 G O O G G •G O O X G O x G X G G 0 O a 33 Is- •H 3 G 3 3 3 X X O 3 3 lO 0 0 O' O G' 3 <-4 O rO ra «-H rH X G X O CM O X O X d 3 0 31 rH O X a x O 3 d X 3 O •H O G G ,s 7 3 t 3 a 3 > 3 «~4 7a 3 CM 1 ~H •x 3 A £ M O' ro O' ro 7: rH -£ rH •J. •H 3 r X -1 J X 3 i 3 d d _3 0 O' .0 X 3 -4 3 J 3 3 3 3 -H j a G o D M

.4

D

H

G J'

G 3 G

d

d

O 3 3 O' 0 3 X 3 H- 3 3 3 1 G Z 0 a 3 3 5 3 3 ? a 3 0 3 3 O d a a d n O' a <rz 0 O O' G 3 G X G 0 0 AJ G O' G G 0 G O G 3 '• 3 -3 n 4- a f —. -T>, '"3 3> •0 3 a O lO u O 3 n a a O X) rH X Q O' 3 O' 0 x 'X 3 IjlJ d Id O-' 5 CO Jj X U O' 3 5 0 0 »H .3 3 O' i x X Is- '.5? i ° <n -C O' O d r- 7a • a X r^ 0 O fa X O' X 3 X Is- O Is- X X sO 3 0 rH r-* A X X 3 d 3 3 0 •H - —»

O' 0 X '0 3 3 o 3 a a 3 3 3 3 AJ 3 a a MJ o n ro a 0 G O 3 rO 3 X O d G d G d > 0 X G O 3 X 3 i § 0 3 3 a D Tv 0 T* .1 o 3 3 z 3 a 3 3 7 3 T7" a a G 3 AJ X .a G ~z G O' G 3 0 3 G Z G ? G 3 AJ 3 73 3 3 3 3 1 3 G 7 a G O' 3 ^ j *—I

“3 3 d 3 a 3 3 3 •H 3 O

a ’a

G

D d* 3 G

X

G O'O O'

G

X

G

O

G 3 3 3 G

X

G f -3 3 a

a 3 3 H- 3 G 'O'

G

X "> ? D .7 J n _> -i a a Z, d- O a d 0 D O' G 3 G 1 3 0 f> 3 j» j G X •r\ •> * ^ H i 3

'3

OX

a

O

—1 n —4 •O

a

a rO

D rH

a

X

J

O *3 iO 3 O .0 ro

H

OO T4X 0 x

H

O 3 M

H f. 3 X 3

_3 •H

O 3 3 *“

d- -H -HX •a

a

—c

rO

O

a •H 0 *H 3 —l 3 —1 X

H

OH A! *H 3 «HX -!

d rH 3 i “d «H

OG

a •H O'

H

X 3 O 3 3 3 3 n O X 3 0 • 7a a G G d G •3 G X O O G G CD 0 O X G O O G * O G G 0 G X f a 3 X 3 .7 G 0 3 3 * -3 CM 'H a a "M d- 7J AJ AJ d a r;a 31 d d 3 ra CM *0 AJ X CM 'O M O AJ ’H AJ H A O * A G A O M d -a a fj A 3 HJ J \l G

X

d

X 0 a

a dn

X

d

a ’a

n

d 0 a

XGX 0 XXX

O

X 3 XO

Og

d

X

G

X

H

X —4 I i X

M 0 j 0 sO 0 3 * G § 3 3 M a O 0 0 3 3 'AJ a a rH d AJ ra O H O 0 G H G »H O G G »H G G d G G 3 A 3 H MiG •H A 3 G H G G d 3 A JD 3 O' CM CM 0 O a AJ O d G a rH rH H X -H r- —4 3 rH *

J H O •H G * rH O H A X G i A -H G 3 •H 0 d g
III. PCP - The Program for Calculating Case Parameters

PCP, the computer program developed to calculate the case parameters required by the simulation is comprised of a main program, PCP,

which calls subroutines NEEDS, READ, NUCASE and FIELD; all are coded

in FORTRAN V. A standard input/output (I/O) routine, NTRAN

1

, is also

called to allow for a higher degree of parallel processing, not

normally permitted by FORTRAN V. By buffering I/O in parallel with

computing, more efficient use of the tape (and/or drum) can be gained

through the use of NTRAN.

The remaining subroutines and main program descriptions and how

to use PCP are discussed in the succeeding sections . Flowcharts and computer

listings, will be found in the accompanying NBS Reports 10435 and 10436.

A . The Software

1. The Main Program - PCP

Most of the case parameters are prepared in the main program,

PCP. PCP calls subroutine NEEDS to map the assistance rendered

to the client, to the need required in OPSIM as coded in the

Resource Capability Matrix.

The inputs to PCP include the SAR case descriptions for

the district undergoing simulation, i.e. the PCP CASE FILE

and the following data set: (a) the district location data; (b)

the search speeds for each resource type in the inventory; (c) the

needs matrix; (d) the interdistrict (C-130) case location data

which includes district centroids and associated accumulative

HjNIVAC 1108 System Manual , section 7, page 9.

- 7-
probabilities of occurrence (used for cases with unknown locations)

;

and (e) the location of each OPFAC relative to the district origin.

A random number seed is also required. The reader is referred to

Table 1, page 28, the Input Data to PCP^for a description of each input

variable delineated above, the sample input data which follows it, and

the illustration for preparing the data set input deck.

Once the data set is read in, PGP processes a case at a

time to develop the simulation required case parameters. The

reader is referred to Table 3, page 46, Output Data from POP for

a description of each of these parameters as they appear on the

case tape. Paper output is also provided and Figure 2, page 48,

Example of a Case Description-Output from the PCP, illustrates

this form of output.

Refer to the Flowcharts of the PCP, Report 10435 during

the discussion. A case is read from the PCP case file via subroutine NUCASE. Some of the case data is converted to integer for

processing in PCP; other data remains in its alphanumeric form.

The reader should refer to the SAR Assistance Report form Figure 3,

page 10, during the discussion. NUCASE also determines CMAX, the

maximum number of C-cards (Reporting Command Data Cases) and N0(I),

the maximum number of D-cards (Assisting-Resource Data) associated

with each C-card.

The multi-unit case control number, A3, is converted to

integer; the case number is retained and therefore only the

alphanumeric is changed. This conversion is listed below:

- 8

-
CONVERSION OF A3 TO INTEGER

Old A3 New A3

DXXXX 1XXXX

UXXXX 2XXXX

JXXXX 3XXXX

KXXXX 4XXXX

LXXXX 5XXXX

MXXXX 6XXXX

NXXXX 7XXXX

OXXXX 8XXXX

PXXXX 9XXXX

QXXXX 11 XXX

RXXXX 12XXX

SXXXX 13XXX

TXXXX I4XXX

EXXXX 15XXX

WXXXX 16XXX

- 9

-
Unit and C-130 Case Format

. I Ki AbDK’Y I’l I' Al i I • I- N T

I u- s. COAST GUARD

CG-327 2 (Rev. 9-65)

! REPORT ASSISTANCE REPORT

M s s, v c\ r \a »\v or- R-rc l c gy ct u r u. ld

• REPORTING UNIT (In cl ude lo c al ion o r p amion on t ol ol i onj

j _ <5030c>>'7 „ Cx Co u c &?<**, /VjgAdLf_ Col, ] a.

1 |0

IDENTIFYING DAT Ai

Xb

11

1 I Zj_L06ICiH_ fields plc, CnOE o. / O „ / ,3 ,L Unit Accounting Code O

U

^ ^ j Un it Case Number o 2. , 2 V

(9, o

Multi-Unit Case Controller Code

and Case Number

Month and Yenr Unit Notified (Item Cl)

instruction:;

Reference: Latest revision of COMDTINST 3123.9

1. Prepare original only. Use of pen or pencil in permitted.

2. Shaded areas require uso of code list at oil times.

3b ALL SPACES MUSI' BE I-ILLED. See reference for codes when an item is unknown or not applicable.

* Y - yes, N - no, U - Unknown or not applicable; DIR - Defi- ciency Improvement Report

** To the nearest tenth of on hour.

0. DISTRESSED UNIT DATA: CARD NO. 1

21 1 [21 0 , /I s//.3.a,; . A

Distressed Craft Number XL 12 62 o\ it PType of Di stress

21 2 29 I \ o

—- 1 Date/Time Distress Incident & , [Occurred <*6 13 65 o u Dis tressed Unit Description 25 3 35 op Total Number of Persons in Distress ' or on Distressed Croft C'? 14 67 S' Source of Information

Total Number of Lives Lost Among

V\ 4 39 62

L ^ i l 1 Persons in Distress 15 68 o Means of Notifying Const Guard

5 43 o, o OJ_ S.o ,o 0

Value of Property Involved 70 16 70 o o 7 Type of Distress Area 51 6 51 S, o Air Temperature (°F) Record the severest T6 17 73 o Nature and Severity

_n NO 7 53 'fp Sea Temperature (°F)

weather encountered in the distressed unit's area. (Required in all coses

unless omission is specif- ically covered in the

reference.) NA - not applicable

18 76 1 Cause ol Incident

i r

8 55 2,o Wind Force (ICpots) 17 19 77 3 Final Status of Property

: ST 9 57 o y Co Height of Sea (Feet) 7'i 20 78 r

Was Distressed Unit’s Emergency Equipment

Satisfactory? (No - COMMENT' REQUIRED)

si 10 52. 0.3 Visibil ity _(Ncarcst_Milc) . UK - unknown7^ 21 79 >\f Were Non-Coast Guard Units in a Position and Capable of Performing Rescue?

i fcl l 1 61 \ j 1 Was Distressed Unit Being Set Onto a Dangerous

/ j Bench or Shoal Within 5 Miles? 10 22 10 PL

Vessels 65 Feet and Under; Bad Vessel been Boarded within Past Year?

C. REPORTING COMMAND DATA: Card No. 2 (Cover ONLY Reporting Command Porformonco except Items C6 on<J C7.) ThiVs ui stressc ti Unit” io we <I7" Ls co rte d

1 21 / v5" / ,<9, /

,5“ Date/Time Notified lit

i mui ) i * 9 ,56 O i O t CP O j or Transported

'll

11

_

CV3

102

CJ Day of Week When Notified, iao O, Number of Bodies Recovered Number of Assistance Cases in Progress at Time

Notified Ui 11 63 Number of Persons Saved

/

'Date/Time First Assisting Resource Underway 12 | 66 O Number of Persons Otherwise Assisted Number of Assisting Craft or Groups Assigned to Case lZf ? 13 69 Number of Persons Indirectly Assisted

36

- Dutc/'i ime l' irst Assistance

/ , O / , CJ , -c C> at Distress Position l

7

- / , -5~

1 / , / ,3s Dnte/Time Case Terminated

10

113

12

. LATITUDE . V, / I3.VIV

LUNG <9,7 ,QLONGITUDE 7 ,0

0,0 o

Position nt which Distressed , Unit Located. (Report even it j Locati d by another Unit.)

j | a

M

78 0 I Report Review Requirements

Distressed Unit’s Distance (miles) from Reported Position 14 0

iU

113

1 11

T

lb j

1,61

160

lot rn

IT 4

D. ASSISTING RESOURCE DATA: Cord No. 3 (Ono card for each rosourco.)

1 2lL I ,3 j ’V ype of Resource Repo rted in this Section ISO

2 3 O , V

33 /

,-5~

V .3 ,7 ,7

/ o / p

/.O 2. ,5”

0 0 0 2

. 8 54

o

Assisting Boat, Vessel or

Aircraft Number

Dnto/Timo (3) Undorwny,

(4) On Scene, Slnrtcd Searching

or Rendezvoused.

Distance to Scene, Search Aroa or Rendezvous Point

142

It 4

1'iG m

Thi. item for HQ USE ONLY

02

14 Hours Spent Searching or Conducting , o Communications Check O Q OO (a Total Miles Traveled on Cose

91 58 O ! Q O / . 3- Total Time Underway on Case

Number of Sorties

15

IS 2.

OJ

U68

70

72

73

O 2

/ 0

L

Method of Locating, Distressed Unit

Assistance Rendered to Personnel

Prlumiy Anninlimcn Rendered Relniing to Property . "Secondary Assistance Rendered Relating

to Prop City

On Scene Frcqviency

Ship/ Shore or Air/ Surface Cont rol Circuit Was Equipment and/or Personnel Performance

Satisfactory? (No - DIR REQUIRED)

- 10 - Figure 3
The location of the cases (x,y) relative to the district

origin (LAT, LON) is determined next. If the location data

C7A(I) or C7B(I) is a zero or 9999 and no location data is given

for the OPFAC A1B(X) ; i.e., it is undefined in SARSIM, then the case is

assigned the following coordinates (XPT, YPT) relative to the

district origin (note: these can never be (0,0): The above is

true for both single unit and multi-unit cases (in single unit cases, 1=1.)

If, however, at least one C-card does contain the location data,

that location is used relative to the district origin, (LAT, LONG)

.

If the case does not have location data but does have a defined

OPFAC A1B(I) with a location, the case then takes on the location

(XDELTA, YDELTA) , from A1B(I)

.

If the case does have a valid location (C7A(I) , C7B(I)) then

(x,y) is calculated using plane geometry.

If the case is an interdistrict (C-130) case, with a valid

(C7A(I) , C7B(I)) then the distance R to each district centroid,

is taken as the minimum R. Once A1A(I) has been determined, (x,y)

is calculated. If the case occurred in the district being

exercised, DIST, then A1B(I) is set to zero. (A zero code in

A1B(I) causes OPSIM to assign the case to the closer station in

DIST.)

If an invalid (C7A(I) , C7B(I)) is given for interdistrict

C-130 cases, then A1A(I) is assigned via the Monte Carlo technique

from the accumulative probabilities, PROB(D) , where D is the

district

.

- 11 -
Once (x,y) has been found for all cases in DIST, a check

is made to see of (x,y) is in the range (XLOW, XLHT) and (YLOW,

YLMT . If not, (x,y) is arbitrarily set to (2,2).

Note, that for multi -unit cases with multiple C- cards the

(x,y) is retained in (xx,yy) until all C-cards are reviewed.

MIMCI is the date and time of notification for the case and

is taken as Cl(l), the date and time reporting command was notified,

of the first C-card. (The cases are sorted chronologically within

each set of SAR assistance forms for each multi-unit case.)

STANO, the sequential number of the primary station, becomes

A1B(1) the OPFAC corresponding to Cl(l). If A1B(1) is not in

the set of current existing OPFAC' s, then a new STANO is created,

added to the list and STANO becomes the previous STANO number plus

one. If no A1B(1) exists, i.e. it is zero, then STANO is zero.

Next TSM, the total number of search miles expended on the

case is found as, TSM = D"c*rds (D6(I,J) *S0A3 (D1(I,J)) where

D6(I,J) is the hours spent searching (by the Ith resource from

the Jth Opfac) and S0A3 (D1(I,J)) is the search speed of the

assisting resource type Dl(I,J).

A simple conversion is made of B16, the code for location

of the case in terms of miles off-shore is made. Called MILES,

the conversion is given below:

B16 Code MILES (tenths of nautical miles)

B16A = SXX 0.0

> 1, < 6 3.0

= 7, = 8 30.0

- 12 -
= 9 80.0

= 10, . .., 998 actual number of miles

* 999 9.0

Next, B17B, the coded severity of the case is translated

thus, to NSEV:

B17B Code NSEV

1 1

2 2

3 4

4 3

5 5

If the total search time D6T0T, calculated over all the

D-cards on the case exceeds five tenths of an hour, the case is

considered a short search case; SI is set to zero and if the

first resource searched (first D6(I,J) is greater than zero) then

S2 is set to one. If any other resource other than the first

searched, then S2 is set to two.

For each resource, the time the resource arrives on scene

and commences serving a need, B4FRST after searching is found:

D4FRST(I ,J) * D4(I,J) + D6(I,J), where D4(I,J) is the

date and time the resource arrived on scene, and D6(I,J) is the

time spent searching. Next subroutine NEEDS is called to translate the assistance rendered to the proper NEED(N) code. If the

need of a case NEED(N) is any of the following: 10, general

escort; 15, tow; 17, air escort; or 19, rescue and tow, then the

- 13 -
number of needs other than tow N is decremented, the number of

tow resources M is incremented and the need stored in MEED(M)

.

(Any miscellaneous -classed assisting resource data, i.e., any

D1(I,J) > 70, is not included in the output case description).

The array NEED(N) is a set of requirements for aid other

than tow for each case. The array MEED(M) is a temporary array

of tow (including escort) needs. If a case has a requirement for

tow (M>0) , only one such need can exist. Therefore, the MEED(M)

array is searched for the need with the highest rank and NEED(NN)

,

NN = N+l, is set to this need. The ranking order from high to

low is: 17, 15, 19, 10.

T0S(N) , the time spent on scene serving NEED(N) is calculated:

TOS(N) = D8(I , J) - D6(I,J) - ENRTE *2*D9(I,J); where ENRTE =

D4(I,J) - D3(I,J) and D8(I,J) = Total time underway for this resource.

D6(I,J) = Hours spent searching for this resource.

D9(I,J) = Number of sorties for this resource.

D4(I,J) = Date/Time on scene to start searching for this

resource

.

D3(I,J) = Date/Time underway for this resource.

Finally, for this assisting resource, the time the resource leaves

the scene after performing his need, LVTIME (I,J) is calculated.

The sets D4FRST(I,J) and LVTIME (I ,J) are used to find TE,

MAX

the elapsed time of the case. LAST is the

j j (LVTIME (I,J)}

and FRST is the (D4FRST (I,J)}. The elapsed time, TE, is

given by:

TE = LAST - FRST

- 14 -
TE is used to calculate DELTA(N) , for each need of the case

,

The MAX (T0S(N)}, MAXTQS, and the E TOS(N), SUMTOS (N)

N

are calculated, NN is set and GAM4A, the degree of non-parallel

» -r service on a multi -resource case is calculated, Prior to output of

the case, checks are made on the data for such crucial parameters

as M, N, and associated NEED(N) and MEED(M) • In short, general

housekeeping is performed on each case such that no illegal information is left to cause problems when simulating the case in

OPSIM.

So far the discussion has stemmed from processing cases with

no search or short search involved. For long search cases, (i.e.,

D6T0T, the total hours in search, greater than or equal to .5)

special processing is required to calculate the parameters

describing long searches. If the case is a single -resource case,

(i.e., CMAX and NO(X) are both one) and D6T0T does not exceed 14

hours, then SI, the number of search resources is set to one. If

on the other hand, this is a multi -resource long search, (i.e.’,

either CMAX qr NO (I) exceed one), and D6T0T does not exceed 14

hours, NITEHR, the nighthours elapsed during the case, is set to

zero and SI calculated: SI = D6T0T/ (elapsed time - NITEHR). If

D6T0T exceeds 14 hours, NITEHR, is calculated and subtracted from

elapsed time to determine SI, (A constant 0.99 is added to SI so

that SI becomes the next integer value after truncation) . For

all long search cases, a flag S2 is set to 0.

- 15 -
One additional conversion is performed on the parameter

B13, the client description, which contains the coded length

of the vessel. These conversions are listed below:

Old B13 New B13

50 66

51 101

52 201

60-99 0

The remaining parameters B3, B5, B6, B8, B9, BIO, and B12A

are ascertained in Subroutine FIELD, and not changed in PCP.

See page 24 for an explanation of these parameters.

Once the EOF is reached, the PCP halts.

- 16 -
2) Subroutine NEEDS

Sibroutin© MEEDS performs a translation of the historical

assistance r«tel®red (as reported in the SAR assistance form) to the capabilities delineated in the needs portion of the Resource Capability Matrix.

(The reader is referred to the analyst documentation for a review of

this matrix.

)

Generally, the assistance rendered to personnel, for each resource

serving a case is queried before the primary and secondary assistance

rendered to property, for the translation. This query ^coup led with an

investigation of the historical resource rendering aid, forms the core

of NEEDS. INEED(N) is the input required by NEEDS. The reader is referred

to Table 1 of the Input Data to PCP, the NEEDS matrix, for the correlation of

Dll and D12 between the code and the Resource Capability Matrix. Each

time a D-card (assisting resource data card) for a case is encountered,

in the main program, PCP, subroutine NEEDS is called. Upon entry to NEEDS,

the assisting resource code is queried to see if an aircraft rendered

assistance^ If so, and if the aircraft assisted personnel (i.e., D11(I,J) > 0)

then a need of the case being processed, NEED(N) becomes INEED(D) , where D

= D11(T,J), If the aircraft instead rendered primary assistance to

property (D12(I,J) > 0), then NEED(N) becomes INEED(D) , where D = D12(I,J).

If the client description, B13, indicates an aircraft and D12(I,J) is

coded 68, escort, then the NEED(N) is set to 17, indicating the client requires an escort by an aircraft. See Table 2, page 18. Explanation of

NEED(N) for code description. If an aircraft was called to scene, but no

assistance rendered, i.e., Dll and D12 are zero, then the NEED is set

to 18.

- 17 -
1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

Explanation of NEED(N)

Description

Provide Equipment

Deliver Pump/Equipment

Made Repairs

Fought Fire

Vector Other Unit

Dewater

Refloat

Icebreaking

Refueled and Supplied

Surface Escort

Standby

Located Property and Owners Advised

Freed from Position of Peril

General Assistance Rendered Surface

Tow; Dev/ater and Tow; Refloated and To’

Evacuate (Rescue) People on Board

Air Escort

General Assistance Rendered

Rescue and Towed

Table 2

- 18 -
If the assisting resource was a surface resource, Dll > 0, and either

D12 or D13 were one of the following; tow, dewater and tow, refloated

and tow, tugbird tow, or recovered property and returned to owner, then

NEED(N) is set to 19 implying that assistance was rendered to personnel

and property as described above.

If the surface resource assisted property only, and D12 was any one

of the following: tow, dewater and tow, refloated and tow, tugbird tow

or recovered property and returned to owner, then NEED(N) is set to 15,

a requirement for tow. If however D12 was none of these described, then

the NEED(N) is extracted from the INEED(D) matrix unless the assistance

rendered was escort and the client an aircraft. In the latter case, NEED(N)

is set to 17.

If the surface resource is called to scene, and no assistance is

rendered to either personnel or property then NEED(N) is set to 14, or

general assistance rendered by a surface resource.

Once NEED(N) is set, control is passed back to the calling main

program, PCP.

- 19 -
3) Subroutine NUCASE

Unit and C130 cases are processed in groups of 32 words (logical

fields, LF's). The first logical field is comprised of the number of

LF's in the case, the A-card, B-card, C-card, and one D-card. The next

logical field contains the number of D-cards and up to 3 D-cards. Each

successive LF contains up to 3 additional D-cards. If a case reports

no D-cards the number of LF's in the case is set to zero.

Multi-unit (MU) cases have an extra logical field at the beginning

of the case which gives the number of LF’s in the case, the number of

participants (C-cards) and the B-card. The number of LF's for each

participant with the corresponding A-card, C-card and D-card data follows,

the participants sorted by date and time of notification.

This routine calls READ to get a buffer of data (LOAD) ready for

processing. LP is then used as a pointer to indicate the word in LOAD

where the case begins (LOAD(LP)). Since a case may exist between buffers,

it is transferred to an array called DATA for further processing.

NUCASE then calls FIELD to extract the data to be used by the main

program, PCP. The number of C-cards (CMAX) and the number of D-cards for

each C-card (NO (I)) is set for each case.

Figure 4 relates the first logical fields and successive fields to

the SAR assistance form.

- 20 -
TREASURY; DEPARTMENT

j. & COAST GUARD

1G-327 2 (Rev. 9-65) MS^

ASSISTANCE REPORT

FORMAT OP FIRST LOSICRU FUlt

j

: REPORT CONTROL SYMnoi.

osfi^ooc

i ALU “TIMES LOCAL

REPORTING UNIT (Include location or permanent station) Cr /& gc^st; e,iT S£e5 O o O , &Jo u c <as fr/sr

,

F COL. W — — - 1 ^ . - J A. IDENTIFYING DATA: | INSTRUCTIONS

1 0 1 2 LOSICftL FIllSS PER. ChSE

Reference: Lntcst revision of COMDTINST 3123.9

L. Prepare original only. Use of pen or pencil is permitted.

2. Shaded areas require use of code list at all times.

3. ALL SPACES MUST BE FILLED. See reference for codes ; when an item is unknown or not applicable.

* Y • yes, N » no, U - Unknown or not applicable; DIR - Defi- ciency Improvement Report

** To the nearest tenth of an hour.

2 1 2 OJ_.3,0 / .3 .6 1 Unit Accounting Code

9 2 9 O 2.2-A. Unit Ca’fee Number

15 3 13 u o 2. , 2 , V

Multi-Unit Case Controller Code

and Case Number n 4 18 o, 3 (o Month aiid Year Unit Notified (Item Cl)

B. DISTRESSED-UNIT DATA: CARD NO. 1

21 1 21 o x n S ^,3,2 / .A

Distressed Craft i Number 42 j 12 52 0.4 /

1 Type of Distress

21 2 29 1 ,5 4>,5“

Date/ Time Distress Incident Occurred 45> 13 55 2 H Distressed Unit Description

IS 3 35 O',o ,o ,S

Total Number of Persons in Distress ' or on Distressed Craft 41 14 57 S Source of Information

11 4 39 O ,—,—

.

Total Number of Lives Lost Among

Persons in Distress (o% 15 68 0,-2L Means of Notifying Coast Guard AS 5 43 0,0,0, / ,£~ ,0,0 o

Value of Property Involved

1 70 16 70 o.o .9

i Type of Distress Area ; 51 6 51 Sp Air Temperature (°F) Record the severest 15 17 73 o 6 ,s Nature and Severity

55 7 53 4p Sea Temperature (°F)

weather encountered in the distressed unit’s area. (Required in all cases

unless omission is specif- ically covered in the

reference.) NA - not applicable

UK - unknown

lb 18 76 1 Cause of Incident

55 8 55 2,0 Wind Force (Knots) 11 19 77 3

. f Final Status of Property |

51 9 57 O , <£> Height of Sea (Feet) -n 20 78 r

Was Distressed Unit’s Emergency Equipment

Satisfactory? (No - COMMENT REQUIRED)

fcl

:o 59 3

Visibility 1 N earest Mile) 19 21 79 ar

Were Non-Coast Guard Units in a Position and Capable of Performing Rescue?

li 61

* Was Distressed Unit Being Set Onto a Dangerous Beach or Shoal Within 5 Miles? SO j 22 80 y

Vessels 65 Feet and Under: Had Vessel been Boarded within Past Year0

C. REPORTING COMMAND DATA: Card No. 2 (Cover ONLY Reporting Command Performance except Items C6 and C7„)

21 i 21 / 3T 1 , 0 ,/ ,s Date/Time Notified ' 12(> 9 56 0,0,0

Miles Distressed Unit Towed, Escorted | 3 or Transported

n 2 27 3 Day of W’eck When Notified 10 60 O, — Number of Bodies Recovered n 3 28 6?

Number of Assistance Cases in Progress at Time

Notified ,12 5 11 63 0 ,o ,S Number of Persons Saved

29 4 29 / & / ,o,/ ,s

Date/Time First Assisting Resource Underway 124 12 66 or— Number of Persons Otherwise Assisted

95 5 35 / Number of Assisting Craft or Groups Assigned to Case 121 13 69 0 ,-7- Number of Persons Indirectly Assisted

it 6 36 / .s / ,0,2. jr

Date/Time First Assistance

at Distress Position 152 14 72 i / , / ,3 ,«S Date/Time Case Terminated

102 7 4?

,

. L ATITUDE , ^ f 4, / 3,V V Position at which Distressed

Unit Located. (Report even if Located by another Unit.) m 15 78 o Report Review Requirements

101 47 LONGI 0,7 .O

TUDE 4 ,o\hj 151 16 79 This. Item for HQ USE ONLY

115 8 53 0 . 0,0 Distressed Unit’s Distance (miles) from Reported Position 140 117 80

D. A SSISTING R ESC)URCE DATA: Cord No. 3 (On© card for each rosourcc.)

•

1

1 ?1 7 3 1 Tvoe of Resource Reported in this Section 140 To 60 O, ! Method of Locating Distressed Unit M3 2 O' V- V ,3 , 7 ,7

Assisting Boat, Vessel or

Aircraft Number 1«2 11 62 /,/ Assistance Rendered to Personnel

111 3 2S

ZZ-Jl i— /,<s- * ,0J f

Date/Time (3) Underway, 134 4.2 64 (o p

Primary Assistance Rendered Relating to Property

(4) On Scene, Started searemng

Rendezvoused. 14b 13 66 op

Secondary Assistance Rendered Relating

to Property 155 4 V /

1*5* / o o.S — or

Ibl 5 4

£«0 o o z

Distanc Rendez

e to Scene, Search Area or vous Point in 14 68 O> 2— On Scene Frequency

IfcS

1 L- 1 k. Hours Spent Searching or Conducting Ho 15 70 / o Ship/Shore or Air/Surface Control Circuit

1W 7 4

1

5 O <D (?,0 Total Miles Traveled on Case 112 16 72 t

Was Equipment and/or Personnel reriormante — Satisfactory? (No • DIR REQUIRED)

US 8

.——k_ On 1 7. To tal Time Underway on Case 17 73

114 9 58 0, / Number of Sorties _ ... - „

18

\ •-

'

Fimas' 4* - 21 -
NB5 format for successive logical ptclks

1 1 0 NUM&Efc Of 3CARD5 PER. CftSt

3 1 21 Type of Resource Reported in this Section 42 ! 10 30 Method of Locating Distressed Unit

i 5 2 23 i Assisting Boat, Vessel or

Aircraft Number 44 11 62 1 Assistance Rendered to Personnel

I 11 3 29 i Date/Time (3) Underway,

(4) On Scene, Started Searching

or Rendezvoused

4fc 12 64 <, Primary Assistance Rendered Relating to Property

17 4 35 4% 13 66 1 Secondary Assistance Rendered Relating

to Property

Z*> 5 41 Distance Rendezv

to Scene, Search Area or ous Point 50 14 68 1 On Scene Frequency

21 6 45

** Hours Spent Searching or Conducting Communications Check 52 15 70 Ship/Shore or Air/ Surface Control Circuit

31 7 49

‘ Total Miles Traveled on Case 54 16 72* Was Equipment and/or Personnel Performance

Satisfactory? (No • DIR REQUIRED)

6fa 8 54

L~

1 “-T»- Total Time Underway on Case 55 17 73

40 9 58 Number of Sorties 5fc> 18

D. ASSISTING RESOURCE DATA: Cord No. 3 (On. card lor each roiourco.) | D. ASSISTING RESOURCE OAT Al Cord No. 3 (On. cord lor ooch r.lourc.l

i

! 1 21 * Type Of Resource Reported In this Section 10 60 1 Method of Locating Distressed Unit

1

i *2 23 Assisting Boat, Vessel or

Aircraft Number 4% 11 62 Assistance Rendered to Personnel

(o5 3 29 Date/Time (3) Underway,

(4) On Scene, Started Searching

or Rendezvoused

100 12 64 Primary Assistance Rendered Relating to Property

j It 4 35 10 2 13 66 Secondary Assistance Rendered Relating

to Property

77 5 41 I I 1 " Distance to Scene, Search Area or Rendezvous Point 10H 14 68 On Scene Frequency

6 45

e* Hours Spent Searching or Conducting Communications Check lCIo 15 70 Ship/Shore or Air/ Surface Control Circuit

! vs 7 49 Total Miles Traveled on Case los 16 72

* Was Equipment and/or Personnel Performance

Satisfactory? (No - DIR REQUIRED)

"10

’t 34

** Total Time Underway on Case 104 17 73

1 -M .58 Number of Sorties 110 18 D. ASSISTING RESOURCE DATA: Cord No. 3 (One cord for each resource.) Ui i 21 i Type of Resource Reported in this Section 150 10 60 1 Method of Locating Distressed Unit 113 2 23 J

Assisting Boat, Vessel or

Aircraft Number 15.2 11 62 1 Assistance Rendered to Personnel m 3 29 Date/Time (3) Underway, 154 12 64 Primary Assistance Rendered Relating to Property 125 4 35

i or Rendezvoused

15fc 13 66 Secondary Assistance Rendered Relating

to Property 131 5 41 - i- i . l * Distance to Scene, Search Area or Rendezvous Point 15S 14 68 On Scene Frequency

13.5 6 45

#« Hours Spent Searching or Conducting Communications Check IfeO 15 70 Ship/ Shore or Air/ Surface Control Circuit 154 7 49 Total Milea Traveled on Case K2 16 72

* Was Equipment and/or Personnel Performance

Satisfactory? (No - DIR REQUIRED)

144 y 53

*« Total Time Underway on Case H*> 17 72 • 14* y 58 ! Number of Sorties H4 18 HAVE YOU PREPARED ONE SECTION D FOR EACH CRAFT OR GROUP INDICATED IN ITEM CS? NAME OF DISTRESSED CRAFT Alsry /r^y

NAME AND ADDRESS OF OPERATOR A. 0. See

/O’O.o A? a •** Str<e^'C M9r& .

NAME AND ADDRESS OF OWNE«/lF DIFFERENT

COMMSNTO (Llot namota md addraizaao ot persona reported In CIO and CJJ

)

&• ^6 S “ Same &s a J'os&.fh Seg — * ~

$• S&B/ Jr. “

S&GH —

j: jiwss - /^aa.’ <5*‘, &WflSer

: DATE SUBMITTED <810 NATURE OAT* INITIALS

| 3/tC/g6 A6&" l. S£~4Ma/ REVIEWED AND FORWARDED

- 22 -
4. Subroutine READ

Records are read from the input tape, PCP Case File, in NTRAN

which allows for buffered I/O in parallel with computation. 256

words are read into one buffer while the other buffer is being processed.

Refer to the READ listing in Report 10436.

NPREC indicates the number of records (256 words) that have been

read for a particular OPFAC. If it is set to zero in NUCASE the relevant

information from from a new OPFAC header (32 words) must be saved, i.e.

IPREC set to the number of physical records in that OPFAC. NPREC is

incremented every time a new record is read, and when it becomes equal

to IPREC the OPFAC is completed and NPREC set backs to zero in NUCASE.

When all the OPFAC data has been read and processed a MU header

will be encountered. In addition to setting IPREC, a MU flag is set

to let the main program know that MU cases are being processed (MFLAG=1)

.

After MU cases have been completed the C-130 header is encountered and

a C-130 flag set (CFLAG=1)

.

When an EOF is reached, this routine returns to a specified statement number in the main program.

5 . Subroutine FIELD

This routine extracts the appropriate bits of the Hollerith

words in DATA for each case attribute used by the main program, PCP.

It then converts some of these to integer numbers and leaves others

in their original alphanumeric form. Below is the list of elements

extracted for a case. See Report 10436, for the program listing FIELD.

- 23 -
15

12

II

14

18

12

12

12

12

12

12

A1

13

II

12

15

16

14

NAME DESCRIPTION

A3A MU controller code

A3 MU case no.

A4A Month notified

A4B Year notified

B3 No. of people on board distressed

(if B3 > 4095, B3 = 4095)

B5 Value of distressed unit (if B5 > B5 = 130001)

.

B6 Air temperature (if unknown, B6 =

B8 Wind force (if unknown, B8 = 1)

B9 Sea swell (if unknown, B9 = 1)

BIO Visibility (if unknown, B10 = 99)

B12A Type of distressed unit

B13 Length of distressed unit

B16A If B16A = S, case occurred on land

B16 Distance offshore

B17B Severity

Entry Point FIELD2 [1=1 , . .

. ,CMAX)

A1A(I) District

A1B(I) OP FAC

Cl (I) Date/time notified

CIA (I) Time notified in minutes (tenths)

C5(I) No. of resources assisting

C7A1CI) Degrees ladutude

C7A2 (I) Minutes latitude

unit

130001,

99)

- 24 -
FORMAT NAME DESCRIPTION

12 C7BXCO Degrees longitude

12 C7Bs(I) Minutes longitude

14 C9(X) Date/time 1st resource underway

11 LGF No. of logical fields in case

Entry Point FIELD3 (1=1, .... ,CMAX; J=1 , . . . ,NO(I)

)

12 KLCI.J) Assisting resource type

12 D3A(I ,J) Date resource underway

12 D3B(I,J) Hour resource underway

12 D3C (I , J) Minutes resource underway

14 D3(I,J) Time underway in minutes (tenths)

12 D4A(I,J) Date resource on scene

12 D4B(I,J) Hour resource on scene

12 D4C(I,J) Minute resource on scene

14 D4(I,J) Time on scene in minutes (tenths) (if

D4(I,J) = 0, D4(I,J) - D3(I ,J) )

.

14 D6(I,J) Hours spent searching (tenths)

14 D8(I,J) Total time on case (tenths of hours)

12 D9(I,J) No. of sorties

12 Dll (I ,J) Assistance to personnel

12 D12(I ,J) Primary assistance to property

12 D13(I,J) Secondary assistance to property

- 25 -
B. User's Guide for PCP

Section A of Table 1 describes in detail the layout of the data

deck for PCP. It can be assumed that all data must be punched in

the designated card columns, right adjusted.

Note that the location data for the current district and the

OPFAC location data must be changed for each district in order to

exercise that district.

Section B of Table 1 gives the exact input layout for the first

district. Note that the card columns 1-80 are indicated in the table.

Figure 5, the deck setup for a PCP run is presented as a guide

for the NBS system UNIVAC 1108.

Section A: Table 1

Input Data to PCP (Cards)

Location data for current district being exercised:

CC FORMAT NAME Description

1- 6 16 DIST current district being exercised

7-12 16 LAT latitude and longitude of district

13-18 16 LONG origin (minutes)

19-25 F7.3 ZBETA longitude correction factor

26-31 16 XPT X,Y distance from origin for

32-37 16 YPT cases at OPFAC with no location data

38-43 16 XLMT Upper limit of X,Y for current

44-49 16 YLMT district

50-55 16 XLOW Lower limit of X,Y for current

56-61 16 YLOW district

62-67 16 XDELTA X,Y distance from OPFAC for cases

68-73 16 YDELTA with no location data, but a given OPFAC

.

(All distances in nautical miles.)

Table 1

- 26 -
TABLE 1 Continued

Search speeds

cc FORMAT NAME DESCRIPTION

1-80 2014 SOA3CI) Speeds of advance for each type

1=1,. ..,70 of resource (Dl) (knots)

Needs Matrix

CC FORMAT NAME DESCRIPTION

1-80 2014 INEED(I) Explicit need for each type of ass is

1=1, ...,100 tance rendered (Dll, D12, § D13)

District centroids and probabilities (followed by EOF)

CC FORMAT NAME DESCRIPTION

1-2 12 I District

9-10 12 DLAT ( I

)") Degrees 5 minutes latitude of dis11-12 12 MLAT(I)J trict centroid

18-20 13 DLON(I)l Degrees § minutes longitude of dis21-22 12 MLON(I)J trict centroid

29-33 F5.3 PROB(I) Probability of a C-130 case occurring

in district I, accumulative.

Opfac location data (followed by EOF)

CC FORMAT NAME DESCRIPTION

7-11 15 LIST (NS) OPFAC

16-21 16 XSTA(NS)1 X,Y location of OPFAC from the

22-27 16 YSTA(NS) J

district origin

NS=1,..., no. of OPFACs with location data

Random number seed

CC FORMAT NAME DESCRIPTION

1-12 012 B(l)| Octal seed used as input to random

14-25 012 B(2) \ no. generator.

- 27 -
M CO

O O' on

O

O

O Oi CO o o c at c rvj O ui O M

'ji vji o r\j o -»j od o o o at o n o 01 o o o o cn o oo

oat o o o o at o od OOOOO o o o o o o o o co o cr> o o o o O CO CD O t\J O O' O' O 4> O cn o r\j ON o O'O' o cd o O' a O 'o3 O O' O' O '>) O VJt O' ON O 03 oO O' o '-r o a o

O' CD

OO to

O 4> OO O'

OD i

1 o o o O O -P OD o

(CAPl)

COLuMNo

ARt INDiCAri_

l/

ti:.

rORc

EALri
OPFAC

LOCATION

DATA

'dDC

o o

CO o

r- o o

O' 0^ O' a- o

i I i oorvJf\)C'0'0'f\i<fv£)0sj<i-0'rn(\jf\jvj3v00'CDO<f<tO0'c0<tcvjr^0'0''0r^fxjir\c0f\jr^4‘C0v0OOvCO

r^-r^ir. mi i i lh ro ir>cnLf\f^-r\jv£)0'0'Lr\oh~Lp»r-r' i r- <} ^ <f in r\j(\jhrHHvoririrMrvjcoO'h II i i ii-hi l «—• I rn i I l I I I II-hII

l o c

r-H <f vO vO vO

<f -t <f

I I I

Hf\jMvO'£)vON(\IO'H(\IOir\vOH CO CO (M <t

•— <r<J-<|-<f<J-<}-rnM^fncn I o vO rr cn sO rI I I I I I I I I I I I -HI I

cooO'OLrAcorHfr» vor-0'<i’'OOvO'-Hr^^i<r'-<cr''Ooo--' O O' CO 4- I CNJvO H^fNJ^OHfTKf-vOrHTlHrDH^ r-H ICMII II llll-H llll-^ll I

I

hco 4inhMcocOH4in(^ O' h r\j h ir> m mcomr^O'O OOOOO-^r-ioOOOOOOOCNJOO^mvO -h o o o o <—

t

HH(\|(M(\INf\]^<f>f4'HHNOHHHMI\(\| H (\l f\l M (\1 H

l r-) t .-H r-( r-^ r— r-Hr-Hr-Hf-tf\JC\JC\JfOCOmmCOCn f*- O

ocnm0Lnc-H<j-ocr''00'-nfNjm<j-i^-ocr'v00v0f\io

cfiOOOHr\j(M(^(T>ro^444inmvO'0'£i'00'-'H

OOOOOOOOOOOOOOOOOOOCOC r-H cnjcoc^ cor^coc^CMcncocococncnc^cocncocommcofci
'd

CDdc§

vO o

O' o 03 m oI H o o

f\J CNJ - 30-
/ MUCASg

:TAF^A£W,R£AP

h jtoaPORA^CPy eCP

-*» 1

=X)0Ctf

SiJ&lllAllfcHei 6/BMft>XD,6,MK>

L»J J

^^ULAXJ

-31
C. Example PGP Output and Interpretation of Output

Table 2 9 Output Data from PCP, describes each parameter,

its format and PCP name, as it appears on the SARSIM CASE FILE

Figure 2 page 48 is an Example of a Case Description as processed in PCP, with the same format, sequence and description as

appears in Table 2

.

- 32 -
WORD

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

FORMAT

12

13

15

13

16

14

18

12

12

12

12

12

12

11

12

II

11

12

Table 2

Output Data From POP (Tape)

NAME

A1A(1)

STANO

A3

A4

MINC1

B3

B5

B6

B8

B9

BIO

B12A

B13

NSEV

NN

DESCRIPTION

District

Station number

Case Number

Month/Year Notified

Date/time notified

(minimum Cl for M(J case)

No. of people on board distressed unit

Value of distressed unit

Air temperature

Wind force

Sea swell

Visibility

Type of distressed unit

Length of distressed unit

Severity

No. of explicit needs

(NN=N if M=0 ; NN=N+1 if M>0)

N

M

GAMMA

No. of needs except search and tow

No. of resources that towed or

escorted

Degree of non-parallelism for

multi-resource case

- 33 -
TABLE II Continued

19 14 IE Time on scene C tenths of hours)

20 11 SI No. of parallel long search, res.

21 12 S2 Type of short search (code)

22 14 TSM Total search miles (whole time)

23 15 MILES Distance offshore (tenths of mi.)

24 15 x )Location of case from

25 15 Y 1district origin

26

,

29,.,.. 12 NEED (I) Explicit need (1=1.. NN)

27, 30,. . .

.

14 TOS(I) Time on scene (1=1.. NN)

28, 31,.... 12 DELTA (I) Delay of next resourse relative

to previous resource (1=1.. NN)

Note: The above data describes one case. Each case is written on

the output tape in an unformatted binary write. This may take one or

two write statements in PCP depending cn the size of the case. The

1st write dumps 28 words on tape; the 2nd write dumps the remaining

words needed to describe the case.

- 34 -
1

jj OF * Case D&aoniofi} As TRocESSEb TCP

1

I

5 20003 127 52330 32 130001 63 36 10 8 12 201 !

j I 1 0 0 423 0 0 0 9 2 2

i 3 423 0 •

l i 5 20001 78162325 0 0 72 4 3 12 70 0

</

i i 1 0 Q 0 0 0 0 9 2 2

ka 0 0

1 i 6 20001 116250140 1 0 63 18 5 3 70 0 al

3 1 1 0 0 810 0 0 0 9 2 2

46

n 010 0

j 1

1 1 6 20002 116261955 1 0 51 15 4 0 70 0 V

1 0 0 484 0 0 0 9 2 2

til 6

J

S 1

484 0

6 20003 27210554 1 30000 33 37 7 10* 60 0 T

S l 0 1 0 0 1 0 9 9 2 2

.17 0 0

4

’ 1

l 6 20001 97290840 0 0 51

* 20 6 10 70 0 H

1 1 0 0 0 0 0 0 9 “7 66

31 a 0 0 ' ii 6 20002 127281658 0 0 66 1 0 10 70 0

r** J

3 1 1 0 0 0 0 0 0 9 2 2

U8

4 0 0

i i 6 20003 18 51100 0 0 69 20 5 10 70 0 f

j i 1 0 0 524 0 0 0 9 2 2

as

,i 524 0

J .

) J- 6 20001 108130830 0 0 49 10 8 10 70 0

-1 1 1 0 0 28 0 0 0 9 2 2

43

j 28 0

j i 7 20001 86231600 1 0 57 18 3 10 70 0 c

i 1 0 0 0 0 0

e 0 9 2 2

jia 0 0

1 i 7 20002 17 91212 85 130001 99 25 1 99 11 201 f

a» l 1 0 0 65 1 0 69 9 2 2

14 65 0

L i 7 20003 37191601 1 75000 27 16 4 15 11 0 H

? t In

j

1 0 0 26 0 0 0 3590 2 2

' 26 0

1 1 7 20005 47132115

0 0 99 1 1 99 70 0 f

j 1 1 0 0 0 0 0 0 9 2 2

318 C 0

1 1 7 20001 87101210 0

V 0 52 20 5 99 70 0 V

j 1 1 0 0 102 0 0 * 0 9 2 2

lie

i 102 0

? l 7 20003 18151135 0 0 65 12 7 10 70 0 l

i i 1 0 0 20 0 0 0 BO 2 2

Ip Z -35-
IV. DEMGEN and HIST

A. Introduction and Description of the Programs

The final step of the preprocessing is the ordering of the case

histories for input to the operational simulator OPSIM. There are two

alternative programs to do this, DEMGEN and HIST. HIST creates a chronological file of cases, and DEMGEN orders the cases randomly according to

the user's direction. These final programs take a Coast Guard historical

case load tape containing the original assistance reports and converts it

to an exogenous event tape, the CASE TAPE, suitable to be used as input

to OPSIM.

The tape input to DEMGEN contains the SARSIM CASE FILE, single unit

case histories arranged chronologically by OPFAC. The OPFACs are ordered

numerically by their identification numbers. Multi-unit cases next appear

on the tape chronologically arranged. C-130 cases appear last on the

tape, also arranged chronologically.

Each case regardless of type contains a fixed length record of 28

FORTRAN words. This record may be followed by a variable length record

containing 3(N-1) FORTRAN words, where N, number of needs, is defined by

the 15th word of the first block. In sum, all cases contain at minimum,

a fixed length record, which may or may not be followed by a variable

length record.

1. Program DEMGEN. Program DEMGEN can generate the CASE TAPE in a

number of ways, depending upong the specific arrangement of the options

available to the user.

In general, DEMGEN reads a case from the SARSIM CASE FILE and determines

from the cases' historical occurrence time, into which one of 8 possible

"boxes”, located on drum, the case is to be inserted. ("Boxes" are

explained further on in this section) . The one exception to this process

occurs when one wishes to generate a CASE TAPE according

-36-
to more specific and selective criteria than a mere random duplication

or increase of the SARSIM CASE TAPE. In 'this event cases taken from the

PCP are put into "auxiliary’ bins" before being inserted into one of

the 8 possible boxes. Mien all the cases appearing on the SARSIM

Case File have been thus inserted into boxes, DEMGEN takes the given

[input) starting time (day, hour and minute) and selects the box

corresponding to that time. It then randomly selects a case from the box

and assigns the given starting time to the case, as the case occurrence

time.

DEMGEN rearranges the order of the words describing the case, does

some minor calculations , and writes the case onto the CASE TAPE. The

arrival time of the next case is then calculated, the appropriate

box is chosen and another case is randomly picked. (The occurrence

time of this case is taken to be the arrival time mentioned above.)

The same word order rearrangements and minor calculations are made

and this case is then written onto the output CASE TAPE. This process

is repeated until either a given elapsed time period has been exceeded

by the last calculated arrival time, or a given number of cases have

been written onto the tape.

The input card deck consists of the following cards.

(a) An option card which governs program flow

(b) Optionally, the following cards:

(1) PERCENT card which is the percentage by which the historical

case load is changed.

(2) MAX CASE card which tells the program how may cases to

generate onto the output tape.

(3) A NODRUM card if it is desired to increase the historical

- 37 -
caseload selectively; e.g., the number of severe cases by x percent

and the number of cases involving fires by y percent.

(c) The CALENDAR cards which define the time interval over which

the historical cases occurred. The calendar is used, in part, for

the calculation of the historical hourly arrival rates for each of

the eight boxes . Once a given input tape has been used and the

historical arrival rates calculated, all subsequent runs using the

same input tape can read the arrival rates into core.

(d) The SCENARIO card which is based upon the Fiscal Year 1969

(day 1 is considered to be July 1, 1968 and subsequent dates are

assigned a day number relative to day 1) and which gives the start

and end, day, hour and minute of the first, and last case respectively,

that will be put onto the CASE TAPE.

(e) The PEAK PERIOD SCENARIO card which defines the number of

peak periods and the start and end day of each peak period with respect to July 1, 1968.

(f) The HOLIDAY SCENARIO card; which contains the number of

holidays in the scenario and the day number (with respect to July 1,

1968) of each holiday.

(g) The Box I. D. card which gives the box number (1-8) for any

combination of peak or non-peak period, weekday or weekend, day or

night, the box number identified with that combination.

(h) SEED card containing the double precision random number "seed".

(i) NSCEN card which specifies the number of versions to be generated.

A more detailed description of these cards is given in Part C. of this

section, "User's Guide for DEMGEN" . Before going into a more detailed

- 38 -
discussion of the program logic, a description should be made of the

arrangement of the 8 ’ 1)0X65" on drum. When a case is read from the

input tape into core, the occurrence time of that case is used to

determine into which one of the eight boxes the case should be inserted.

The box numbers are given below:

Box 1 = Peak Period Weekdays Days

Box 2 = Peak Period Weekdays Nights

Box 3 = Peak Period Weekends Days

Box 4 - Peak Period Weekends Nights

Box 5 = Non-Peak Weekdays Days

Box 6 = Non-Peak Weekdays Nights

Box 7 = Non -Peak Weekends Days

Box 8 = Non-Peak Weekends Nights

Here weekends are taken to mean both weekends and holidays. Days are

defined to be the hours 0800-2000 inclusive. The boxes are nothing

more than locations on the drum. Each box is a drum unit with a

starting address defined by a user written 1/0 table. For the 3 year

District 1 historical tape containing about 12,000 cases the

following table shows the number of FORTRAN words allocated to each

box, and the number of cases that actually were put into each box

in a specific run.

: No. Logical Unit No. Capacity in Words #Cases

Defined Dy I/O Table

1 10 100,000 2060

2 11 40,000 744

3 12 70,000 2037

- 39 -
4 13 30,000 504

5 14 140,000 3231

6 15 40,000 969

7 16 50,000 1431

8 17 30,000 399

For runs using historical caseloads from other districts, or where the caseload becomes greater than 12,000 the user should be aware of the possibility

that the boxes, as defined presently, may have to be redefined so that each box

is large enough to hold all the cases assigned to it. The current drum allocation (8 boxes and 4 auxiliary boxes) reserves 580,000 of the 688,127 storage

locations available to the user.

The numbered paragraphs below are a more detailed description of the computer

logic. The reader should consult the DEMGEN flowcharts to better comprehend

the following steps.

(1) The input deck is read into core storage

(2) Optionally, the number of days in each box is calculated

(XSWIT (3) 1) or, the historical rates of occurrence (X) are read into

core, (XSWIT (3) =1).

(3) Counters are initialized. The logical drum units (the boxes)

are set to their origin .and the address pointer (IADR (I,J) contains

the address of the ,1 th case in the I th

box) of the first case in

every box is set to 1.

(4) The first 28 words of a case are read into core from the

input tape. If the value of the 15th word is 0 or 1 then the

case has been completely described. If the value of the 15th word

is n, n > 1 , then a block of (n-1) *3 additional words is read into

- 40 -
core. If it is desired to create an output tape which has the same case distribution as the input tape, (ISWIT (1) =1) , subroutine BOX is called

immediately. However, if one desires to create a case tape according

to more selective criteria (ISWIT (1) = 3) a call is made to the

user modified subroutine SELECT, before subroutine BOX is called.

(5) Subroutine BOX determines from the historical occurrence time

of the case, the box number of the box into which the case is to be

inserted plus the hour of the day the case occurred. The arrays:

(a) NC(I,J) = Number of cases in Box I, occurrence hour J,

(b) CBQX(I) = Number of cases in Box I , and

(c) IADR(I,K) = starting address of the Kth case in the Ith box

are then updated

.

(6) The case is then written onto the logical drum unit corresponding

to the box determined in (5), in a single block, whose length is the

total number of words used to describe the case [28 + (n-1) *3, n > 0].

The next case on the input tape is accessed and steps (4) -(6) are

re-executed until a 99 is encountered in the first word of a 28 word

record.

(7) At this point every case on the input tape has been processed

and the 8 boxes filled. The exception to this occurs when one is

to increase the historical case load by selective criteria (ISWIT (1)

= 3) . When this occurs , cases meeting the selective

criteria have been stored in auxiliary bins and they must be randomly

selected from these bins and inserted into the boxes, before the boxes

can be considered full. Subroutine ADD performs this function.

- 41 -
(8)

The historical mean hourly arrival rate is calculated for

each of the 8 boxes according to:

A

i j s NChj/DAYS^ where NCh . is the number of cases in the Ith

box, Jth hour,

DAYS^ is the number of days occurring in the

time period represented by the Ith box over the

time period covered by the input tape. Note

that the 's can optionally be read into core,

in which case this calculation is by-passed.

(9)

If the input caseload is to be changed by x percent

then the A^ 's are multiplied by the factor (1 + x/100).

(10)

At this point DEMGEN is ready to select cases from boxes

,

give them new occurrence times, and write them onto the output tape.

First, a 4 word code record is written on the output tape. The first

case written will have an occurrence time equal to the scenario start

day and hour which are input data, chosen with respect to the Fiscal

1969 calendar.

(11) Using the Fiscal 69 calendar and the case occurrence time,

(day and hour) the box number of the case is determined.

(12) The box number and case occurrence hour determine X. .. ij

(13) The INUMth case in the box is selected to be written onto

the output tape according to:

XNUM - CBOX (I BOX) *RN + 1

where I BOX = box number

RN = a random number (0 < RN < 1) , and

CBOX (IBOX) = number of cases in box IBOX.

- 42 -
(14) The address of the first word of the INUMth case in box,

I BOX is known, as is the address of the INUM + 1st case. Subtracting

the smaller address from the larger will give the number of words used

to describe the INUMth case. The drum is spaced foiward to the INUMth

case and it is read into core. The ordering of the words is changed

to conform to the output tape format and the case is written onto the

output tape, with a Mimimm of 2 card images used to describe me

case.

(15) At this point the occurrence time of the next case is

calculated. The procedure is based on the assumption that case interarrival times are exponentially distributed over periods of time less

than one hour. A well known procedure ^ is then used to calculate

DELTA, the interarrival time.

Using the cumulative exponential distribution,

Prob {DELTA < t} = 1 - exp[~X^.t]

,

a sample can be found by setting

DELTA = -Ln [RN]/X^ . , where

RN = a uniformly distributed random number on (0,1 _]

If the DELTA generated in this manner is not larger than one hour,

one proceeds to paragraph (16)

.

However, if DELTA is larger than certain values it is modified by one

of two procedures designed to eliminate excessively large interarrival

values. The technique used is an option of the user (specified by ISWIT(8));

both are outlined in the following chart.

^For example, F. Hillier and G. Lieberman, Introduction to Operations

Research

,

Holden-Day, Inc., 1967. See p. 447.

- 43 -
GENERATE RN

A

- -Ln [RN]/X

±

t = 0

I

t = t+1 hour

j = j +1

GENERATE RN

A = -Ln[RN]/A^

A = A + t

Proceed to paragraph (16)

- 44 -
(16) DELTA is then added to the current time (in minutes) which

is then converted to the proper format (0000-2400)

.

(17) If the time exceeds 2400 hours the day is updated. The new

day and time is checked against the scenario end day and hour. Generation of cases ceases either when ;

(a) scenario end time is exceeded (ISWTT(IO) = 0) or

(b) the number of cases on the CASE TAPE exceeds an input

variable MAXCA (ISWIT(IO) = 1).

Otherwise the steps described in paragraphs (11) - (16) are repeated.

(18) After the last case has been written onto the CASE TAPE

DEMGEN is finished. All that remains is to print out composite statistics

describing the scenario generated. The output is presented first

using Coast Guard station numbers as headings and then repeated using

OPSIM station numbers. Then, if ISWIT(9) = 1, the output tape is rewound and the first 50 cases which were generated are printed out.

If the user desires to generate more than one version of this

scenario, the program returns to paragraph (7) of this report and repeats the process until NSCEN versions have been written onto the

output tape, with each version separated by an end of file nark.

- 45 -
2 . Program HIST

The computer program HIST is a UNIVAC FORTRAN V program which

creates a historical demand, tape* to be used as input to OPSIM. This

demand tape contains a subset of the cases existing on the PCP output

tape, the SARSIM CASE FILE, chronologically ordered by their historical

arrival times. The description of HIST given below is divided into

3 sections, input, the program, and output.

A . Input

The only input to HIST is the output tape of PCP (i.e., SARSIM

CASE FILE). This tape contains in order, single unit, multi-unit,

and C-130 cases. Single unit cases are ordered by OPFAC identification

number, and within each OPFAC by historical date and time of arrival.

Multi -Unit and C-130 cases are ordered by the historical arrival

time.

B. The Program

The purpose of HIST is to produce a demand tape containing the

above cases, or a subset of them, in chronological order. This is

done in the following steps. The reader is directed to the flowcharts of HIST, Report 10435.

(1) The first single unit case belonging to the first OPFAC on

the SARSIM CASE FILE is read into core. The case is then checked

against any scenario limits . Instead of creating a CASE TAPE containing all the cases from the SARSIM File ordered chronologically,

it may be desirable to order a specific subset of the SARSIM caseload;

- 46 -
e.g., only those cases occurring during the first three months of

1969, or only those cases occurring during the summer of 1968. In

this case a culling routine (usually consisting of a few lines of

FORTRAN code) can be inserted in the program immediately after the

case is read from the PCP tape. If the case falls within these

limits, it is accepted and is output onto drum and the starting address

of the case is noted. This starting address will become the pointer

giving the address of the first case in the bin, into which all single

unit acceptable cases belonging to the first OPFAC are inserted. An

auxiliary pointer is also initialized at this time.

(2) As succeeding cases belonging to this OPFAC are accepted,

they are written sequentially onto drum and the auxiliary pointer

is incremented.

(3) As soon as an acceptable case is encountered bearing a new

OPFAC I.D. code a new bin is created which has a starting address

equal to the current value of the auxiliary pointer.

(4) Succeeding acceptable cases belonging to the new OPFAC are

then written onto drum sequentially behind the first case, the auxiliary

pointer being updated each time a case is inserted into the bin.

(5) This process continues until all single unit cases have been

read from the SARSIM CASE FILE, culled, and inserted into their

proper OPFAC bins

.

(6) Hie next type of case, the multi-unit case is read from the

SARSIM CASE FILE, and Is •inserted, after culling, into the multi-unit

bin; the current value of the auxiliary pointer at the time the

first acceptable multi -unit case is encountered becomes the starting

address pointer of the multi -unit bin.

•-47-
(7) The procedure in paragraph (6) is repeated for the last type

of case on the SARSIM CASE FILE, the C-130 case,

(8) When the process outlined in paragraphs (1) - (7) has been

completed, n + 2 bins mil have been created, where n is the number

of different OPFAC’s encountered in inserting the single unit cases

into bins. The starting address of the first case in each bin

the cases will be ordered chronologically.

(9) The first case in each of the n+2 bins is then examined,

the case with the earliest arrival time is chosen, and, after modification of the case descriptors, is written onto the output Case Tape.

The address pointer of the bin from which the case has been picked,

is incremented and now points to the first word of the next case in

that bin.

(10) The process described in (9) is repeated for the new set

of n+2 cases, each occupying the top position in its bin. If at

any time during this process a bin becomes empty, a bin switch is set

to eliminate the empty bin from consideration.

(11) The program stops when all bins are empty.

C. Output

The output of HIST is the historical demand tape, the CASE

TAPE, a Fortran formatted tape, containing variable length records.

The first record is a 4 word initializing record required by OPSIM,

containing a 3 in the first word and zeros in the remaining three.

The last record on the demand tape also has 4 words, containing a 2 in

the first word, the day number plus 2 in the second word, where day number

- 48 -
is the day number (relative to the day number of the first case) of

the last case on the demand tape. The third and 4th words are zero.

The format of the variable length record describing each case is

shown in Table 4.

- 49 -
Table 3

DEMGEN and HIST Output Format of a Variable Length Record Describing a Case

The record is composed of a variable number of card images , a

minimum of two card images is needed to characterize a case.

CARD 1 FORMAT (13, 14, 13, 12, 13, 1115)

Column No. Case Descriptor

1-3 IDNO=l (the same for every case on the tape)

4-7 Occurrence day of case

8-10 Occurrence hour of case

11-12 Occurrence minute of case

13-15 District No.

16-20 Station No.

21-25 Case No.

26-30 Number of People on Board

31-35 Air temperature

36-40 Wind

41-45 Sea Height

46-50 Visibility

51-55 Type of Vessel

56-60 Length

61-65 Severity of case 66-70 N (Number of explicit needs)

CARD 2 FORMAT (1015, 110)

Column No. Case Descriptor

1-5 NNN (Number of Needs other than search

or tow)

6-10 MVM (Number of resources that towed or escorted)

11-15 GAMMA

16-20 SIS

21-25 S2S

26-30 TSM (Total Search Miles)

-SO-
Table 3 Continued

31-35

36-40

41-45

46-50

51-60

Miles (Distance offshore)

X

Y

Box No. (Box from which case was selected.)

Value of Vessel

CARD 3 and Succeeding Cards

If N (the number of explicit needs) is greater than zero and MMM = 0

then N values of the group

NEED(I) = the I.D. number of the Ith need

TOS(I) = Time on scene for the Ith need

DELTA(I) = Delay of Ith need

are calculated. These are written onto the Output Tape in card image

format, 6 groups to a card with FORMAT (6 (12, F6.4, F4.2))

Card 3 NEED(l) , T0S(1) , DELTA(l) NEED (6) , T0S(6), DELTA (6)

Card 4 NEED(7) ,TOS(7) , DELTA(7) NEED(12) , T0S(12) , DELTA(12)

Card 5

However, if N > 1 and MMM (the Number of resources that towed or searched)

> 0, then the last group (NEED(N) , TOS(N) , DELTA (N) ) must be written

on tape as a separate card image with FORMAT (12, F6.4, F4.2).

- 51 -
B„ Subroutines Within IBMGEN

DEMIEN uses four FORTRAN subroutines , an assembly language

random number generator and a user supplied I/O table which defines

the drum units and capacities of the 8 'boxes'* plus auxiliary units

corresponding to auxiliary bins if needed. Descriptions of each

of these routines are found in the following paragraphs.

1. FORTRAN- Subroutines

(a) Subroutine BOX

Subroutine BOX is called when a case is accessed from the input

tape. Given the historical occurrence time of the case, BOX will

determine the number of the box into which the case is to be inserted

along with the hourly interval (1-24) that the case occurred.

(b) Subroutine SELECT

SELECT is called whenever XSWlT(l) - 3 , It must reflect the

specific criteria by which a case is selected and put into an

auxiliary bin. Since the selective criteria may change from run to

run, the user must supply the 1 or 2 lines of FORTRAN code which does

the culling. Two examples of this are given below p and in Figure 5.

Example A is an example of the coding of SELECT for a computer

run approximating the SARSIM caseload, but increasing the cases where

the number of people on board are greater than 3, by 50%. A single

auxiliary bin is defined by the I/O table.

Example B is an example of the coding of SELECT for a computer

run where the number of cases whose severity is greater than 4 is to be

increased by 40%, and the number of tow cases increased by 70%, otherwise approximating the SARSIM case load. Two auxiliary bins are defined

by the I/O table.

- 52 -
12

*

3 * 4 * &

* b * 7

* a*

v*

1 o*

l l *

i 2

*

1 3*

1 4 *

1 5*

1 6 *

1 7*

l a

*

1 7 * 2n*

2 l *

SUBROUTINE select

COMMoN/SEaU/ n up per

DIMENSION IADR(B»M500) , N A D r ( 4 » 1 0 0 U ) , C P E R ( 2 4 ) , C B 0 X ( 8 > ,NCASES(24)

1 „ I C A S E < 10 o

)

COMMON NODKuM,IADR,NADR t NCASES,CPEF?,CBOX»ICASE

r

C THESE ARE USE* FURNISHED STATEMENTS

C

I A U N I T s i a

I F ( I CASE ( 6 ) # L T o 4 1 GO TO 1 J * 1 NCASES(J)=NCA5E5(J)M

KsNCASESI J ) + 1 NADR(J,K)«NADR(J»K-1)4-N UPPER

CALL N j R A N ( !fl, 1 .NuPPER.ICASEJ 1 ) , L

)

20 I F { L I > 25 » 20

1 RETURN

2 5 .V R I T E ( 6 , b 0 7 ) 507 FORMAT ( 2 X s " ERROR IN NTRAN TRANSMISSION IN SELECT")

STOP

END

1 * 2 * 3*

4 * 5*

b * 7*

0*

9*

1 0*

1 1 *

1 2 *

1 3*

1 4 * 15*

1 6 *

I 7*

1 0

•

1 9*

2 U

* 21 * 22 *

SUBROUTINE select

COM MON /SEAL/ N UPPER

DIMENSION lADRf9»450G) l NADR(4,1000)»CPER(24)»CB0X(e),NCASES(24)

1 »

l CASE ( 1 00 ) COMMON NOqRuMjIADRjNAOR.NCaSE-S.CPER.CBOX.ICASE

cC THESE are USE* FURNISHED STATEMENTS

c

I D R U M s o IF(!CA5E(|H)«GT»35 I D R U M * 1 IF(ICASE(!7),GT.05 I D R U M « 2

I F ( I DRUM , E

1*) • 0 ) GO TO l

I AUN I T s | 7 + I DRUM

N C A S E S ( IDRUM)eNCASES( I D R U M ) + l K N CASES! I D R u M ) l NADR( IDRUM»K)*NADR( IDRUMjK- 1 )+NUPPER

CALL NTRAN(lAUNlT,l,NUPPER,lCASE(l) , L)

20 IF (L+ 1 ) 2 5 » 2 0

1 RETURN

25 WRITE(6 ( 507)

507 FORMAT !2X»*ERR0R IN NTRAN TRANSMISSION IN SELECT")

STOP

FIGURE 6

- 53-
[c) Subroutine ADD

ADD is called whenever ISWXT(l) = 3. When the input tape

containing the historical tape has been read, non-culled cases are

located in the 8 bins. The culled cases are located in the auxiliary

bins, all cases of a specific type, in the same bin. Subroutine ADD

tahes the cases out of the bins in a random fashion and inserts them into

their proper box, until the desired percentage increase for that type

of case has been reached.

(d) Subroutine ADT1ME

AUTIME is called whenever ISWIT(8) = 1, and whenever the interarrival time of the next case exceeds 60 minutes. It calculates the

interarrival time, DELTA, according to the formulae given in Section IV.A.l.

2. The I/O Subroutine.

Below is a listing of the current I/O user supplied subroutine

which defines the sizes of the 8 boxes plus four auxiliary bins. The

auxiliary bins have a capacity of 25,000 FORTRAN words each. If more

auxiliary bins are to be used, the I/O table must be modified in accordance with the instructions In Table 5.

3. The Random Number Generator

This subroutine is an assembly language routine written by the

Computer Services Division at N.B.S. The user must supply the seed.

Any odd octal number can be used. The standard seed is the

number described In Section IV. C, User’s Guide for DEMGEN.

- 54 -
IOW X<J Ai YOUR GWM FORTRAN I/C Cl)

FORTRAN users nay assemble their own I/O Table replacing

the standard on the EXEC- I I system. The I/O Table correlates logical reac* and write units referenced an a

FORTRAN I/O statement (such as “READ INPUT TAPE 1C , ARRAY"

with particular hardware devices in the computer room

(card reader , magnetic tape umsarvos , etc. j

*

/

Example I/O Table

7.

8

'

n:

ASM 10, 10

+3 • standard PUNCH

+2 • standard PRINT

+ 1 « standard CARD READER

-4 * unit 0 = CARD REREAD

-4-2 * UNIT I = PRINTER

+ 1 e UNIT 2 = CARD READER

+0 • UNIT 3 (NOT USED)

-J-

? A * • UNIT 4 = tape a

END

(Words after a p 0 X IL G Cl "t X 0 X G

ci s c s ggc, q r*i o x g? o oy o 1

1

Assembler .•

)

The signed values in this Table each stand Tor a particular

hardware device; the 1 ines in this Table each rebate to a logical unit number or a standard unit. Therefore, a value entered on a particular line connects a hardware

device to a unit number.

In the more detailed explanation that follows, rexer zo

the example above.

^This section is reproduced from the NBS Computer Services Division,

Systems Notice #2, February 26, 1968.

VII-1

- 55 -
Explanation

1) The values in this table each stand for a particula

hardware device; i.e.,

t 1 always points to the card reader

+2 always po ints to the printer

.

+3 always points to the card punch.

-4 always points to the card reread

unit (FORTRAN V)

.

+'A f always points to tape A,

A complete table of these values is given later

in this section.

2) The programmer who made this I/O Table used logical

units 0, 1, 2, and 4 in his program; i.e., he wrote

I/O statements such as the one below which references

unit 2:

READ ( 2 , 99 ) (KARD(I), I = 1,14)

99 FORMAT (13A6,A2)

In the I/O Table, he must make entries as follows:

On line NTAS$ enter the hardware device value for

unit 0.

On the line NTAB$ +1 (i.e. one line after NTA3$)

enter the hardware device value for unit 1.

On line NTAB$ +2 (i.e 0 two lines after NTAB$) enter

the hardware device value for unit 2,

etc

.

In the READ statement shown above, the programmer intended

that unit 2 refer to the card reader. Therefore on line

NTAB$ +2 , he entered the value +1 , which points to the card

reader (as explained in paragraph 1). The other values were

entered similarly: Note that since unit 3 was never referenced

in the program, he entered +0 on line NTAB$ +3» Any value

might have been used here.

VII -2

- 56 -
3) This progr amine r also referenced the standard PUNCH

,

PRINT, and READ units; i.e. he wrote I/O statements such

as the one below which references the standard card punch

PUNCH I 0 , ALPHA , EETA , GANNA

10 FORMAT (3F10.5)

For the standard units, he must- make entries in the

preced ing NTAE$ 0 The values entered on these lines

fixed as follows:

The line NTAB$ -3 is reserved for the standard

punch unit; therefore enter the value +3

on this line.

The line NTAB$ -2 is reserved for the standard

print unit; therefore enter the value -2 on

this line.

The line NTAB$ -1 is reserved for the standard

card reader; therefore enter the value rl

on this line.

-i_ 1H6 S

o.ir G

VI 1-3

- 57 -
Format of the I/O Table

As stated before, the I/O Table is in 1108 Assembler forma

Rather than define this format, it is simpler to give a

few rules relating to the I/O Table.

1)

1 NTAB$* must start in column 1.

2) The asterisk (*) following NTAS$ is required;

it makes this label accessible to EXEC- II.

3)

„ Values may start in or beyond column 2.

4} At least one space must separate the label

NTAB$* from the value following it.

5) A period starts the comments field; at least one- space must precede the period.

6) The last line must contain the word ERD starting

in or beyond column 2.

VI 1-4

- 58 -
Hardware device values

The values which

given below.

point to part icular hardware devices are

+1 alway s points to the card reader

+2 11 • orX inter

+3 ft card punch

4-4 n console typewriter

-4 11 card re— ream unit ^ r 0 aTiC-un V)

-0 HI card re-read unit (FORTRAN IV)

+ ' A’ n logical tape unit A

+ 'B'

«

$r logical tape unit £

©

+ T Z' »!

•

logical tape unit Z

-4- * _ * IS logical tape unit -

+ ' (

* 11 logical tape unit ( +DRUM1 points to a

- Drum areas

in the I/O

under Drum

. drum area, called DRUM1*

require additional entries

Table. See the explanation

assignment s

.

Tape and drum assignments require some further explanation.

See the following page.

VI 1-5

- 59 -
Tape a s s i gnine n t

The following explains how the I/O Table connects the

unit number in a FORTRAN I/O statement to the final tape = assignment made by the operator at the console.

The example I/O Table on page VIII-1 shows that the programmer wishes unit 4 to reference a tape drive. He picks

logical label ’A’ and enters it in the I/O Table on line

NTAB$ + 4. He also punches an ASG control card for his

job deck, containing logical label 'A* and the tape reel

number , such as

7 ASG A = 1103

8

When his job deck is read in, the ASG control card causes

the console typeout

MOUNT 1103

and the operator mounts tape reel 1103 on an empty tape

drive. When the job comes up for execution, the operator

types in the physical number of the tape drive. If it

is tape drive 3, he types in:

/3 1103

and program execution continues. i

- 60 - VII-6
Drum assignment

The FH432 drums have approximately 646,000 cells

available to the user for scratch area during execution

of his program. Address bounds of the scratch area are

from:

1300000 to 3777777 octal

360448 to 1048575 decimal

The user may treat this area just as he would treat

scratch tapes.

The I/O Table may be constructed to take advantage of

drum scratch area. Use the entries +DRUM1 +DRUM2

etc., in the 1/0 Table to point to different drum areas'.

For each DRUM entry, a set of seven locations must be

set aside in the NTAB$ table. The general form of this

is

DRUM (starting address)

(ending address)

(starting address)

+0

+0

+0

+0

. ^ See example on the following page.

VII-7

- 61 -
rco

Example

Construct an input/output table which

(a) assigns 0 as the card re-read unit

(b) units 1, 2, 3 and 5 as card reader

(c) unit 4 as card punch

(a) unit 6 as printer

(e) 7 and 8 as two different drum scratch areas

each 300000 cells

(f) unit 9 as tape A and unit 10 as tape 3.

ASM

*

10 , 10

+3

4-2 + 1

-4 .

DRUM!

DO

DRUM2

DO

END

+ 1

4-1 4-3

4-1

4-2 +DRUM1

4- DRUMS

+ ’A'

4'B'

4-400001

4-700000

4-400001

4 , 4-0

4-700001

+1000000

+700001

4 , +0

(Generates 4 lanes o-. zeri^

(Generates *-£ ii nsb or z^ro

(See note on next page.)

VI

- 62 -
Note : The DO directive used above generates identical

lines of coding. Its format is:

DO count , line of coding

represents a blank space.

'DO* appears in the entry field. One or more

spaces follow.

’count' is the number of times to repeat the

line of coding.

’count' is followed by one space and a comma.

The next character after the comma corresponds

to column 1 of the line of coding desired.

Thus , DO 4 , + 0 is equivalent to

+ 0

+ O

+ 0

+ 0

VI 1.-9

- 63 -
standard input/output table

Logical Unit

0

1

2

3

4

5

6

7 through 32

33

34

35 and 36

37 ana 38

39 and 40

41 and 42

43 and 44

45 cind 4o

Assignment

Reread

Card Reader

Printer

Cara Puncn

Con sore

~ -y. ^2 r> ~ ^ - v^d i. d Ac Lv^ci

Printer

T ao e s A an r ouon L

Tape { Tape -

Entire Drum 1300000 to

3777777 (octal)

tov/er ha.: x-^OOooo

2537777

Upper Half 2540000 to

3777777

Lower Third 1300000 to

2177777

Middle Third 2200000 to

3077777

Upper Third 3100000 to

3777777

VII- 10

- 64 -
C. User’s Guide for DEMGEN

This section discusses the program options available to the user,

the setting up of the input deck the format of the output tape and

some examples of typical runs showing the arrangement of the input

decV for each run.

1. Options Available to the User

The values of the array ISWITCI) , which are punched on the OPTION

CARD and read into memory, govern the logic in a given run of the

program. These are:

WORD Switch Setting OPTION

ISWIT(l) 1 This run will create an output

case load similar in characteristics to the input

caseload.

ISWIT(l)

ISWIT(2)

ISWIT(2)

ISWIT(3)

3 This run will create cases similar to the input tape

with x types of cases increased by CPER(I) percent

( 1 = 1 , x)

0 The caseload of the scenario

produced is equal to that

of the input tape.

1 The caseload is increased

by PER percent.

1 Special validation option: historical Lambdas are read into core. An output tape will not be created. The Lambdas of the generated

- 65 -
WORD Switch Setting OPTION

cases will be printed out along

with the historical Lambdas.

ISWIT(3) 0 Normal operation of Program.

Cases are generated using historical

Lambdas and an output tape is

created.

ISWIT(8) 0 The interarrival time of the next

case is taken to be < 3/X^ . (60)

.

ISWIT(8) 1 The interarrival time is calculated

according to the formulae in Section

IV. A.l

.

ISWIT(9) 0 The cases on the Output Tape will

not be printed.

ISWIT(9) 1 The first 50 cases of the Output Tape will

be printed.

ISWIT(IO) 0 Cases will cease being generated

when the scenario end day and hour

are exceeded.

ISWIT(IO) 1 Cases will cease being generated

when a given number of cases

,

MAXCA, has been exceeded.

Note that these switch settings are mutually independent and no conflict

in settings can exist.

2 . The Input Deck

The cards making up the input deck are described below. They

are arranged in the order listed.

- 66 -
CARD A

OPTION CARD

Column Variable Name Fomat Value

1 ISWIT(l) 11 1 or 3

2 ISWIT(2) 11 1 or 0

3 ISWIT(3) 11 1 or 0

4 ISWITC4) 11 Not Used (Blank)

5 ISWITC5) 11 Not Used (Blank)

6 ISWITC6) 11 Not Used (Blank)

7 ISWITC7) 11 Not Used (Blank)

8 ISWTT (8) 11 0 or 1 9 ISWIT (9) 11 0 or 1

10 ISWIT(IO) 11 0 or 1

- 67 -
CARD B

PERCENTAGE INCREASE CARD (OPTIONAL)

This card is used if ISWIT(2) = 1. Otherwise it is omitted.

Column Variable Name Format Value

1-5 PER F5.0 The value of the

percent increase of

the input caseload

desired.

CARD C

MAX CASES CARD (OPTIONAL)

This card is used if ISWIT(IO) = 1 and is otherwise omitted.

Column Variable Name Format Value

1-5 MAXCA 15 The number of cases desired on the output

tape

.

CARD D

AUXILIARY BIN CARD(S) (OPTIONAL)

This card is used if ISWIT(l) = 3 and otherwise omitted. If used,

the run will create cases according to a more selective and specific

criteria than merely increasing the input caseload by PER percent!/

— In this case, subroutine SELECT is used and must be changed

to reflect the specific selective criteria by which the user desires

to accept a case and put it in an auxiliary bin. Note that the

auxiliary bins are drum logical units defined in the I/O Table

and their limits must be large enough to hold all the cases assigned to

them.

- 68 -
Column Variable Name Format Value

1-2 NODRUM 12 The number of auxiliary

bins into which the cases meeting the selective

criteria are to be inserted.

3-7 GPER(l) F5.2 CPER(I) is the percent

8-12 CPER(2) F5.2 Increase desired for all

13-14 CPER(3) F5.2 Those cases in the Ith

• • • • • 0 • • If auxiliary bin.

Up to twelve bin percentages are defined on the first card. If

additional bins are used, the 13th bin percentage starts in column 1 of

the 2nd card.

CARD E

PEAK PERIOD CARD(S)

This card contains the number of peak periods in the time interval

covered by the SARSIM CASE FILE (input tape) and the start and end week

in reference to the input calendar, (card F)

Column Variable Name Format Value

1-2 NPP 12 Number of peak periods in

the time interval covered

by the input tape.

3-4 IYEARS 12 The number of years

covered by the SARSIM CASE

FILE relative to 1966; 1966

is assigned the value 1.

- 69 -
Column Variable Name Format Value

5-7 ISWPP(l) 13 ISWPP(I) is the start

8-10 IEWPP(l) 13 week of the Ith peak

11-13 ISWPP(2) 13 period and IEWPP(I) is the

14-16 IEWPP(2) 13 end week of the Ith peak

period.

The first card contains up to 10 pairs of start and end peak

periods. If additional peak periods are to be defined a second card

is used containing 10 peak periods ; the l|th peak period start week

beginning in column 1.

CARD F

HISTORICAL CALENDAR CARDS

These cards contain the array CAL(I,J,K) which for a given month I,

day J and year K, will equal the week number. For example, CAL (7,1,1) =

1. (July 1st 1966 is the start week). For I a weekday CAL(I,J,K) is

even. For I a weekend or holiday CAL(I,J,K) is odd.

Column Variable Name Format Value

1-6 CAL (1,1,1) 16 There are 12 entries per

7-12 CAL(2 ,1 ,1) 16 card. The first card contains

13-18 CAL(3 ,1 ,1) 16 the values of CAL(I,J,K) for

19-24 CAL (4 ,1 ,1) 16 day 1, year 1, and all months.

The 2nd card is for day 2 and

year 1 . The 31st card for

- 70 -
67-72 CAL(12,1,1) 16 day 31 year 1. A calendar for a 3 year historical input tape will contain

93 cards.

CARD G

SCENARIO LIMITS CARD

This card contains the start hour and day, end hour and day of the

scenario, (relative to July 1, = day 1) If a specific number of

cases are to be generated (ISWIT(IO) = 1), the end day and hour of

the scenario cannot be determined in advance and are left blank.

Column Variable Name Format Value

1-4 ISCSH 14 start hour of the scenario

5-8 ISCSD 14 start day (relative to July

l)of the scenario

9-12 ISCEH 14 End hour of scenario

13-1 ISCED 14 End day (relative to July

1 of the scenario

CARD H

SCENARIO PEAK PERIOD CARD

This card contains the number of peak periods and the start and

end day of each peak period of the scenario. The start and end days

of the peak periods are calculated relative to July 1.

Column No. Variable Name Format Value

1-2 NSPP 12 Number of scenario peak

periods

3-5 NSPP$(1) 13 NSPPS(I) is the start

- 71 -
Column Variable Name Format Value

6-8 NSPPE(l) 13 day of the Ith peak period,

NSPPE(I) is the end day of

27-29 NSPPS(IO) 13 the Ith peak period, all

30-32 NSPPE(IO) 13 taken relative to July 1.

CARD I

HOLIDAY CARD

This card contains the number of holidays in the time interval

covered by the scenario, or if the scenario end hour and day are

not known, the number of holidays in any time interval large enough

to contain the occurrence hour and day of the last case written onto

the Output Tape. It also contains the day number, relative to July

1 of each of the holidays •

Column Variable Name Format Value

1-2 NOHOLS 12 Number of holidays in scenario.

3-5 IHGL(l) 13 IHOL(I) is the

6-8 IH0L(2) 13 day number of the

9-11 IHQL(3) 13 Ith holiday

relative to July 1 .

60-62 IHOL(20) 13

The day numbers of 20 holidays can be put onto the first card.

- 72 -
Succeeding cards if needed contain 20 holidays per card each beginning in column 1 and taking 3 columns with an 13 format.

CARD J

BOX I.D. TABLE CARD

This card remains the same for every run. It contains the

values of the array, ILIST(I,J,K)

;

1=1, 2 ; J=l,2; K = 1, 2; where:

1=1 Peak Period

1=2 Non-Peak

J = 1 Weekday

J = 2 Weekend or Holiday

K = 1 Day

K = 2 Night

ILIST(I,J,K) for a particular configuration of I, J, K gives

the box number as follows

:

Column Variable Name Format Value Box No

1 I LI ST (1,1,1) 11 1

2 ILIST(2 ,1,1) 11 5

3 ILIST(1,2,1) 11 3

4 ILIST(2,2,1) 11 7

5 I LI ST Cl, 1,2) 11 2

6 ILIST(2,1,2) 11 6

7 ILIST(1,2,2) 11 4

8 ILIST(2,2,2) 11 8

- 73 -
CARD K

RANDOM NUMBER SEED

A double precision random number seed is read into the array

B(l) , B (2)

.

The seed is read according to an octal format.

Column Variable Name Format Value

1-12 BCD 012 154447730601

14-25 B(2) 012 255751305264

CARD L

LAMBDA CARDS (OPTIONAL)

If ISWIT(3) = 1 the historical X — T s are not calculated, but

read into core via these cards. The array LAMBDA (I,J) contains the

value of X^. for box number I (1=1,8) and hour J (J=l,24)

Column Variable Name Format

I- 5

6-10

II- 15

16-20

21-25

56-60

LAMBDA(1,1)

LAMBDA(2 ,1)

LAMBDA(3,1)

F5.3

F5.3

F5.3

giving a total of 16 cards.

- 74 -
3. Output Description

(a) Output of the program is in two forms:

The printed output displays

1. the historical lambdas;

2. the number of observations Cdays) in each of the 8 boxes

over the time period covered by the scenario; or if ISWIT(IO) = 1,

the time period ending with the occurrence time of the last generated

case.

3.

the of the generated cases.

(b) The Output Tape which contains the generated cases. This

tape is a formatted tape containing variable length records. It starts

and ends with a 4 word record. The format and contents of the record

describing the case is shown in Table 4,

- 75 -
4. EXAMPLES

Below are two examples of possible runs. A printout of the input

card deck for each of the examples follows.

(a) A run is desired where the historical lambdas are to be

read from data cards , an output tape is not to be created ^scenario

start time and day are July 1, 1968, hour 1 and cases are to be generated

for 135 days ending at 2400 hours of the 135th day.

The purpose of this run is to compare the historical against the

generated lambdas

.

(b) An output tape is to be generated which will contain 2500

cases, starting date August 10, 1968, hour 1. The input caseload

tape is to be increased by 20%

.

- 76 -
FIGURE 7

s

i 4 00TM dec.*

x$r ptweev card

- KflUD SOURCE t>RK (ftS,SEM&Ly

)

AqTiM&, ^OuRC£ PSQK (PofTRAH)

/)0D SOuPCT D£ot (foGTVdN)

SELECT SOORCf DECK. (pOftrkA*i }

6ov 3ourc-c deck (Toptr**4^

DEM&tN SODBCE DECK.(f«l?TR,/»|^

1/0 sueecuDue Source peck (ftssCMBLy)

IMF N£i.vw C*ffD

XQT C(JR. CARP

flSG- CAeo FOR OUTPUT CASE TAPE

/JSG- CABO For INPUT SAftSiM TAPE

RUN CAPD

Deck SEf UP OF DENGrfrvf Fo* j?uin/

AT N 6.S. ow UniVAc 1108

- 77 -
£XAMf(-£ /) 1 1 11 0 3 0 R 14 781051 7 Q 9 1 O'? c-0 5 3 62 70 7Q RR c 4 6 7 7 0 70 R 8

54 6 2 70 80 88

54 63 71 80

R

R 54 63 71 RO 88

54 64 7 7 80 « 0 6 5 64 77 80 RO 5 K 64 7 7 81 O0 c 6 64 77 81 OO 5 6 64 7 7 8 2 on 5 6 6 C 7 R 8 2 no 56 65 7 0 8 2 °0

56 6 6 7 4 82 °1 6 7 66 R4 8 2 91 K 7 66 7 4 8 3 07 6 S 66 74 8 7 02

58 6 6 74 84 07

58 67 75 84 07

58 67 75 84 92

58 68 76 84 93

59 68 76 84 93 6 9 69 76 85 04

60 68 76 85 04

60 68 76 86 04

60 69 77 86 °4

60 69 77 86 04

60 70 78 86 95 6 1 70 7 8 86 05

61 78 87 96

62 78 87 °7

62 78 96

159 166 174 184 192

158 166 175 184 192 1 58 167 175 184 192 1 58 167 1 7 6 184 1 Q 3 1 58 168 176 1 84 1 0 7 1 59 168 176 185 I04

159 168 176 185 1 94 1 60 168 176 186 194

160 168 177 186 194 1 60 169 177 186 1 94 1 60 169 178 186 1 95 1 60 170 178 186 195

161 170 178 1 So 196 ] 61 170 1 7 R 187 196

162 1 70 178 188 196

162 170 1 79 1 88 196 1 62 171 1 79 1 88 1 06 ] 62 171 180 188 1 07 1 62 172 180 188 107 1 63 172 180 189 1 OR

163 172 180 1 8 9 198 1 n 1 8 7 7 °6 Zl4 1 1 0 1 R 77 a 6 4 4 1 1 0 1 0 7 a 4 5 1 1 0 19 ?fl 36 45 7 10 1 9 78 37 46 7 1 1 70 78 37 46 7 1 1 70 78 3 8 4 6 7 1 2 70 7 O 38 46 R 1 7 7 0 7 0 R R 46 7 1 2 7 l R 0 R R 4 7 4 1 2 7 1 R 0 R 9 4 7 4 1 2 27 R n R 0 4 8 4 1 3 7 7 R n RQ 4 8 4 1 n 7 7 RO A.n 4 R 4 14 2 2 3 1 40 48 5 14 7 7 R 1 40 4 8 5 1 4 2 3 3? 40 49 6 1 4 7 R 3 2 40 49 6 14 24 32 41 50 6 1 5 2 4 32 41 5 0 6 15 7 4 2 7 42 50 6 1 6 24 R

"3 42 c; r\ 7 1 6 2 4 3 R 42 c 0 7 16 25 34 42 5 1 8 1 6 7 5 R 4 47 5 ] 8 1 6 76 3 4 4 R 5? 8 17 76 R 4 4 R 5 7 8 1 7 26 34 44 5 7 8 18 26 35 44 5 7 9 1 8 26 3 5 44 57 9 18 36 53

105 1 1 4 1 2 2 1 71 1 40 1 48

105 114 1 7 3 1 3 2 1 40 1 49

106 114 1 2 3 n7 1 4 0 1 4°

105 114 1 23 137 141 1 50

106 1 15 174 137 141 1 50 1 06 1 1 5 1 7 4 1 3 7 147 1 c 0 1 06 1 i 6 1 74 1 77 1.42 1 50

107 1 1 6 1 7 4 1 3R 142 150

107 116 125 1 34 1 4 7 1 7 1 108 116 125 1 34 142 151

108 116 1 26 1 34 143 152

108 1 1 7 126 1 3 4 143 152

108 1 1 7 1 26 1 34 144 157

108 1 1 8 1 76 1 35 1 44 1 5?

109 1 18 176 135 144 I 77 1 09 1 1 8 1 27 1 7A 1 44 1 73 1 1 0 1 1 0 1^7 1 34 1 LlU 1 53 1 lo 1 1 R 1 7 8 1 36 1 45 1 64 1 lo 1 lo 1 28 136 1 4 6 1 7 4

no 1 1 9 1 78 1 36 146 1 74

110 120 128 1 37 146 1 54

96

06

07

07o 8

OR

98

08

OR

09

00

10O 1 on 1 00

loo

mo] 01

101

102

102

107

102

102 1 OR 1 0 0 104 1 04 1 04 1 04 ] 04

201

201

202

202

202 2 0 7 202

203

203

204

204

204

204

204

203

205

206

206

206

206

206 - 78 -
AMPL5 H (cONt.)

i 1 64 173 180 190 198 207 111 120 128 137 146 ] C:4 164 172 18 1 190 198 207 111 120 129 138 1 46 1 r-5

1 64 173 181 190 198 208 112 120 1 29 i 7 p 146 1 c 5

1 64 173 182 190 199 208 1 12 1 29 i 7 q 1 38 1 47 1

] 64 174 182 190 1 99 208 1 12 ] 21 1 30 ] 00 1 47 1 56

165 174 182 191 200 208 112 1 2 1 130 138 148 156

165 174 182 19] 200 208 112 1 22 1 70 ] 3° 1 48 1 c 6

1 66 174 182 192 200 209 113 122 1 70 1 39 148 1 5 6

1 66 183 192 201 209 113 122 131 ] 40 148 1 07

166 183 200 1 1 4 122 1 40 1 57

263 271 2 70 288 296 705 210 2 1 8 7 7 7 7 7 44 7

c p 262 271 279 288 296 306 210 ? ] p 2 7 0 2 76 24 5 754

262 272 280 288 297 306 2 10 2 19 7 79 236 245 754

263 272 280 288 297 706 211 219 228 236 246 2 54

263 272 2 80 289 2 9 8 306 210 220 728 237 246 2

C 4

264 2 72 280 2 8° 298 306 211 220 778 237 7 46 704

764 2 72 280 2°0 2 0 8 707 211 229 279 2 3 8 746 7 0 c 264 273 281 2 0 0 2 0 8 7 07 217 229 7 79 7

7 P 7 4 0 7

p 0

2 64 2 78 28 1 290 2 9 8 700 217 7 7 r 0 t n 7 7 0 2 4

^ 2

c 6

264 274 282 290 2 99 308 212 72 1 7 70 2 3 8 247 2

c 6

265 274 282 2 Q 0 ;oq 0 n 0 2 1 7 72 1 7 0 0 2 38 249 7 06

265 274 282 291 700 9 08 2 1 2 722 2 30 2 3^ 240 2

c 6

266 274 28 2 2 91 300 308 217 222 ? 70 730 248 2 56,

266 274 28 2 2 92 300 309 213 222 2 3 1 740 240 757

2 6 6 275 283 292 300 309 214 222 2 7 1 7 40 7 4 0 7 5 7

266 275 2 8 Q 292 300 310 214 222 7 0 2 2 40 2 4° 2 58

266 276 284 292 301 3 10 214 723 7 7 2 749 749 7

c 8 267 276 284 292 301 3 10 214 223 7 0 2 240 0 5 9 7

0 p 2 67 276 284 290 302 0 10 2 14 224 7 0 0 74] 750 7 0 R

2 68 276 284 290 702 3 10 215 224 2 0 2 741 ?50 7

0 0

2 68 2 76 2 84 294 302 7] 1 215 7 24 2 0 0 7 4 7 2^0 one ^ 268 277 285 294 702 7 1 1 2 16 7 24 700 74 7 2 50 7 0 0

2 68 ' 277 285 294 302 312 216 224 774 74 7 7

c 1 7 69

268 878 286 294 303 312 216 2 2

r' 234 7 47 251 269

269 278 286 294 303 312 216 225 2 74 247 252 2 69

269 278 286 295 304 312 216 726 2

Q 4 743 257 2 6 0

270 278 286 295 304 312 2 17 226 2 34 747 207 2 6 9

270 278 286 296 304 3 13 217 226 775 244 252 261

270 287 296 304 3 13 218 226 2 0

p 744 P A P L- - C- 761

2 70 287 296 305 314 218 226 2

Q 6 244 2 5 0 PAP

270 2 8 D 005 2 18 777 p

Lx L 7 A P o 12400 105

7 1 7 7 p 197 6 5

g 4 60134149 1781 852^73 34

1 0077548

15^447730601 255751305264

.5 93 .640 .678 .0 04

.950 .9501 .0501 .1 861.019 .905 .789 . 764

.216 .191 .161 .035 .095 .141 .286 .352

.789 .648 .492 .787

.698] . 947 1 . 726] .163

2 . 1862 . 7332 .7673. 1862.9422 .2671.779] .593

.392 .777 .256 .186 .128 •

] °8 .407 • 5 fi 1 1.1981 . 981 .649 .709

.0 90 .0 49 . p p 0 . 4 6 lx
EXAMPLE f\ ^ont.)

.366 . K 79 .62 5 .604 .558 .4 39 .3 88 . .194 .985 .080 .9 44 .059 . 9 °4 .136 .22 5

.596 .645 .588 .698 .645 .48 2 .463 . 33 ] .09 8 .965 .94 1 .06 1 .053 .998 .122 .7 16

.320

.286

.347

248 .200

384 .396

176 .196

1 in

A 1 6

] 38

- 80 -
i i i 20 . 7 r 0 0 0 3 14 281051292102 5 0

53 62 7 0 79 88 96 5 4 62 7 n 79 88 06

54 62 70 80 88 07 5 4 63 7 ] 80 88 07

54 65 7 1 80 88 0 8

54 6 4 7? 80 89 08 5 5 64 7 2 80 8 0 9 8 e r 64 7 9 8 1 on Oft 56 6 4 7 5 R 1 0 n 0 ft 56 64 72 82 °0 99

56 65 73 8 2 00 °9

56 65 79 82Q 0 100

56 6 6 74 82 91 100

57 6 6 74 82 0] 100 5 7 66 7 4 8 5 0? 1 00 5 8 6 6 7 4 8 3 07 1 00 c 8 6 6 5 4 8 4 07 1 0] 5 8 67 7 c 8 4 07 1 0 1 58 67 7 r 84 0 7 1 09 c 8 68 76 84 c ft 1 0 7 c 9 68 7 6 84 09 1 07 5 Q 69 76 8 8 °4 107 6 7 68 76 8 5 04 1 0 9 60 68 7 4 8 6 04 1 O ft 6 ° 69 7 7 86 94 10ft 6 0 6 7 7 7 8 6 04 1 04

60 7 0 78 8 6 Q

R 104

61 70 7 8 86 OR 104

61 7 8 7 °6 1 04

62 78 87 07 ] 04

62 7 Q °6 1 E O 1 66 1 7 4 1 84 ion 201 1 5 8 166 178 1 84 1Q7 2oi

156 167 175 1 84 107 202

158 167 176 1 84 193 202 1 58 168 176 1 84 193 2 02 1 5 9 168 176 185 1 04 207 1 59 168 176 185 194 202 1 60 168 176 186 104 C\i c 0 1 60 168 177 186 194 203 1 60 169 177 1 86 1 Q 4 204 1 60 169 178 1 86 1 OR 204 1 60 1 70 178 1 86 1 Q R 204 1 61 170 178 187 1 °6 704 1 61 170 178 1 8 7 1 06 704 1 62 170 178 188 106 205

162 170 179 1 8 8 ' 1Q6 205

162 171 179 188 196 206 1 62 171 180 188 197 206 1 62 172 180 188 197 206

163 172 180 189 198 206 1 ft ] 8 77 ^ 4 A 1 1 0 1 8 2 7 ft A AA 1 1 0 1 9 7 p 7 6 45 1 1 ft 1 0 78 3 6 4 c 2 1 7 1 0 78 9 7 46 2 1 ] 7 0 78 37 A 6 7 1 1 70 ?P 5 8 A 6 9 1 9 9 O 7 0 ft R A 4

ft 1 9 9 ft 9 0 5 8 A 4 3 1 2 2 1 30 ft R 4 7 4 1 2 ? 1 5 o fto A7 4 1 2 7 7 30 ft O 4 8 4 1 3 22 3 0 30 4 8 4 1 3 72 50 A0 4 8 4 1 4 2 2 ft i 40 4 8 R 1 A 9 ? 5 1 40 A 5 E 1 4 9 9 9 9 Aft Aft 6 1 4 9 9 q 9 Aft Aft 6 14 9 4 ft 9 41 R ft 6 1 R 7 A 9 9 4 1 E ft 6 1 5 ? A 5 7 42 e r. 6 1 6 7 4 9 q 45 E ft 7 1 6 9 4 ft 9 4 2 E ft 7 1 6 7 c 9 A 47 E 1 8 1 6 7 5 3 A 4 9 R 1 8 1 6 ft A ft /L 4 5 E 9 8 1 7 76 34 A 5 K 9

ft l 7 76 ft

A 44

R 7 8 1 9 96 ft R 44 E 9 9 18 76 3 5 44 8 9 Q 1 8 5 6 E q i n r 1 1 A 19 9 1 ft 1 1 A 9 1 /, 0 1 n r 1 1 4 1 75 1 5 9 1 A A 1 Aft 106 1 14 1 7 ft 1 3 7 140 1 40

105 ] 1 4 1 7 3 ]

ft ft 141 1 R ft 1 06 1 1 r' 1 7 4 -| q q 1 4 1 1 c ft 106 1 15 1 74 ] 5 7 1 4 2 1 RO

106 1 16 124 133 142 1 5 0

107 1 16 1 24 1 5 9 1 49 1 E ft 107 116 1 2 5 1 3 A 1 A 9 1 C 1 108 1 1 6 1 75 1 U 1 49 1 E -| 1 08 1 ] 6 1 76 1

5.

A 1 A 5 1 C 9 1 08 1 1 i 7 6 1 54 1 A9 1 E q 1 OR 1 1 7 1 76 1 34 1 4 A 1 c q ] 08 1 1 8 1 7 6 1 5R 1 44 1 5 9 100 1 18 126 1 3^ 144 1 E 9 109 1 1 8 177 1 34 1 44 1 E q 110 1 18 127 136 1 44 1 53

110 1 18 1 78 ] 54 145 1 E 4

110 1 10 1 28 136 ] 4 4 1 R

A 1 10 1 19 1 28 1 34 1 46 1 c A - 81 -
B (coMt^

1 6 3 172 1 8 0 1 R Q 1 Op 2 04

l 68 173 1 80 1 9 o 1 G 0 708

1 64 172 1 8 1 1 Q o 1 OR 2 08

1 64 1 7 8 1 8 1 l or. 1 O P 70 P

1 64 1 7 8 1 8 2 1 on ] OQ 2 p Q

1 64 1 74 18 2 19 0 T C Q 70 8

1. 6 3 174 182 1 Q 1 200 20 8

1 6 5 174 18 2 19 1 200 2 08

16 6 174 182 192 "no 2 09

1 6 6 188 102 2 o i 20 q

1 6 6 188 2 on

2 63 27 1 2 70 2 8 8 2 °6 30 5

^ 6 2 271 2 70 8 8 8 7 °6 3 06

'

5 6 2 2 72 280 7 88 8 0 7 P04

267 2 72 780 2 8 8 707 p 0 6

3 63 2 72 2 80 2 8° 2 0 8 3 06

2 64 272 2 Ro 2 8 0 2 op 706

2 64 272 2 8 0 8 0 n 2 0 p p 0 7

2 64 278 28 1 2 00 2 08 707

264 273 281 2 90 pop 708

2 6 4 274 28 2 2 00 poo 7 08

2 6 5 2 74 23 2 2 00 2 00 3 08

2 63 274 2 8 2 2 9 1 300 70 8

2 6 6 274 2 8 9 2 91 300 308

2 6 6 274 28 7 2 Q 2 POO 30 9

2 66 7 75 28° 8 9 2 POO 7 00

2 66 7 7 5 7 8 8 9 G 7 POO 3 1 0

2 6 6 776 2 8 4 2 o p P 0 1 7 1 0

267 2 76 2 84 o Q 2

p 0 1 pin

2 67 276 2 84 2 0 3 P 0 8 7 10

268 276 2 84 293 702 7 1 0

2 68 276 (\J 00 4> 9 04 30? 3 1

1

2 68 277 2 8 5 204 7 0 ? 7 1 1 268 277 285 294 302 7 I 7

2 6 8 278 286 294 3 0 p 3 1

2

269 278 286 294 30? 3 1 7 2 6 9 278 2«6 0 0 5 7 04 7 1 7

2 70 278 286 2 9 5 304 312

2 70 278 2 86 296 804 7 1 p

2 70 287 2 q 6 304 3 1 p

2 70 287 296 305 PI 4

7 70 283 POP

0 4

1

? 1 77710.865

8 4 55] 341 40] 78185777334

] ^872640

] 544477^0601 255751805 254

1

1 0 1 7 0 1 7 8 1 8 7 1 46 ] 64

1 1

1

1 ? 0 1 7 8 1 37 1 4 6 1 5 4

1

1

1 1 70 170 1 8 p 146 ICC.

1 1 8 1 9P 1 7 0 1 8 0 1 46 1 cc

1 1 8 1 7 0 1 7 p 1 8 P 1 47 1 p 7

1 18 1 2 1 1 0 p 1 3 P 147 1 58

112 1 8 1

1 P P 1 3 8 1 4 8 1 c 6

1 1 2 1 7 7

1 P P 1 39 1 4 8 1 *6

1 1 3 122 1 30 1 39 148 1 5 6

1 1 8 1 7 8 1 8 1 1 40 148 157

1 14 12? 1 40 167

210 7 1 8 7 7 7 2 84 244 7

p 9 210 7 1 8 8 8R 7P4 245 7P4

7 1 0 7 1 G 970 775 845 9 = 4

211 P 1 O 9 9 p 9 P5 848 ?

c 4

2

].o 8 8 0 8 ? 8 7 87 24 6 2 54

7 1 1 8 2 0, 9 9 8 797 846 9

c 4

7 1 1 7 7 0 7 7 0 7 P P 24 6 7 K K 2 1 7 220 8 9 0 9 P P 246 7

c c.

7 1 7 2 2 0 930 2

P 8 84 7 258

7 1 7 7 2 1 7

p 0 7 P p 840 9 5 A 212 221 7

p 0 2 8 8 240 256

7 1 7 7 2 8 7 7 P 9 p 0 248 2.5 6

2 1 3 788 7

P 0 7

P G 7 4 8 2 66

2 1 8 22 2 27 1 2 40 2 48 2

c 7

214 8 8 7

9 o ] 740 848 7

c 7

2 1 4 8 ?

8 8 P ? 740 940 7 58

2 14 8 28 9 p 7 740 ?40 7

c 0 2 14 7 2 p 999 940 p OP 9 P R 2 14 2 24 9 p 8 24 1 2

c p 9 CO

2 1 5 224 2 82 241 2 pp 9 P 8

215 2 2 4

9 9 8 2 4? 8 50 750

2 1 6 7 7 £ 9 P P 24? 8 5 0 7

P 0

216 2 24 7 34 24? 251 260

216 2 2 5 2 P4 ? 4 2 ? 5 1 ? 60

216 2 2 5 7 8 4 24 8 252 2 6 0

7 1 6 2 85 7

9 a 94 p 9

r. p ,8fO

2 1 7 8 26 2 8 4 749 9 7 9 260

2 1 8 8 8 4 9 9 c 244 p

P 9 8 6 1 7 1 8 226 7 8 5 244 2 59 261

7 1 8 8 2 6 9 P 4 9 44 9 p 9 26 3 7 1 8 2 2 7 244 26 2

- 82 -
D. Users Guide for HIST

There is no input data deck, the only input to HIST is the

SARSIM case FILE. The only output of HIST is the historical demand

tape, the CASE TAPE.

- 83 -
FIGURE NO. 8

fJ

iQT U> if

j _ i — *<?T cA«P

yr

/ !

' /u '

For stuv^atvi j

, u SEUEv Source /r~

Li

/ i post rt/ST,H»sr !

\! K

Hist sooRce Otcic (f» mm**}

$S<r CftfiP foft OuTPuT fc4S«) "TAfC

ASfr CAEP Fofc XtOfuT^DfSlH) T#fC

Iturt CARD

DETCfc SETUP Or HlST Pofc

At fs/S.S- UfvivAc IIC$

- 84 -
V. SELECT

ft SELECT, a FORTRAN program, was introduced as an inteimediate

step between the Preprocessor and the Operational Simulator to alter

the occurrence times of the events on the exogenous event tape. Before

describing the possible uses of SELECT, an explanation of the run

deck will be given.

The composition of the run deck follows:

The first card is the UNIVAC 1108 run control card. The next two

cards are assign control cards. The exogenous event tape created

by DEMGEN or HIST should be mounted on logical unit A. The new

exogeneous event tape to be created by SELECT should be mounted on

logical unit B with a write ring in. Following the fourth card,

- 85 -
which is a control card to call the FORTRAN compiler, is the source

language for Program SELECT. Tills source language is listed on the

following pages. Next is the execute control card succeeded by the

one required data card to input IFIRST, the first day, and ILAST, the

last day, under the format (215). The FIN control card indicates the

end of the run stream.

As mentioned above, SELECT is an intermediate step to alter

occurrence times on the exogenous event tape; however, it may or may

not be necessary to run SELECT before running OPSIM. The data for

each event on the exogenous event tape contains three numbers (the day,

hour, and minute) representing the time at which the event occurs.

Program OPSIM considers the first day to be day zero; if the exogenous

event tape has been created such that the first day is day zero,

SELECT may not have to be executed. If the tape was created such

that the first day is day one, SELECT should be executed to change the

times. For example, suppose that an exogenous event tape has been

generated for the month of July, and it considered the first day as

day one. Program SELECT should be run with IFIRST = 1 and ILAST = 32.

A new exogenous event tape, beginning at time zero and continuing to

midnight of July 31, would be generated. Note that both DEMGEN and

HIST now consider the first day to be day zero.

Another possible use of Select is to change the time at which

Exogenous Event ENBSIM occurs. If the exogenous event tape was created

such that the simulation ends at some arbitrary future time greater than

- 86 -
the occurrence time of the last case, SELECT should be executed to

set it equal to midnight of the last day' of the time duration being

simulated. For example, suppose that an exogenous event tape has

been generated for the month of July, and it considered the first

day as day zero but arbitrarily set the time for the end of the

simulation to be three days past the occurrence time of the last case.

SELECT should be executed with IFIRST = 0 and I LAST = 31. Again,

both DEMGEN and HIST now correctly set the occurrence time of

Exogenous Event ENDSIM to be midnight of the last day of the time

duration being simulated.

Lastly, Program SELECT can be used to select a portion of an

exogenous event tape for simulation. For example, suppose an

exogenous event tape has been created for the months of January,

February and March of 1969. The user, however, wants to simulate

February only. SELECT should then be executed with IFIRST = 31

and ILAST = 59; a new exogenous event tape, beginning at time zero

and continuing to midnight of February 28, would be created.

- 87 -
Program SELECT Source Language

dimension inisooj ,a« s o) »

b

c so

10 read (5,800, end- 1000, f FIRST , ILAST

WRITE (6,800) I E I RST , ILAST

gOQ FORMAT (215)

WRITE (a, 802 ) 002 FORMAT ( t 3 0 0 Q » ) WRITE (6,902)

902 FORM AT (» 3 0 0 0 8

) iOQ ikeep 0

READ ( 7 ,805 > UN(1)»I«1,16)

80S FORMAT ( 13, I *», 13, 12, I 3 » 11 15)

! DA y I N ( 2 ) IF ( IN ( 1) * E 3 • 3 ) SO TO 100

IF ( I N ( 1) , E Q « 2) GO TO 200

IF ( I N ( 2 ) « L T , IFIRS t .OR. In(2) ,GE, J L A S T ) 60 TO ljO

I N ( 2 ) IN(2)-IplRST

I END * I N ( 2 ) IKEEP * i WRITE (8,805) ( I N « I) ,I«1 , U)

WRITE (6,905) ( IN( I ) , I"1 » U>

90S FORMAT (

I H ,13,18, 13,12,13,1115)

1 1 0 N® I N ( | 6 ) READ (7,810) U N ( I ) , I * 1 , 1 1 ) 8 1 0 FORMAT (1015,110)

NNN a I N ( 1

MMM b I N ( 2 ) IF ( IKEEP ,EQ. 0) GO TO 130

WRITE (8,810) ( I N ( I) , I*i , 1 1 ) WRITE (6,910) ( I N ( I ) ,

I 1 , 1 I ) 910 FORMAT ( 1H ,1015,110)

J 30 IF (N * LE * 0) GO TO 500

IF (N « G T » i ) GO TO ISO

IF (MMM 0 6T , I ) GO To ISO

Read ( 7 ,a i 5 ) I n ( i )

,

a < i j 815 FORMAT ( I 2 ® F 6 # 8 ) IF ( IKEEP »EQ 9 o ) SO TO 500

WRITE (8,815) I N ( 1 ) , A ( 1 ) WRITE 56,915) IN( 1 ) ,A< 1 ) 9 1 5 FORMAT ( 1 H , I 2 , F6 • H ) GO TO 500

J50 IF (NNN *EQ, 0) GO To 180

INI N IF (MMM ,5Ts 0) INI « N-I

READ (7,820) (I N (

I ) » A ( 1) » B ( I ) ,

I * l , I N I ) 820 FORMAT |4(J2,F6,1»FH,2)|

IF (IKEEP * EQ • 0) GO TO 170

WRITE ( 8,820 ) (INI I) ,AU ) ,B< I ),!!, INI ) WRITE (6,920) ? IN(I) ,A( I) ,B( 1

) , I«1 , INI ) 920 FORMAT ( J H ,6« I 2 e F 6 , R » F ** . 2 ) ) J70 IF (MMM « EQ « 0) GO To 500

180 READ ( 7,825 5 I N < J ) 825 FORMAT (12)

IF « IKEEP *E9. 0 ) 60 TO SOO

WRITE ( 8 ,825 ) I N ( 1 ) WRITE (6,925) I N ( 1 ) 925 FORMAT « | H ,12)

500 IF (IDAV .LE. IlaST) GO TO ioO

200 ILAST « ILAST • I F I

S T

- 88 -
WRITE (8,030) JLAST

030 FORMAT ( * 2 * ,

I M , * WRITE (6,930) I L AST

930 FORMAT ( * 2* , IH» » ENDFIUE 6

WRITE (6,935)

935 FORMAT C l HO

)

GO TO 10

1000 STOP

end

005* )

005* )

I