|
Citation |
- Permanent Link:
- https://ufdc.ufl.edu/UF00098195/00001
Material Information
- Title:
- Automatic computer generation of solution precedures to large sets of nonlinear simultaneous equations via GENDER
- Creator:
- Cunningham, James Richard, 1942-
- Publication Date:
- 1972
- Copyright Date:
- 1972
- Language:
- English
- Physical Description:
- xii, 511 leaves. : illus. ; 28 cm.
Subjects
- Subjects / Keywords:
- Algorithms ( jstor )
Data types ( jstor ) Design analysis ( jstor ) Integers ( jstor ) Mathematical independent variables ( jstor ) Mathematical variables ( jstor ) Mathematical vectors ( jstor ) Recordings ( jstor ) Subroutines ( jstor ) Tears ( jstor ) Chemical Engineering thesis Ph. D Dissertations, Academic -- Chemical Engineering -- UF Equations, Simultaneous ( lcsh )
- Genre:
- bibliography ( marcgt )
non-fiction ( marcgt )
Notes
- Thesis:
- Thesis -- University of Florida.
- Bibliography:
- Bibliography: leaf 510.
- General Note:
- Typescript.
- General Note:
- Vita.
Record Information
- Source Institution:
- University of Florida
- Holding Location:
- University of Florida
- Rights Management:
- Copyright [name of dissertation author]. Permission granted to the University of Florida to digitize, archive and distribute this item for non-profit research and educational purposes. Any reuse of this item in excess of fair use or other copyright exemptions requires permission of the copyright holder.
- Resource Identifier:
- 022656930 ( AlephBibNum )
13924236 ( OCLC ) ADA4871 ( NOTIS )
|
Downloads |
This item has the following downloads:
|
Full Text |
AUTOMATIC COMPUTER GENERATION OF SOLUTION
PROCEDURES TO LARGE SETS OF NONLITNE.AR SIMULT.ANOUS
EQUATIONS VIA GENDER
By
JAMES RICHARD CUNNENGHCAM
A DISSERTATION PRESENTED TO TIC Gi0DUATE
COUNCIL OF THE UNIVERSITY OF FLORID IN PARTIAL
FULFILLMENT' OF THE RE QI IRkMENTS FOR THE DEGREE OF
DOCTOR OF PHILOSOPHY
UNIVERSITY OF FLORIDA
1972
COPYRIGHT
JAMES RICHARD CUNNINGHAM
1972
ACKNOWLEDGEMENTS
The author wishes to express his indebtedness to the chairman of
his supervisory committee, Dr. A. W. Westerberg, Associate Professor
of Chemical Engineering, for suggesting the research topic and for pro-
viding the necessary guidance. The author also wishes to thank the
members of the supervisory committee: Dr. F. P. May, Professor of
Chemical Engineering, Dr. R. G. Selfridge, Professor of Mathematics and
Director of the Computing Center, and Dr. F. D. Vickers, Associate
Professor of Computer and Information Sciences.
Thanks also are extended to the National Science Foundation, which
provided financial support through grant GK-18633. In addition to
providing the funds for my research assistantship, this grant defrayed
the extensive computer expenses incurred during the debugging of the
135 subprograms constituting the GENDER System.
Without this assistance and support, the development of GENDER would
not have been possible.
TABLE OF CONTENTS
Page
ACKNOWLEDGEMENTS........................................................ iii
LIST OF TABLES................................................... vii
LIST OF FIGURES.................................................. ix
ABSTRACT.......................................................... xi
CHAPTERS:
I. INTRODUCTION.......................................... 1
II. OVERVIEW OF THE CHEMICAL ENGINEERING DESIGN ROUTINES
SYSTEM................... ............................. 5
III. DATA MANIPULATION AND STORAGE......................... 11
III.1. Data Handling................................. 11
III.l.a. Lists............................. 11
III.l.b. Files............................... 14
III.l.c. Memory Allocation................... 14
111.2. Special Data Structures....................... 16
III.2.a Networks ........................... 18
III.2.b Sparse Incidence Matrices........... 18
111.3. Implementation Details........................ 22
*III.3.a. COAST............................... 22
*III.3.b. REMOTE.............................. 33
*III.3.c. NETPAC......... ................. .... 43
*III.3.d. SIMPAC ........... .............. ... 57
IV. DATA BASE....... ...................................... 66
IV.1. Service Module, SECEDE ........................ 66
IV.2. Solution Procedure, GENDER List............... 68
TABLE OF CONTENTS (Continued)
Page
IV.iS. Input/Output Facilities....................... 68
IV.4. Implementation Details........................ 70
*IV.4.a. SECEDE.............................. 70
*IV.4.b. SECIAO.............................. 85
*IV.4.c. GENDER List ......................... 89
*IV.4.d. GENIAO.............................. 98
V. ANALYSIS ALGORITHMS ................................... 101
V.1. Hungarian Output Assignment Algorithm.......... 102
V.2. Speed-Up Precedence Ordering Algorithm........ 103
V.3. Barkley Motard Minimum Tear Algorithm....... 104
V.4. Implementation Details........................ 105
*V.4.a. HASSAL.............................. 106
*V.4.b. SPEDUP .............................. 107
*V.4.c. BEMOAN.............................. 112
VI. INTERPRETATION ........................................ 114
VI.1. Link Editor ................................... 115
VI.2. Converter...................................... 116
VI.2.a. SOLVE............................... 119
VI.3. Interpreter ................................... 120
VI.3.a. MATH ................................ 122
VI.3.b. Subroutines......................... 122
VI.4. Implementation Details......................... 125
*VI.4.a. LINKED .............................. 125
*VI.4.b. COVERT .............................. 126
*VI.4.c. GLINT ............................... 128
TABLE OF CONTENTS (Continued)
Page
VII. USER MANUAL....................................... 130
VII.1. Input Data Preparation ................... 130
VII.2. Program Preparation ......................... 131
VII.3. Additional Algorithms....................... 134
VII.4. GENDER as a Design Tool..................... 134
VIII. EXAMPLES ............................................ 137
VIII.1. A Simple Analysis Strategy.................. 147
VIII.2. Equilibrium Flash.......................... 147
VIII.3. Binary Distillation ......................... 155
IX. CONCLUSION ........................................ 165
IX.1. Convenience Aspects......................... 165
IX.2. Additional Algorithms....................... 166
IX.3. A Final Note on GENDER ...................... 168
APPENDICES...................................................... 169
Appendix A............................................. 170
Appendix B............................................. 498
Appendix C............................................... 501
Appendix D.............................................. 504
BIBLIOGRAPHY..................................................... 510
BIOGRAPHICAL SKETCH............................................. 511
LIST OF TABLES
Table Page
1 COAST Verbs............:................................ 28
2 LEND Components Required by REMOTE ..................... 42
3 Auxiliary Data Fields Required by NETPAC............... 44
4 NETPAC Verbs........................................... 55
5 Data Fields Required for Ordinate Entries.............. 59
6 Data Fields Required for SIM Elements.................. 61
7 Information Block Components Pertinent to the SIM....... 62
8 SIMPAC Verbs.................. ......................... 64
9 Data Fields for SECEDE.................................. 75
10 File Entries for SECEDE ................................ 77
11 SECEDE Files.......................................... 79
12 Information Block Components Pertinent to SECEDE........ 86
13 Data Fields for GENDER................................. 90
14 The List Entries of GENDER ............................. 93
15 Information Block Components.Pertinent to GENDER List.: 99
16 Data Fields for SPEDUP Working Lists................... 109
17 List Entries on SPEDUP Working Lists ................... 110
18 Data Fields for the BEMOAN Working Ordinate............ 113
19 Operator Set ........................................... 121
20 GLINT Error Codes..................................... 123
21 Information Block ...................................... 132
22 The Code Name/Variable Assignmentsfor a
Distillation Tray...................................... 140
23 The Constant/Code Name Assignments for a
Distillation Tray........................................ 141
vii
LIST OF TABLES (Continued)
Table Page
24 Values for Information Block Components................ 149
viii
LIST OF FIGURES
Figures Page
1 GENDER Architecture................................. 9
2 Typical List Structures ........................... 12
3 Typical Hierarchical File.......................... 15
4 A Simple Network.................................. 19
5 Sparse Incidence Matrix.......................... 20
6 A User Mask ...................... .............. 24
7 PUSH................... .......................... 30
8 POPUP............................................. 32
9 File Structure.................................... 34
10 A Record.......................................... 38
11 Trace (Start).................................... 47
lla Trace. (Step 1)..................................... 48
llb Trace (Step 2)..................................... 49
lc Trace (Step 3)................................... 50
lid Trace (Step 4)...................................... 51
lle Trace (Completed)................................... 52
12 Sparse Matrix..................................... 58
13 An Equilibrium Stage............................... 138
14 SECIAO Data for a Distillation Tray................. 142
15 Data for COIN..................................... 148
16 Equilibrium Flash................................... 150
17 SECIAO Data for Equilibrium Flash.................. 153
LIST OF FIGURES (Continued)
Figures Page
18 Data for VARIAO................................... 154
19 Simple Distillation Column ........................ 156
20 SECIAO Data for Simple Distillation Column......... 158
Abstract of Dissertation Presented to the
Graduate Council of the University of Florida in Partial
Fulfillment of the Requirements for the Degree of Doctor of Philosophy
AUTOMATIC COMPUTER GENERATION OF SOLUTION
PROCEDURES TO LARGE SETS OF NONLINEAR SIMULTANEOUS
EQUATIONS VIA GENDER
By
James Richard Cunningham
December, 1972
Chairman: Arthur W. Westerberg
Major Department: Chemical Engineering
Fundamentally, chemical process plant design is the solution of a
large set of nonlinear simultaneous equations. For large and complex
equation sets, it is frequently not possible for the design engineer to
determine readily how the solution should proceed. Algorithms have been
developed which analyze equation sets with respect to solution procedure.
The algorithms do not generally attempt to solve the equation set, but
merely provide the directions for solving to the design engineer. While
computer implementation of certain algorithms analyzing equation sets
has been accomplished, little emphasis seems to have been placed on the
implementation of a complete analysis system integrating a number of
algorithms. This dissertation presents an automatic and machine-indepen-
dent system permitting the design engineer to direct solution procedure
generation and execution via selections from a spectrum of analysis
algorithms.
GENDER is the acronym for General Engineering Design Routines. The
primary objective of GENDER is the development of a complete solution
procedure. To be complete, a solution procedure must reflect (1) decision
variable selection, (2) output set assignment, (3) tear variable selection
xi
and (4) precedence ordering. These attributes are provided to a solution
procedure by GENDER through a minimum tear analysis strategy. While only
the minimum tear strategy has been furnished with the first version of
GENDER, the GENDER System has been designed to readily accept additional
analysis algorithms, expanding the analysis strategy repertoire.
The design engineer, having generated a solution procedure for an
equation set, may perform the translation of the solution procedure into
FORTRAN for execution. However, an interpreter capable of direct
execution of a solution procedure is provided in GENDER. The interpreta-
tion capability, while sparing the engineer from the drudgery of trans-
lation, has a somewhat more noble purpose. If the design problem involves
constrained optimization, the solution procedure will be subjected to a
series of revisions as additions or deletions to the set of binding con-
straints are required. The optimization-solution procedure generation-
execution cycle is potentially faster for interpretation than for FORTRAN
execution owing to the elimination of the translation and compilation steps.
GENDER depends extensively upon list processing techniques. In fact,
the solution procedure has been implemented as a list. In the list format,
the revisions and rearrangements associated with an analysis strategy may
be conveniently performed on a solution procedure. The application of
list processing techniques is not restricted to the solution procedure
alone, but permeates the GENDER System. Linked data structures of note
include a paged storage system (REMOTE) and the sparse incidence matrix.
The former is notable for compatability with mass memory and the latter
for memory conservation (on machines lacking virtual memory).
CHAPTER I
INTRODUCTION
The objective of process design is the determination of equipment
specifications and operating conditions which will meet certain produc-
tion goals developed by management. Process design problems are not
particularly amenable to solution. The equations quantitatively
describing the equipment characteristics may be highly nonlinear, a
situation further confounded by the presence of recycle streams. The
recycle stream is necessary to economic operation, but it imparts a
cyclic character to the design calculations just as it imparts a cyclic
character to the process flow. To these complexities of process design,
yet another must be added. Processing plants are frequently complex
entities, consisting of many individual processing units connected by a
make of piping. This is particularly true if the process engineer
intends to extend the scope of the plant model to include not just the
major features of the process, but all unit operations. That is, the
mathematical model is to resemble the processing plant as closely as
possible.
The availability of large, powerful computers has caused process
engineers to revise the design procedure. Prior to his introduction to
computers, the engineer was forced to simplify the process model to
facilitate the completion of hand calculations in a reasonable amount of
time. While short-cut techniques were developed for some unit operations,
the "assumption" reigned as the arme supreme. Unlike the human brain,
the digital computer is well suited to complex and repetitious calcula-
tions. The engineer could now expect solutions for large and complex
process models without the uncertainties of simplification.
The new exactness permitted to the process engineer by the digital
computer proved to be something less than a complete blessing. The
programs developed by the engineer from the mathematical models all too
frequently either failed to converge, giving no answer, or generated
unreasonable answers. Research, both industrial and academic, determined
that the computational difficulties were characteristic of particular
formulations of a model. Further, certain formulations of a model may
require more information to initiate cyclic calculations than other
formulations. What had developed at this point was a new field of
endeavor for process engineers: the study of process models. This study
begins where the traditional concept of mathematical modeling ends.
The result of mathematical modeling is the development of an equa-
tion set descriptive of, for instance, a unit operation. This set of
equations is not unique. That is, the algebraic rearrangement of one
model produces another equivalent model. It is this rearrangement and
its effects which have captured the attention of the process engineer.
The result has been a variety of algorithms for selecting a particular
model formulation.
The algorithms are rather specific in character, dealing with only
a particular aspect of a process model. Algorithms have been developed
for selecting the output variables for a set of equations, for selecting
the variables for which value estimates are required to initiate cyclic
calculations and for ordering the equations so that the calculation of
each variable value will depend only upon variable values already
calculated. These operations are respectively known as output set
___
assignment, tear variable selection and precedence ordering. The process
engineer employs selected algorithms sequentially to convert the original
model he formulated into an equation set amenable to computer solution.
The particular selection of algorithms may be referred to as an analysis
strategy. The strategy is largely dictated by the objectives of the
design engineer, such as a minimum tear solution or a rapidly converging
solution. Unfortunately, the execution of an analysis strategy must be
primarily manual. Only a few algorithms have been programmed, all of
which are machine dependent and isolated from other analysis capabilities.
The next step in this evolutionary development of process design
would seem to be totally automatic process model analysis. The notion
of automatic design is not original to this work (Kevorkian and Snoek,
1972; Soylemez, 1971; Mahand Rafal, 1971), but has been attempted
previously. It is the limitations of other automatic design systems
which have encouraged the present effort, the General Engineering Design
Routines (GENDER) System. GENDER does not restrict the design engineer
to a single analysis strategy by virtue of a library of analysis algori-
thms. Further, the inclusion of additional algorithms has been made
relatively easy. While it is possible to convert the product of an
analysis strategy, which we shall call a solution procedure, into FORTRAN
code for execution, the GENDER System provides the capability of directly
interpreting the solution procedure to produce a solution to the design
problem. As a feature designed to permit compact problem representation,
GENDER can accept indexed variables and equations. Finally, the GENDER
System affords the design engineer with a problem solving medium permit-
ting the convenient modification of the original design problem during
the execution of the analysis strategy and/or interpretation of the
solution procedure. This feature is essential to constrained
4
optimization where fluidity in the inclusion and exclusion of constraints
is an absolute necessity. While many of these features have appeared
in previous attempts at automatic design packages, they have to date
not all appeared in a single automatic design system.
CHAPTER II
OVERVIEW OF THE GENERAL ENGINEERING
DESIGN ROUTINES SYSTEM
The heart of the GENDER System is the solution procedure and is essen-
tially the set of instructions for solving a set of simultaneous equations.
In order to make possible direct machine interpretation of the solution,
the solution procedure must be explicit and complete. The purpose of
this chapter is to introduce the concept of the solution procedure, its
terminology and its relation to the GENDER System.
In Chapter I and in the proceeding paragraph the term equation was
used for a model constituent. To be more precise, the model constituents
are actually equations and solved equations. That is, the model is
composed of algebraic relations between variables and constants, but
having the form
f(x,y,z,...) = 0
rather than the solved equation form
x = F(y,z,...)
In the solved equation form, the x is called the output variable. An
equation may be transformed into a solved equation by selecting a variable
to be the output and performing the algebraic rearrangement necessary
to place this variable alone on the left-hand side of the equality.
Certain of the equations defining a processing plant may be
constraints. Normally one thinks of constraints as inequalities.
However, inequalities are readily converted to qualities via the intro-
__
duction of slack variables. GENDER, at least in its current version,
is prepared to manipulate equality constraints only. Being identical
to the equations describing the process, the constraints could be
grouped with them without differentiation. However, during constrained
optimization the set of active constraints varies in numbers and
composition. To permit the free inclusion (exclusion) of constraints
into (from) a problem, constraints are regarded as distinct model
constituents and are carefully differentiated from all other model
components.
Normally an equation is permitted but a single output variable,
with one exception. The external routine (ER) is a special model
constituent which may possesses more than one output variable. In
essence, the ER is a subprogram for determining values to output variables
given the values of the input variables. An ER may be encoded in any
acceptable programming language.
To facilitate .the incorporation of existing subprograms in a
plant model, a mechanism for indicating prechosen output variables is
essential. The mechanism selected for GENDER is a weighting scheme with
an integer scale of 0 to 9. Each variable in each equation and ER is
assigned a weight in the 0 to 9 range. This weight is the cost of
assignment as an output variable. Thus, for an existing subprogram,
the output variables are all weighted at 0 while the input variables
are all weighted at 9. This weighting scheme allows the design engineer
to indicate to GENDER his preferences with respect to output set assign-
ment. For instance, similarity of a new model with one or more previous
models may suggest at least a partial output assignment. The weighting
mechanism allows the engineer to guide GENDER in performing the initial
output assignment and may reduce execution t.ne depending on the ultimate
degree of similarity between the solution procedures for the models.
In addition to output set selection, analysis of the equation set
must also order the equations and, if possible, subdivide the functions
into smaller groups. Initially, the plant model is treated as a single
large group of equations. The decomposition of the large problem into
a multitude of smaller problems is obviously advantageous. Equations
which are acyclic in character may be grouped, although the equation
grouping normally reflects the presence of a cyclic character. It is
permitted by GENDER to have groups as members of groups. Thus, we
may have, for example, a cyclic group appearing as a constituent of
another cyclic group, or even as a constituent of an acyclic group.
Once tear variable selection has rendered all cyclic groups apparently
acyclic (by ignoring all occurrences of the tear variables except in the
equations where they are the output), it is possible to order all
members of groups and to order all of the groups so that the information
flow is strictly forward. That is to say, the value of a variable is
never required as the input to a equation before it has been calculated
as the output of a previous equation. This then is the concept of
precedence ordering.
The solution procedure must reflect the output set assignment,
grouping, tear variable selection and precedence ordering. The solution
procedure must also indicate decision variable selection, the decision
variables being the unassigned variables following output set selection.
Numerous strategies exist for acquiring these ingredients to the solution
procedure, but for completeness all must explicitly appear.
The solution procedure is called the GENDER list. The GENDER list
consists of group, each group possessing a body of equations, ER's or
groups. Each equation and ER appears once somewhere on the GENDER list.
Its position on the GENDER list is dictated by precedence ordering.
Space is reserved with each equation and ER to indicate the selected
output variables. Similarly space is reserved for the recording of
the decision and tear variables associated with each group. The
completed solution procedure will.generally be evolved from a skeletal,
random listing of the equations in a single group called the crude GENDER
list.
The completed solution procedure contains all of the instructions
for solving the equation set, but is as yet not amenable to interpretation.
The conversion operation transforms equations into solved equations via
algebraic arrangement. In lieu of destroying the original equation set,
the converter operates on a copy of the equations. This feature of
GENDER preserves the original model should reanalysis of all or a
portion of the solution procedure be required. This eventuality might,
for' instance, be realized if convergence difficulties of a cyclic group
are encountered. Once subjected to conversion, the solution procedure
is transformed into an ordered and grouped list of solved equations
ready for numerical evaluation.
The GENDER System is divided into five major program levels as
shown in Figure 1. The program packages COAST (level 1), REMOTE (level
2), SIMPAC and NETPAC (level 3) are discussed in Chapter III. These
packages provide the capacity to manipulate certain data structures
essential to GENDER. Chapter IV introduces the data base SECEDE and
provides greater detail on the GENDER list. The algorithms available
for problem analysis are discussed in Chapter V. Level 4 of GENDER
is devoted entirely to the analysis algorithms. The highest current
GENDER level is level 5. On this level is found the input/output
__ _
-- I-I .
f-
C.)
-I I
0
o
a:
o
.--l
0t
F--
CV)
z
C.
E-
2H
E-
1-t
C,3
C-3
-->
... .
facilities and the programs relative to interpretation of the GENDER
list. The description of the input/output facilities has been incorpor-
ated into Chapter IV. The notion of GENDER list interpretation is treated
in Chapter VI. Chapter VII is'a brief user's guide to the GENDER System.
In this chapter the expansion of the repertoire of analysis algorithms
is discussed, as well as the employment of GENDER as a design tool.
Illustrative problems are presented in Chapter VIII. This work is
concluded in Chapter IX with some remarks on the limitations and
possible future of GENDER.
Particularly in the next four chapters, some sections are extremely
detailed. In addition to being difficult to read, they are likely only
of benefit to readers contemplating algorithmic additions or modifications
to the GENDER System. For this reason, these sections are identified
by an in the section number and may be omitted by readers not requiring
the' implementation details of GENDER.
CHAPTER III
DATA MANIPULATION AND STORAGE
III.1. Data Handling
The algorithms for solution procedure development suggest certain
data structures. Effective implementation of the algorithms requires
the availability of these data structures. Unfortunately, the data
structures require vast quantities of on-line memory. A large scale
problem would, by virtue of the data structures developed during problem
analysis, very quickly reach the bounds of on-line memory. Fortunately,
not all of the data structures need exist at one time, making feasible
the sharing of memory. A priori, the. memory required by each phase of
problem solving is unknown. Thus, the simple partitioning of memory is
an infeasible sharing policy.
Two basic and complementary data storage mediums have been provided:
lists and files. The list permits complex data structures which may be
readily rearranged, expanded or contracted. The penalty for this flexi-
bility is high access times. Reaching a particular location may be
accomplished only by stepping through all preceding list locations.
Conversely, the file allows rapid random access of any location. Files
are, however, restricted to a strictly sequential structure. Memory
sharing is accomplished by a dynamic memory allocation procedure. For
readers not familiar with list processing, Knuth (1968) provides a
complete discussion of list processing principles and structures, including
memory allocation.
III.l.a. Lists
Figure 2 is an illustration of three possible list structures. As
11
ar
u
4J
*H
cl)
*c4
*Hl
indicated pictorially in Figure 2, the structure of a list is relatively
arbitrary. The arrows in Figure 2 represent the connection between list
entries and are called links. Thus one data item (at least) in a list
entry is a pointer to an adjacent entry on the list. This flexibility
has not been restricted to structure alone. Each entry on a list
possesses the attributes of size, quantity of data and organization of the
data within the list entry. All of these attributes are also arbitrary.
The structure of a list, while arbitrary, is specified by the
programs which generate and manipulate the list. That is, the degrees
of freedom permitted in the selection of a list structure are consumed
by the programmer of a list processing application. Since one of the
objectives was machine independence, and since word size and memory size
vary from machine to machine, it seemed necessary to segregate the
organization of data within list entries from the tailoring of list
structures to meet strictly programming requirements. This has been
accomplished by designing the list processor to accept the data organiza-
tion parameters as data prepared and supplied by the user. These parameters
are further discussed in Chapter VII.
The utility of a list processor lies mainly in the usefulness of
its operations. We shall call the subprograms providing these operations
"verbs." Verbs have been provided for obtaining and releasing list
entries and for making and breaking the links between list entries.
These verbs form the nucleus of the structure manipulation power of the
list processor. Another set of verbs provides the capability for trans-
ferring information to or from a list entry. Of great utility is the
ability to search a list for the occurrence of a particular set of data
values. A verb providing this service is also included in the list
processor.
III.l.b. Files
Figure 3 is an illustration of a typical hierarchical file. The
arbitrariness of structure present in lists has, for files, been reduced
to the specification of the number of levels in the hierarchy. Rapid
access to randomly selected entries at any level is the incentive for the
sacrifice of arbitrariness in structure. Owing to the sequential storage
of file entries in on-line memory, large contiguous blocks of memory
allocation may be required. It is, therefore, vital that the file system
utilize core effectively. However, the sequential nature of the file
entries makes possible the transfer of file data to mass memory devices.
This enables the release of on-line memory normally occupied by files
during problem solution phases not relying on the file data. Further,
even when file data is required, it is possible to retrieve only portions
of a file.
SA file entry is essentially the same as a list entry, except that
the explicit specification of links, as in the list entry, is absent.
The organization of data within a file entry is accomplished identically
as for a list entry. Thus, the file entry shares the same arbitrariness
of data organization provided for the list entry.
Many fewer verbs need be provided for file manipulations than for
lists since link manipulations are not required. In fact, three verbs
are sufficient. One verb is required to provide a file entry and
transfer data into it. A second verb provides the capability for retriev-
al of data from a file entry. Finally, the third verb permits the
searching of a file for a particular set of data values.
III.l.c. Memory Allocation
The particular memory allocation strategy adopted for GENDER
continues the theme of flexibility and arbitrariness. Each phase of
15
problem solving is allocated memory only as it is required. An accounting
mechanism keeps track of the memory assigned to each phase. This mechan-
ism permits the release of memory assigned to a particular phase once its
task is complete. The released memory may then be reallocated to another
phase of problem solving. The allocation, release and re-allocation
capabilities give memory the fluid character essential to providing a
time varying memory distribution in response to the time varying demands
of the solution phases.
The dynamic allocation of memory provides an opportunity for
fracturing memory into small isolated segments. This eventually would
prevent the servicing of a request for a large continuous allocation
of memory. Though procedures such as garbage collection have been
proposed for reclaiming the isolated memory, these procedures have not
been used for GENDER. The need for large blocks of memory has been
avoided by designing the file system so as to utilize only reasonably
sized continuous blocks of memory.
III.2. Special Data Structures
Networks Since the algorithms for solution procedure development
in many instances specify rearrangements of the solution procedure, a list
structure was adopted. Hence, the solution procedure became known as the
GENDER list. During the course of evaluation of the entries on the GENDER
list via the interpreter, an anomaly may be encountered necessitating
reanalysis of a portion of the GENDER list. In fact, all of the GENDER
list from the anomaly to the list end is subject to reanalysis. Consider
the following set of equations.
Y_(,u) = o
(1)
(z,v) = 0
If reanalysis of Y is required, Z would be subject to reanalysis,
although reanalysis of Z would result in no change. Instead of the list
structure, suppose a structure is substituted in which each entry precedes
only those entries that it influences. Then, Y and Z would appear on
parallel paths since they are independent. This structure is a network,
and was adopted for the solution procedure (which is still called the
GENDER list).
Sparse Incidence Matrices (SIMs) Incidence matrices provide a
convenient and lucid medium to express the problem to which an algorithm
is to be applied. In fact, many algorithms for solution procedure gener-
ation are most easily explained in terms of their effect on incidence
matrices. This is to suggest that incidence matrices may be a natural
and effective tool in the implementation of these algorithms. Unfortun-
ately, matrices are relatively expensive in terms of memory requirements.
This is particularly damaging in light of the intention to construct
GENDER so as to be applicable to large scale problems. In chemical
engineering, and perhaps in other disciplines as well, most equations
contain only a small number of variables compared to the total number
of variables in the problem. The average incidence for several chemical
engineering applications examined was approximately three to four variables
per equation. The majority of the incidence matrix elements are null. By
considering the matrix elements to be list entries, and by disregarding
all null elements, the use of incidence matrices is made.possible without
the disadvantage of excessive memory requirements. The elements form the
orthogonal list structure shown previously in Figure 2. For example,
if an equation contained only two variables, then the row would be composed
of only two list entries. The columns represent variables so that each
,of the two row list entries are also members of the orthogonal column
lists as well.
18
III.2.a. Networks
A network is an extension of the forward-backward list structure
to permit each list entry more than a single forward and a single back-
ward link. The capacity for parallelism is furnished by auxiliary lists
called divergers. All list entries other than diverger entries are
referred to as network nodes. Figure 4 depicts a node followed by three
parallel nodes.
Networks have virtually all of the attributes associated with a
forward-backward list structure. The arbitrariness of data organization
within the nodes is somewhat restricted by the requirement that certain
data entries be present as an integral part of the structure. Highly
parallel structures may suffer with respect to access times as a result
of large divergers.
The network verbs implemented are essentially concerned with the
peculiarities of network linkages. The list processing verbs for data
transfer serve equally well for nodes as for list entries. Subprograms
are provided for the connection and for the separation of nodes. A
complementary pair of function subprograms permits the extraction of
linkage data, one for the forward link and one for the backward link.
The policy of providing the capability for searching list structures is
continued here for networks. Finally, a rather special verb is provided
enabling an orderly, predictable tracing from node to node through a
network. This verb, a function called NEXT, has proven to be of consider-
able utility.
III.2.b. Sparse Incidence Matrices
Sparse incidence matrices are actually a hybrid of the orthogonal
list and of the file data structures. Figure 5 illustrates a sparse
node node node
Figure 4. A Simple Network.
.4
'U
0
H
0
U
incidence matrix consisting of two equations and three variables. The
files required for the sparse incidence matrix are termed ordinates. Each
file entry contains a pointer to a row or column of the matrix. For simplic-
ity, when reference is made in general to a row or column the term vector
will be employed.
Even with the inclusion of the two ordinates, the memory conservation
remains substantial. Consider a system of 1,000 equation in which 1,000
variables are incident. The resulting incidence matrix must contain no
fewer than 1,000,000 words of memory if stored as a standard two dimen-
sion array. Allowing three words per non-null element (for the horizontal
link, vertical link and data item), the elements of a typical sparse
incidence matrix would consume only about 9,000 words. The ordinates
and supporting data structures would require at most approximately 30,000
words. Thus, the memory savings afforded by the sparse incidence matrix
exceeds 960,000 words over the simple two dimensional array. If the
ability to pack information into list and file entries is utilized to
its fullest extent, the size of the sparse incidence matrix may be reduced
by as much as 50% depending upon the word length. The penalty for
memory conservation is increased access time. A matrix vector may be
accessed randomly and relatively quickly by virtue of the ordinates.
Reaching a particular element list entry, however, can be accomplished
only by tracing the selected vector from element to element until the
desired element is accessed.
The nature of the subprograms provided for the manipulation of
sparse incidence matrices are rather specific in character. Each sub-
routine is designed to fulfill the requirement by one or more of the
algorithms for a certain sparse incidence matrix operation.
111.3. Implementation Details
The implementation of the data handling facilities discussed in
Sections III.1 and III.2 has been partitioned into four program packages.
COAST is the name given to the program set providing the core allocation
and list processing capabilities. The subroutines furnishing the file
manipulations constitute the REMOTE system. NETPAC and SIMPAC are
respectively the network and the sparse incidence matrix program sets.
Each of these packages are discussed in detail in the subsections to
follow.
The remainder of Chapter III may be omitted by any reader not
requiring a knowledge of the programming details. A knowledge of
these details is not expected to be generally advantageous except to those
readers planning additions to the algorithm library, alterations to an
existing algorithm, or alterations to the GENDER facilities.
* III.3.a. COAST
To achieve machine independence, FORTRAN was selected as the program-
ming medium. To provide the space required for the development of list
structures, a COMMON declaration was employed to reserve a vector named
ALLOC. The length of ALLOC is a user specified parameter. The position
of a word of memory within ALLOC is referred to as the absolute address,
or simply address, of that word. For example, the fifth ALLOC word has
an address of five.
The memory allocation strategy adopted for GENDER is the buddy system.
To reduce the administrative effort required in supervising the allocation
of ALLOC to user programs, ALLOC is partitioned into multi-word segments.
Segment size is also an adjustable parameter. To permit the allocation
of space in sizes other than a single segment, consecutive segments may
be combined to form buddies. In fact, two contiguous blocks of memory
of equal size may be combined to form a buddy. Requests for space are
satisfied by supplying the smallest buddy satisfying the request. Should
only a larger than necessary buddy be available, a request for a lesser
amount of space may be satisfied by first fracturing (splitting into two
parts) the larger buddy. All of the available buddies of each size are
linked together forming an available space list for each buddy size. The
operations necessary for memory management are provided by the subprograms
C8COMB and C8GIVE.
In order to facilitate the release of ALLOC segments by user
programs, an accounting system is necessary. The accounting device
adopted is a mask. Each bit of the mask represents an ALLOC segment. A
set bit in a user's mask indicates that the corresponding segment is
assigned to that user. Each user program is assigned a user mask on its
initial request for space. Figure 6 is an illustration of a user mask.
A similar mask, established before allocation commences, is provided to
record segments released by user programs. Whenever the buddy available
space lists become sufficiently depleted that a request for core cannot
be honored, then the space represented by the return mask is re-buddied
and returned to the available space lists. This strategy eliminates
execution of the costly re-buddying process unless it is absolutely
necessary. CORN is the program furnished to permit the release of ALLOC
segments by a user. The program LIST accomplishes the update of a user
mask as memory segments are made available to a user program.
A user program requestsspace via a five word vector called a space
utilization record (SPUR). The first word of the vector contains the
address of the user mask. For the initial space request, this word must
contain the integer zero. The second word will contain the pointer to
-I
-
/ /,/f1$#'
C0)
cC 0
*/ U
Ns.
/ T\ -
ril
El)
_\
\ j1
/ .-'I--\
I
the space provided during allocation. The third and fourth vector
components are respectively the quantity and the size in words of the
requested list entries. The list entries are manufactured from a
buddy of the appropriate size and provided to the user program as an
available space list. The last component of the SPUR indicates the
list type, a subject to be considered later in this section. Several
programs requiring ALLOC space may share a SPUR vector, thereby sharing
the allocated core.
Information is contained within list entries in data fields. A
data field consists of either all or a portion of a list entry word.
Data fields consisting of only a few bits are usually referred to as
flags. A data field appearing in one or more consecutive list entry
words constitutes a data type. The collection of all data types
associated with the entries of a particular list structure constitutes
a list type. The quantitative specification of a data type requires four
parameters. The first two delimit the bounds of the data type within a
list entry. For example, if these parameters are valued at 1 and at 4,
the data fields of this data type appear in words 1 through 4 of the
list entry inclusively. The second pair of parameters delimits the
bounds of the data field within a list entry word. The third word,
called a shift, is the integer by which a list entry must be divided
to place the first bit of the data field in bit position 1 of the
dividend. For instance, if the data field begins in bit position 3,
dividing by a shift of 4 will translate the field the required two
positions. The last parameter is a field mask comprising set bits
indicating the bit pattern of the data field. The field mask should
be right justified to the first bit position of its single word. The
collection of all sets of these four parameter vectors constitutes
the list entry definition (LEND) specifying the organization of data
fields within the list entries of a list type. Thus, a LEND is required
for each data type. COAST utilizes the subroutine COIN to accept the
LEND's from a user as data. COIN is the only COAST routine requiring
data.
In order to accomplish the transfer of information to or from
the data fields within a list entry, the data fields involved in the
transfer operation must be uniquely identified. It is to be permitted
that a single transfer operation may involve many data fields from
many different data types. Thus, the transfer operation requires two
vectors, one reserved for the values of the data fields and a second to
identify the data fields. The latter vector consists of three words per
data type involved in the transfer, plus an additional word specifying
the number of data types. Each three word set comprises a data type,
the'occurrence of the first field for transfer and the occurrence of the
last field for transfer. For example, a three word set (4, 2, 7)
indicates that the data type is 4, the first field transferred will be
the second and the last field transferred will be the seventh. The
transfer for data type 4 will consume six words of the value vector.
All of the COAST verbs performing data transfer operations employ the
vectors described here, except COPY. COPY performs the direct list entry
to list entry transfer of information, and does not require a vector for
value storage.
The first occurrence in a list entry of data type 1 was selected
for the forward link. Similarly, the first occurrence of data type
2 is reserved for the backward link when backward links are required.
Technically, links are simply data fields and may be manipulated as data
fields using the data transfer subprograms. The convention adopted
regarding data types for links permits the creation of faster, more
convenient verbs specific to link manipulations.
It is the nature of the forward-only list to prohibit the access
to the predecessor of a list entry. The absence of the backward link
makes necessary special handling of operations involving the removal
of entries from a forward-only list. In particular, if the last entry
is to be removed, it is not possible to set the forward link in its
predecessor to zero since the address of the predecessor is unknown.
In this situation, the last list entry becomes a private termination
cell, PTC, (Cooper and Whitfield, 1962/3) and is fitted with a forward
link of 1. Thus, a unity forward link is the identifying characteristic
of a PTC. PTC's remain linked into the list but are not otherwise an
active part of the list. If the list entry is to be removed from a
forward-only list, the entry itself cannot be physically removed as its
precursor in the list (which points to it) is not known. However,
by copying the entire contents of the list entry following the one
to be removed into the list entry to be removed, one has created
the effect of removing the chosen entry. The list entry following is
then deleted from the list and added to the user's available space
list.
Table 1 presents a list of the COAST verbs which are the primary
list processing subroutines. Omitted from Table 1 are those COAST
programs which are not of direct utility to the programmer of a list
processing application. Three verbs included in the table require
further attention.
LOCATE, as its name implies, searches a list for the occurrence
of a specified pattern of data field values. The data specification
vector employed in data transfer operations provides LOCATE with the
28
4-'
H- 4-
M O
C) a) 1
a) P4H
Uo co 4> C
m cu H p
co H H H a 41
E *H c r-- E
r O 4-' C I0
a) c *ri 4 p-
(0 U l 0> U- EU
(3 ( r H r K (
m (n 0 m
0) 3 CU ,) U) l: 'CU p) Cw
CU 0 Q) *H Cr H > CU
3 4-' E W H *H 4-' 0
UO CO C 4-' ) )
Pr4 0 :- .H ) 4 4 H E
a) -i ro (v -P 41
H c ) CU H n 0 O rl- H
U) H CU cUi CU >I C) H
Q < 'w q-4 4, 4-!' 0 Cq
- 4-' 'u) C 0 0CU C + 4-
co0 Mw U H ) i C 'o CU n U)
2 -1 U r-l 'H A cu ) a) c 4-' *H r- C
0 0 A m0
w4 > H >) 'U CU C C CU C 04 C i p H
CU 'H $4 fl tC4H > > cU CU a) ui C CU
E .- 'U a) > C 4 4-
<. H o -' *m- CU1 4 p p
0- < ) CV $4 a) C) z) (U)$4X4-'U) u)C
CD CD w co 0 0 0 0r-l
u L 4 -I P
(U
0 0 Cr
oU ) CU $4 co)
4-) N co *z H 4-
CU *H CU CU C(3 )
Z H C cu '
m C 4 CUu
C *H CU *H
(-) -l i--
identification of the data fields to be inspected. LOCATE permits two
modes of operation which are referred to by the descriptors "AND" and
"OR". In the "AND" mode, LOCATE is directed to accept as a match the
first list entry found to contain the specified data pattern in its
entirety. The "OR" mode relaxes this requirement for matching somewhat.
In the "OR" mode, the data pattern is partitioned according to data
type. The partitions are compared individually to their respective
data fields of a list entry. The search is successful when a list
entry is encountered possessing the fields of a data type which match
the corresponding data value partition. In either mode, the search may
be specified to proceed in the forward direction, in the backward direc-
tion or specified to encompass the entire list (accessible from the
specified starting point).
Like LOCATE, the verbs PUSH and POPUP involve both links and
data, but unlike LOCATE result in alterations to the list structure.
The.PUSH operation is pictorially presented in Figures 7.
Although the illustrations are based on a forward-backward list, PUSH
operates essentially the same on forward-only lists with two exceptions.
Owing to the absence of the backward link, the push-up mode and the
insert-before mode cannot be performed per se. If the position of the
data on the list is the important consideration and not the address of
the particular list entry containing the data, then the insert-after
mode and the push-down mode may be taken as the equivalent of the
push up and insert before modes.respectively. The verb POPUP is
essentially the inverse of the verb PUSH. Figure 8 shows the POPUP
operation in the forward direction. In the case of forward-backward
lists, POPUP is symmetrical and will operate equally well in the backward
0
:3
'04Q
'o
r.0
.r
Co
:1
00r
31
o
I I )
k :
)O 4
*)C o m c
32
a -?f a
o
8
C b"l
--
a+
E-i
direction. Thus, if POPUP from C to B (according to the backward link)
is specified, the entries from B through C in the forward sense will
be transferred to the user available space list. The data source will
be list entry C. In the example of Figure 8, if the operand C were
replaced by Q, POPUP would remove from the list all entries from B to
the end of the list. For a forward only list, B would of course
become a PTC. Again, the symmetry of POPUP allows this mode of operation
for forward-backward linked lists.
As stated at the beginning of this section, machine independence
was a goal of the GENDER system design. Unfortunately, the logical
operations "AND", "OR" and "exclusive OR" are required for the mask
manipulation operations. These logical operations cannot be conveniently
provided directly in FORTRAN, necessitating recourse to assembly language.
These operations are basic machine instructions and required little
effort to prepare for the IBM-360 or 370. This is expected to be true
for all other machines as well.
* III.3.b. REMOTE
Avoidance of dependency of the hierarchical file
storage system, REMOTE, on large continuous partitions of the ALLOC
vector was a paramount consideration in the design of REMOTE. The
design is to require file storage in smaller ALLOC partitions, which
are somehow connected together to give the illusion of being contiguous.
As a further constraint, the linkage mechanism must not seriously
interfere with the intention to permit file storage and retrieval form
mass memory.
Figure 9 shows the structure *adopted for use by REMOTE. The
catalogue consists of a forward-backward linked list of ALLOC segments
(which could contain, say, 32 or 64 words each). The forward and
S 34
register 1
register 2
Figure 9. File Structure.
catalogue
record 1
record 2
backward links are respectively the first and second words of each
catalogue segment. All other catalogue segment words may contain the
address of a register. A register is identical in structure to the
catalogue. Each register segment word (excluding the first and second)
may contain the address of a record segment. The set of all record
segments referenced by a single register constitutes a record. It is
customary, since a one-to-one correspondence exists between registers
and records, to say that the catalogue refers to records.
It is in the record segments that the files are stored. Record
segments may be any desired multiple of the ALLOC segment size. The
size is specified via the SPUR vector introduced in the preceding section.
The continuity of a record (or should we say apparent continuity) is
achieved by virtue of its register. The absolute addresses of all record
segments participating in file storage are kept in the register segments.
Zero contents of a register segment word indicate that the corresponding
record segment has not yet been requisitioned from ALLOC. A negative
integer stored in a register segment word indicates that the contents
of the corresponding record segment are currently resident on mass
memory.
Let us briefly review the objectives and constraints noted in the
first paragraph of this section before pursuing the features permitting
the hierarchical character of file storage. The use of record segments
certainly satisfies the stipulation of eliminating any dependence of
the file system on large partitions of ALLOC. The registers provide
the linkage mechanism for the record segments which is thus segregated
from the records and interference with mass memory operations is
therefore minimal. Further, the linkage mechanism seems to satisfy
the requirement to provide rapid random access and gives the record
apparent continuity to the user. It is important to note, however,
that these objectives were met without creating a support structure
that would require a large amount of memory. For example, consider
an ALLOC segment to be 32 words and a record segment to be 64 words.
A catalogue segment and a register segment, a total of 64 words, can
hold the addresses for up to 30 record segments or a total of 1920
record words. Thus, the support structure (catalogue and registers)
only consumes slightly over 3% of the total memory allocated to a file
storage application.
The responsibility for the hierarchical character of the file
storage system belongs to the directory concept. Consider, if you
will, a file consisting of single word file entries. Into each file
entry place the address of a file. This then is the notion of a
directory. It is a file which refers to subsequent files. One or more
of these subsequent files may also be a directory.giving rise to the
hierarchical property. However, care must be exercised with respect to
the addresses employed in the directory entries. If absolute addresses
are used, the file system would become dependent upon the particular
ALLOC buddies serving as record segments. This would seriously impair
the use of mass memory. An addressing scheme independent of the absolute
addresses of the record segments is required; a relative addressing
scheme is used.
The relative address of a particular word in a record is simply
the integer identifying its sequential position within the record. That
is, the ninth word of a record has for its relative address the integer
9. (We shall adopt the convention that the word "address" appearing
without the modifier relative will be taken to mean "absolute address.")
The absolute address is readily calculated from the relative address
by using the register. If a record segment has 64 words in it then
relative address 132 is in the third record segment, word 4. The
absolute address of the third record segment is kept as the third entry
in the register.
When preparing to add a new file to a record already containing
one or more files, it is necessary to know where the last file ends.
To this end, the first word of each record (the word in relative address
1) is reserved for the relative address of the first empty word in the
record. It is also advantageous, when manipulating a particular file
within a record, to know how many file entries constitute the file and
how mary words each file entry occupies. A special file entry appears
as the first entry of each file containing these two parameters. We
shall call this file entry the parameter entry of a file.
Figure 10 is an example of the contents of a record. In this
example, 16 words are occupied by files, so that the first record word
contains 17. The first file commences in word 2 of the record with its
parameter entry; this special entry is illustrated as occupying two
words. It indicates that the first file contains two single word
entries, whose contents here are 6 and 11. In particular, this first
file is a directory and its entries contain the relative addresses of
two other files. For instance, in word 11 we find the parameter entry
of a file composed of two file entries of two words each.
Quite naturally, the question arises, as to how access to a partic-
ular file entry may be achieved. Access to a particular file entry
entails selecting the appropriate record (ie, the address of its register)
from the catalogue, and then making selections from each directory to
reach the desired file. Once having accessed the file, by using the
word number
(Relative Address) record Relative address of next
unused entry
1 17
2 Parameter
3 1 Entry directory
F-- 6
5 11
S3 Parameter
7 1 Entry File 1
9
11 2 Parameter
2
Entry
13 File 2
15
17
Figure 10. A Record.
number of words per file entry, reaching any particular file entry has
been reduced to a problem primarily in counting.
The required selections to be made from the catalogue and
directories are specified by a vector, LISTER. The first word of
LISTER is its dimension, or in other words one plus the number of
choices. The record to be selected from the catalogue is indicated in
the second LISTER word. If the dimension of LISTER is N, then the
next (N-3) components of LISTER specify selections from the directory
hierarchy. (There is no requirement that directories need be employed
if a record is to contain only a single file.) Finally, the last LISTER
component, the Nth, identifies the particular entry from the file
selected. For example, if the record shown in Figure 10 is record
number 10, then the LISTER vector (4, 10, 2, 1) will result in the
access of the file entry commencing at relative address 13. (Word 1
indicates the length of the LISTER vector which is 4. The 10 says the
address of the register for this record is in the tenth entry in the
catalogue. The 2 says we are to go to entry 2 of the initial directory
which points us to file 2. The 1 indicates we want the first word of
the file which is word 13.)
The LISTER vector provides sufficient information for accessing
an entry in an existing file, as in the transfer of data from a file
entry. When data is to be stored in a file which until this point has
not existed, supplemental information is required about the size of
any new directories, the size of the new file and the number of words
per file entry. This supplemental information is required to insure
that sufficient space is reserved (since later entries may be added)
for each new directory and file added to a record. This information
is provided by a second vector supplied by the user, the length of which
is 2+ the number of directories. If LISTER(l) is N, then the
number of components in the auxiliary vector is (N-l). Note that it is
necessary only to provide the number of entries in each directory and
not also the directory entry size since by convention the directory entry
size is permanently fixed at unity. Directory sizes account for the
first (N-3) components of the auxiliary vector. The remaining two
components are respectively the number of file entries and the file
entry size. The supplemental information is of utility only for those
directories which have not previously been established. Components
corresponding to existing directories are ignored.
Consider a file processing scheme involving the access of many
entries on a particular file. The catalogue and directory selections,
if repeated for each file entry, would constitute needless repetition
since access of the same file would be the result each time the selection
sequence is executed. Thus, it is desirable to provide the means of
reaching another entry in a file from a file entry that has already
been accessed. The move relative to a given file entry to reach another
is specified by providing the distance (i.e. number of file entries) of
the move and the direction of the move. The LISTER vector is the vector
for this information. LISTER(l) is set to 1, indicating the move-relative
mode. LISTER(2) contains the displacement as a signed integer, with
positive and negative values indicating forward and backward displacements
respectively. The LISTER vector (1, 1) would access word 14 of the
previous example. Repeating with (1, 1) wbuld then accessword 15, and
so forth.
If movement relative to a particular file entry is to be accomplish-
ed, one must know exactly the location of that file entry. Unfortunately,
knowing the location of a file entry involves more than simply knowing
its absolute or relative addresses, though these addresses are certainly
essential. It is also necessary to have available theaddress of the
record segment, the sequence number in the record of the.record segment,
the register segment address and the particular record segment word
referencing the record segment. This is by no means a complete list,
for many other parameters have been found to be of utility in expressing
positions within files or of utility in executing the relative move
itself. To provide a storage medium for these parameters, a vector,
JCLOAD, has been created. This vector consists of 30 components, each
of which is described by the comments to program C4ADRS in Appendix
A. For most users it will be sufficient to know that the vector exists
and is provided by the user, and that user changes to the vector are
prohibited if the relative movement option is to be exercised.
As a result of the sequential appearance of file entries within
the files, no verbs for link manipulations are required. In fact, the
user is provided with only three verbs for performing manipulations of
file storage. These are STORE to store data in a file entry, FETCH
to retrieve a copy of data in a file entry, and FIND to locate a file
entry containing a particular data value pattern. The specification of
the data fields to participate in the data transfer operations is
accomplished identically as in the description in the preceding section
for COAST. REMOTE does require certain restrictions with respect to
data types. Table 2 gives the data types, with their LEND components,
which are necessary. Beyond these four data types, the user is free
to organize the LEND in any convenient fashion. The V in Table 2
indicates locations where the user may exercise choice.
One eventuality of file storage has until now been neglected.
It is possible that a file entry occupying several ALLOC words may not
.,4
0
,)
0
o,
m
NC
*O
H
0
41
-C
04-
tH
0)
0
4E1
tkl
0 0. > >
o 4 >"
o o. o
H l Cl ) '~I
o
'0
a
( C
: C
exactly fit at the end of a record segment. Two policies are possible.
One, the file entries are required to be continuous, risking the waste
of a few words per record segment. Two, the partitioning of file
entries between record segments is to be allowed. If the file entries
are not small with respect to record segment size, the latter policy
is clearly more desirable with respect to efficient use of memory.
Since the sizes of file entries and of record segments are choices
permitted to the user, and since the restriction of the user's freedom
to organize a file structure was to be minimized, the partitioning of
file entries is allowed by REMOTE. As with the JCLOAD vector, the
user need not be aware of file entry partitioning to successfully employ
REMOTE. The user may prevent partitioning by a judicious choice of the
record segment size or of the number of words required by the parameter
file entry initiating the file. This latter play is implemented by the
word index selection in the LEND component for data type 4. The parameter
entry (See Figure 10) is structured with data type 4 concluding the
entry. Thus, by adjusting the number of fields subtended by data type
4, it is possible to regulate the size of the parameter entry without
otherwise disturbing its contents.
* III.3.c. NETPAC
The basic network structure has been discussed in Section II.2.a.
As noted there, certain data fields are essential to the network structure.
That is, the links alone are insufficient to adequately define a network
structure.
Table 3 is a list of the data fields augmenting'the link fields.
Of these additional fields, only data type 3 and the first two fields
of data type 5 are ofanessential nature. In order to differentiate
nodes from diverger entries, some unambiguous feature must be provided
CO
(U
CoC
0-)
M
x
oc
S) O
z
irz
t'
-P
Co
0 V
Cn Co Co
,.) Co 1
'H 0=
Co
444
t0
(is
1:z
*H Co
0)
Co
4-'
1o
(=
to
4 b0o eC
Co C *H V
t *r > 00
$4 > to C 0
> m) H
S4J 4-1
41 0 z r4
Co Co .Co tt o
S. 4-' q
C 4 C *H3
$4 m Co 0;
to 4-' C0 0 $4
00 0 Co 0 0
Co : :
0- $4
*rl C (D O 1 r1
*H C CO 0 0
4 ,M O V $4
VH 0 0 0 0
C ,
tH 444 Q0)
)0
4-1
Co
co
,4
4-.
4o
CO
H r ,
Cr
03
HH >r l,
1C
I
to each. This feature is a flag, which is zero for a diverger entry.
The first field of data type 3 serves as the flag. The + symbol in the
LEND for data type 3 indicates that the mask may encompass more than
a single bit. The first two fields of data type 5 contain the number
of paths leaving a node in each direction. These fields are absent
from diverger entries.
The remaining data fields listed in Table 3 are not essential to
the network structure, but are required if the network is to be traced
using the verb NEXT.
The trace strategy employed is somewhat involved. Each trace is
assigned a unique trace key. We shall call this key the master trace
key. The purpose of the key is to flag the nodes which have been encoun-
tered by the trace so they may be distinguished from those which have
not yet been reached. This is necessary since several paths may lead to
the same node. Upon the first encounter of a node,which is indicated by
its trace key being unequal to the master trace key, the trace key is set
equal to the master key and the counter in field 3 of data type 5 is
set to unity. Successive encounters with this node will be indicated by
the trace key matching the master key. The counter is incremented by one
at each encounter of the node. When the counter matches the first field
of data type 5 for a backward trace or the second field of data type 5
for a forward trace, a node has truly been "reached." Further, it is
only upon meeting this criterion that the links leading from a node in
the direction of trace may be examined.
The trace strategy was dictated primarily by the needs of the
interpreter in evaluating the components of a solution procedure. No
component may be evaluated until all preceding components have been
evaluated. That is, no node is considered as reached until all paths
leading into the node have been followed. Figures 11 through lle
illustrate the steps in tracing a simple network. The data fields
appear in the nodes shown in the order of their occurrence in Table 3.
For simplicity, each is assumed to occupy an entire word. An appears
beside each node as it is reached.
Let us consider Figure llc. The count does not match the number
of backward paths. This causes the trace procedure to backtrack and
consider the path parallel to B. For more complex networks, it is
necessary to distinguish the parallel paths yet to be considered from
those which have already been inspected. This distinction between paths
is facilitated by an auxiliary push-down list. Each entry on this list
points to a diverger entry. These diverger entries are the first on
their respective divergers which have not yet participated in the trace.
The top member of this list always points to the last parallel path
encountered and the first to trace when the current path terminates.
It may be noted that the sub-nodal network trace key played no
part in the trace illustration. This trace key is the master key for
networks existing as auxiliaries to network nodes. The import of the
network within a network will be pursued in Chapter IV. When the
sub-nodal networks are present in a network structure, the trace pro-
cedure accounts for their presence by entering each auxiliary network
just prior to advancing to the next node on the main list. For
example, if node A of the trace example presented in Figures 11 through
lle possesses a sub-nodal network, node B is not considered to directly
follow A in the network trace. Rather, the first node of the sub-nodal
network follows A in the trace. A unity identification flag identifies
nodes possessing sub-nodal networks. All nodes possessing flags greater
than unity are not permitted sub-nodal networks.
Start
node
Forward
Diverger
Parallel
Paths
End
Node
Backward
Diverger
Figure 11. Trace (Start).
Figure lla. Trace (Step 1).
Figure lib. Trace (Step 2).
Figure llc Trace (Step 3 no node selected).
Figure d. Trace (Step 4).
Figure lld. Trace (Step 4).
Figure lle. Trace (Completed).
As a result of networks within networks, the auxiliary list
employed by the trace procedure must be complicated somewhat. The paths
yet to be inspected at each level in the network must be segregated
from those of all other levels. This segregation is accomplished by a
list composed of one entry per network level. Each entry points to a
list indicating the remaining parallel paths on a particular level.
The manipulation of this auxiliary list structure is not required of
NETPAC users.
The subroutine NEXT is the NETPAC verb providing the trace
capability. NEXT requires only that the user indicate the address
of a current node and the value of the master trace key. NEXT performs
all of the network and auxiliary list manipulations necessary to provide
the user with the address of the next node in the trace sequence.
The COAST verbs require SPUR vectors to indicate the size of list
entries and the list type. In order for the NETPAC verbs to employ the
COAST verbs, it is necessary to provide a battery of SPUR vectors,
since many different sizes of list entries appear in the networks used
in GENDER. One SPUR is required for each list entry size. To satisfy
this requirement, a sequence of SPUR's graduated in sizes from a
single word list entry up to the largest possible list entry size are
stored in a continuous ALLOC partition. It is expected that this SPUR
block will typically be less than the ALLOC segment size.
Having the SPUR block only solves half the problem. To be able
to select the proper SPUR, one must know the sizes of the various list
entries constituting the network. A vector, which we shall call the
information block, contains this data. The values for each information
block component are provided as data by the user. Only three pair of
the 28 information block components are required by NETPAC. These pair
are components 8-9, 20-21 and 22-23, and are associated with networks
employing list types 2, 6 and 5 respectively. Networks have been
restricted to list types 2, 6 and 5 primarily as a programming conven-
ience since the use of NETPAC external to GENDER is doubtful. Information
block components 8, 20 and 22 indicate diverger entry sizes, while
components 9, 21 and 23 are node sizes. The identification flag
distinguishes nodes from diverger entries. Although more than one
type and size of node may appear in a network, NETPAC requires access
only to data types 1 through 5. Since every node contains these data
fields, the SPUR for any node will suffice NETPAC. For the user's
convenience, information block components are reserved for the sizes
of the other nodes permitted to list types 2 and 5. Discussion of the
remaining information block components is deferred to the particular
chapters to which they are relevant.
The information block introduced in the preceding paragraph resides
in ALLOC. The address of this block is recorded in the seventeenth
ALLOC word. Consequently, access to information block data is relatively
simple and the data is available to all GENDER subroutines sharing ALLOC.
It would seem advisable to make similar provisions for the SPUR block.
In fact, a vector, NIMBL, has been invented to contain the addresses
of the network and the SPUR block. NIMBL also contains the value of
the master trace key. The address of the NIMBL, thus, furnishes suffi-
cient data to permit the access and manipulation of a network.
Table 4 is a list of the NETPAC verbs. BREAK and COUPLE appropri-
ately adjust the path counters, as well as performing the necessary
link manipulations. One node to be separated from a second via BREAK
I
o 10
0a a
$ 'a
C S '
So '4 m4
0 a)
40 0 ,0 .0 a a
S 0 4
4 0 0 05
H 3 M c H
04 o o) +
( 0(
H 0 0 ZH
Z-
1- 0 co E-
maE 0 ; -i
.) 4 aozz
< ci $4 H H
E- u u CD P. w cu
1a C pn H 0C
must be specified by its absolute address. Although the second node
may also be specified by its absolute address, it may be designated by
reference to a path leading from the first node. Referring to Figure
11, node A may be separated from node C by providing BREAK with the
addresses of both A and C, or with the address of A and the integer 2
indicating the second diverger entry. The path specification mode is
available to both forward and backward directions. That is, A may
either precede or follow C. BREAK is designed to provide the calling
program with the path position if the addresses of both nodes are
specified, or with the address of the second node otherwise. This
feature has proven to be of use in the algebraic package, GALAP.
COUPLE requires the specification of the addresses of both nodes
to be connected and the specification of the path positions. While the
order of diverger entries is of little consequence to solution procedure
network, the arrangement of parallel paths is of considerable importance
in GALAP. Consequently, COUPLE has been designed to permit selective
path placement.
The verb SEARCH provides the capability to search a network for
a specified pattern of data values. The data values and the correspond-
ing data fields are provided to SEARCH identically as for the COAST
verb LOCATE. SEARCH employs NEXT in performing the network trace.
Networks possessing a single starting node and a single terminal node
may be readily searched in either direction. However, a network having
multiple terminal nodes cannot be completely searched in the backward
direction. The selection of a terminal node to serve as the initial
trace node excludes from the trace, at the very least, the other terminal
nodes.
* III.3.d. SIMPAC
Section III.2.b provided a glimpse at the sparse incidence matrix
structure. This section will further detail this most important data
structure.
The ordinates of an SIM (sparse incidence matrix) are applications
of REMOTE. However, this need not have been the case. The ordinates
might simply have been continuous partitions of ALLOC. An ordinate of
1,000 entries would require a maximum of approximately 9,000 words.
This would constitute a demand for a buddy unlikely to be available,
except when specially provided. The implementation of the ordinates
as REMOTE records eliminates the requirement for special supervision
of the ALLOC allocation mechanism. Further, the use of a record as an
ordinate entails no further sophistication of the REMOTE facilities.
Figure 12 shows a sparse incidence matrix with the ordinates
detailed as REMOTE records. This matrix is the same as the one in
Figure 5, but shown here in more detail. List type 3 has been selected
for the ordinates. A number of data fields are required for each
ordinate entry. For convenience, these fields are tabulated in Table
5. A few of these fields require further clarification. The status
flag is a relatively small field reserved for use by the solution
procedure generation algorithms discussed in Chapter V. When equal
to one, the dimension flag indicates the substitution of a pointer to
an auxiliary data block for the name in data type 9. The auxiliary
data block contains the name, dimensionality and index values as whole
word entries each. The name is more properly called a code name. The
code name uniquely identifies the occurrence of a function, ER, constraint
or variable in the data base SECEDE. SECEDE and the rationale of code
names is discussed in Chapter IV. Data type 8 has no significance for
row ordinate
tO
4 V
o 0
0 0 *H
0 U CQ
MCO
10 -i-
o4 H
rI
mU
H 0
"e
C4 4J p
*H
4-1O C0
'0
E
0
V
0
08
+
in '0 t- w
0' 0 N CO
1 H- H- -
'o
r4c
tr
O *-
ilJ
a .
o
4-1
tH
0
s4J
co
rlH
0
0 H
oco
the column ordinate entries, since all columns represent only variables.
The group mentioned in Table 5 for data type 8 will be pursued
subsequently in Chapter IV and is more properly called a protected
group. For our purposes in this section, it is sufficient to regard
a protected group and the ER (for external routine) simply as functions.
That is, they are functional relationships involving two or more
variables. If the multiple output flag is set to one, the output
assignment in data type 13 is replaced by a pointer to a list of output
assignments. Two words are required for each list entry. The first
contains the link and the second contains the output assignment. An
output assignment is simply a row or column number depending on whether
the ordinate pertains to columns or to rows respectively.
Each element of a sparse incidence matrix must also carry some
information in addition to the links. In particular, it is necessary
to-know to which column and row an element belongs. This information
is provided by fields reserved for the row and the column indices.
Other fields are required, but are of a more specialized nature. Table
6 summarizes the data fields appearing in each element. The field for
the sensitivity may be omitted at the user's option. The status flag
and output selection cost are required for the output assignment and
other algorithms. List type 4 is reserved for the SIM elements.
The 28 component information block introduced in the preceding
section contains components pertinent to the SIM. Table 7 indicates
the information block partition dealing with the SIM.
As in the case of networks, a SPUR block is essential in construct-
ing and performing manipulations on an SIM. The SPUR's required
correspond to LOAD vector size (30 words), the element size, ordinate
i- -
10
02
4
4H CO *E
0 4
g '- CO
* > H C
O 0 0 H
> r
+
>> >>>
Hl 'c cC -, LO- so L
02
CO
4-'
CO
i?
E
'41
Co
M
Cl)
'! '0
g- .,-
22
CO
02
(-1
'0
*H
CO
oJ
CO
4-
4-
4-.
0C 'U
ri 0
o3
O
4-
0.2C
Srl f
4J
.a
CoC
CO
C-1
0)
o
0c
C w
a r
0
0
0
S P4
o
0
4
cc
P-
C5
0
N
0 ,*H
o
rO,
* S
0 H
P
P 0>
o Z u
0)
0 o
a)
0) *0
c o
0 0
CO
o po
a)
Hr r- r-l
segment size and list ent-iy sizes from a single word up to the largest
required for an auxiliary data block. This largest list entry size is
determined as (2 + maximum dimensionality). The maximum dimensionality
is contained in the fifteenth information block component. The
individual SPUR's appear in the SPUR block in the order of their
enumeration above. The point of reference in the SPUR block was selected
as the sixteenth word of the block. That is, the address used to
access the SPUR block is the first word of the SPUR for a single word
list entry. Decrementing this address by five accesses the SPUR for
an ordinate segment.
Not only has the SPUR block been adapted from NETPAC, the SIMBL is
not unlike the NIMBL. The first two words point respectively to the
column catalogue and the row catalogue. The third SIMBL word points
to the SPUR block. The description of the SIM structure in detail is
completed by stating that the address of the LOAD vectors are contained
in the catalogues. That is, the address of the LOAD vector for the
row ordinate appears in the second catalogue word.
It is permissible for an SIM to be equipped with more than a
single row and a single column ordinate. Working.or temporary ordinates
are frequently utilized by the solution procedure generation algorithms.
Because of the inclusion of the LOAD vector addresses in the catalogues,
all ordinates are odd numbered REMOTE records.
The majority of the SIM verbs are specialized in nature, dealing
with a single, generally repetitive SIM operation. The SIM verbs are
listed in Table 8. The SIM generator, SIMGEN, performs a great deal
more than a simple SIM manipulation. SIMGEN uses the list of functions,
ER's, etc. belonging to a partition of the solution procedure (called
r-i
0 H
OH
0
010
u O
0t
0
0o
m (O
A0
0
0
ma
Tl 0
So
0 +0
co
ma' C
'0 0
04-' r
00~
H~O
4-
o
0
aH
0
Ik
0
M 4
0
0
4.
0
4-i
C
0 0
o o
.0r1
c '
U)
a)
0
0
H
f
41
0
- 0
cn
CD
0
C,0
0
0
e
41
cUu
O
00
0
m >
C
00
l
r3 0
0 U
41 0
*r4 0
!H o
(0
0) 0n
U
0-l
01
*H 0
'0 4
0I
4-l'
0 '
65
a group) for which further analysis is required as the basis for SIM
generation. Each functional relationship is assigned a row in the
order of occurrence in the group. SECEDE furnishes SIMGEN with the
incidence and output assignment cost data. SECEDE is described in
Chapter IV. In addition to structuring the SIM, SIMGEN also initializes
the row, column and element status flags at zero. The utility of the
SIMPAC verbs will become more obvious in Chapter IV.
CHAPTER IV
DATA BASE
The information constituting a system of equations and the
associated solution procedure must be readily available. One approach
to the data base would have been the inclusion of all information
relative to an equation set within the solution procedure. As noted
in the proceeding chapter, the network structure was adopted for the
solution procedure for reasons of flexibility and ease of manipulation.
The concept of the unified data base would, during certain operations,
encumber the solution procedure with much more data than required. An
alternative approach involves providing the general information apart
from the specific information pertinent to the solution procedure.
IV.1. Service Module, SECEDE
The general information phase of the data base must at times augment
the information within the solution procedure. For instance, during
generation of a sparse incidence matrix the variables appearing in an
equation must be known. Since this information is not contained within
the solution procedure (as SIM generation is one of the few instances
when it is required), it must be extracted from the general information.
Further, since the equations on the solution procedure are subject to
re-ordering, it seems appropriate to require rapid random access to
the general information.
The file system, REMOTE, described in Chapter III not only fulfills
the requirement for rapid random access, but also permits the release
66
of ALLOC space by the transfer of data not currently required to mass
memory. The application of REMOTE to the storage of information
relative to an equation set is termed the service module (SECEDE).
.The organization of data within SECEDE required careful considera-
tion. First, the construction of a library of data relative to various
processing units is to be permitted. Second, the organization must
permit the deletion or inclusion of units from SECEDE. Finally, SECEDE
should permit the reorganization of the flowsheet (i.e.,connections
between units). All of these considerations are essential if the
employment of GENDER during the synthesis phase of design is to be
feasible. The first two requirements are satisfied by assigning each
unit to a separate record. The third requirement is satisfied by
restricting all of the information on stream connections to a single
record called the zeroth unit. Thus, reorganization of a flowsheet
would involve changes only to the zeroth unit unless additional units
or unit substitutions are involved as well.
It is, of course, not known a priori what position a unit, which
may be from a library, might occupy in the service module. This
necessitates a code name assignment scheme for the variables and
equations which will produce unique codes. The variables and equations
within each unit are sequentially assigned code numbers commencing with
unity. The unique code is developed by adding to the code number, as
assigned within the unit, the unit number multiplied by an arbitrarily
selected scale factor. For instance, variable 5 of unit 9 would be
known by the code 905 if the scale happens to be 100. The code 905
differentiates this particular variable from the fifth variable of all
other units.
67
IV.2. Solution Procedure, GENDER List
For the reasons noted in Chapter III, the solution procedure is
a network application. It is expected that many solution procedures
will involve cyclic calculations. The GENDER list must reflect the
existence of such cycles. Special nodes are provided, called groups,
which represent the occurrence of a special set of functional relation-
ships. These may be cyclic, or may be grouped because of other common
characteristics.
The group node appears in the network as a representation of the
group members. Membership within a group is indicated by the nodes
of a network called the group body. Each group contains the address of
its group body. Groups as well as equations, ER's and constraints may
belong to a group body. The group bodies give the GENDER list a
dimension of depth i.e., networks within networks.
The GENDER list must be a complete specification of the solution
procedure it represents. That is, the GENDER list must reflect decision
variable selection, output set assignment, precedence ordering, tear
variable selection, and selection of the method for resolving cyclic
calculations. Data fields and/or auxiliary lists are provided to store
all of the foregoing information with the exception of the precedence
order. The precedence order is reflected by the arrangement of the
nodes on the GENDER list.
IV.3. Input/Output Facilities
The initial point for a GENDER list is generally expected to be
the crude GENDER list generated by a program called CUDGEL. Each
equation, ER and constraint is represented by an entry on the crude
GENDER list, but missing are the details and auxiliary lists necessary
for a complete solution procedure specification. Though this may be
69
the usual starting point, it will not always be most convenient. For
instance, a solution procedure might be completely developed, but
interpretation prohibited by the lack of a value for an algorithm
selected decision variable. For operation in a batch machine environ-
ment, this eventuality would cause the effort of analysis to be wasted
unless recovery facilities are provided. While one obvious solution is
to require estimates for all variables prior to initiating analysis to
prevent the development of this particular situation, an inordinate
amount of effort would be required from the user. This is but one
instance of when an analysis might be wasted. Others exist, and
enumerating precautions against all is unlikely. The recovery mechanism
has been incorporated into the input/output facilities.
While the recovery provisions are not automatic, they do posses the
virtue of simplicity. When the development or interpretation of a
solution procedure must be abandoned, the service module and the solution-
procedure may be saved for use at a later time in one of two ways. Both
SECEDE and the GENDER list reside in the ALLOC vector. Hence, a copy
of the contents of ALLOC will save SECEDE and the GENDER list. The
second approach involves the output of only SECEDE and the GENDER list.
This latter strategy will greatly reduce the output volume, but this is
not the primary advantage. The format of output may be adjusted to
produce a much more manageable medium. Particular significance will
be attached to each output record and the output records formatted
according to content.
The medium selected for storage of service modules and solution
procedures for later use is punched cards. Thus, when the solution of
a problem must be aborted, the programs SECIAO and GENIAO may be directed
to produce respectively the contents of SECEDE and of the GENDER list
in card form. These cards may later be read by SECIAO and GENIAO to
resume solving the problem. Observe that a solution procedure, complete
in every detail, may be stored in card form as readily as a partially
complete solution procedure. In fact, a library of solution procedures
may be amassed to eliminate repetitive analysis of problems which are
frequently solved.
The format of each card generated by SECIAO and by GENIAO is
presented in Appendix A in terms of data formats. This is permissible
since the input and output formats are identical. For the convenience
of the user, a printed output will always be provided with card output.
In fact, a printed only output mode may be selected for both SECIAO
and GENIAO should the punched card output not be desired.
IV.4. Implementation Details
The remainder of this chapter delves into the implementation details
for SECIAO and for GENIAO. These details will be of utility only to
those users wishing to prepare programs which directly access either
SECEDE or a GENDER list. Most users should find the program comments
for SECIAO adequate to encode properly the statement of the problem as
SECIAO data. The printed output of both SECIAO and GENIAO is preceded
by a table indicating the composition of each type of output line. A
third subprogram, VARIAO, completes the input/output facility package.
VARIAO supplies a user with a list of variables for which values are
required. VARIAO is provided primarily.for use by the interpreter,
GLINT, to indicate variables encountered for which values have not
been provided.
* IV.4.a SECEDE
Basically, the service module, SECEDE, is an application of REMOTE.
The REMOTE system is founded on the premise that all entries of a file
are of the same size. Unfortunately, exceptions to this fundamental
premise may arise. For example, SECEDE is required to store functions
in terms of the variables, operators and constants of which they are
composed. All three entry types require data fields for an identifica-
tion flag and a code name. However, the variable also requires fields
for the dimensionality and, if applicable, the indices. While it
would certainly be possible to insist that all file entries representing
a function be equal in size, the opportunity for wasting considerable
ALLOC space would just as certainly be present. This eventuality would
be realized for all functions containing only a few dimensioned variables
with respect to the total number of entries.
The apparent inconsistency between storing functions as REMOTE
files and efficient memory utilization can be reconciled, albeit
artificially. To each file entry add another data field containing
the length of the entry. Moving from one file entry to the next would
involve adding the file entry length to the current position in the
file. Except for the variations in file entry length, this procedure
is decidedly reminiscent of the relative move capability already present
in REMOTE. In fact, if REMOTE were led to believe that the file entry
length is unity, and if the actual entry length is used as the number
of file entries to advance, then movement can be accomplished via the
REMOTE relative move mechanism.
Before proceeding, we should clearly'differentiate the two types
of entries discussed in the preceding paragraph. When establishing a
file, the JCFINE vector specifies the file entry length. This is a
fixed number and is the length employed in specifying the length of a
file. The entry of variable size is not a true file entry. It is
rather a sequence of one or more words of a file which we choose to
treat as a single entity and to which we attach special significance.
Let us assign the acronym ASE to the adjustable size entries, while
reserving the term file entry to mean true file entry in the REMOTE
sense.
A file composed of ASE's strongly resembles a forward-only list.
That is, the length stored in each ASE serves as the link to the next
ASE. Consequently, we shall refer to this scheme as relative linking,
and to the stored length as the relative link. The last ASE must
contain zero for the relative link just as a terminal list entry must
contain zero for the forward link. Since the identification flag
stipulates the fields within the last ASE, and since the LEND stipulates
field placement within the ASE, the zero length specification presents
no hindrance to data transfer.
A hindrance to data transfer does, however, exist. The file entry
length must be specified as unity to permit relative linking. Normally,
REMOTE will not permit data transfer operations to exceed the bounds
of a file entry. The ASE's are expected to be multi-word entries. To
circumvent this problem, REMOTE was adjusted to permit the violation
of file entry bounds if LOAD(29) isset equal to -1. The user must
ensure that LOAD(29) is properly set before attempting access to any
file. LOAD(29) should be 0 for all files not employing relative linking.
As we noted earlier, an ASE file resembles a forward-only list.
Consequently, it is not possible to randomly access the ASE's. This
need not be the case. Suppose the relative links are removed from the
ASE's and placed at the beginning of the file. The value of the
relative links would, of course, be different since the relative link
is the number of words to advance from the current position to the ASE.
What we have developed is the notion of a directory, employing relative
links instead of relative addresses, which is internal to a file. The
term internal directory shall be employed to describe this placement
of the relative links.
Files containing ASE's in the list format will be called sequential
access files, SAF's. Files containing unlinked ASE's and an internal
directory will be called random access files, RAF's. The RAF does not
provide a storage capability which can not be duplicated by an ordinary
REMOTE file structure without recourse to ASE's. This could be
accomplished by establishing each ASE as a separate file and providing
a directory permitting random access to the separate files. However,
this structure demands that the relative access be accomplished at
the expense of repeating all catalogue and directory hierarchy selections
for each access. The RAF structure permits the access computations to
commence with the internal directory, since this directory and the ASE's
are actually all members of a single file making the REMOTE relative
address capability applicable. That is to say, the RAF access time
would be generally shorter.
SECEDE consists of at least five records, each record containing
from one to five files. These files include all three types; ordinary
REMOTE files of equal sized entries, SAF's and RAF's. Each record
will be given individual attention. In the discussion to follow, the
notation (t i f j) will be used. The letters i and j represent integers
indicating data type and data field respectively. The letters t and f
should be translated as type (i.e.,data type) and field. If we were to
speak of a data field (t5f9), we will be considering the ninth field
of data type 5. On occasion it may be convenient to expand our field
designation shorthand to include a range of fields for a single data
type. For example, (t5f7-9) is translated as fields 7 through 9 of
data type 5.
Armed with the above bit of cryptography we are prepared to inspect
the purpose and contents of record one. Tables 9 through 11 may be of
assistance in this discussion. The first record consists of a directory
and two files. The files contain respectively decision and tear
variables and are of the SAF type. Each of the ASE's contain the data
fields (tlfl-3), plus an additional two words for each degree of
dimensionality. The two word allocation for each index is required to
permit the specification of minimum and maximum of an index range. A
single ASE may represent, for a dimensioned variable, a single component
or many components. Each word reserved for an index contains the fields
(t9fl, tlOfl, tllfl, tl2fl, tl3fl, tl4fl, tl5fl), which correspond to
the seven constituents permitted in an index calculation as discussed
in'Appendix B. These constituents, in the order of the fields, are
mapping flag, mapping index, operator flag (0 for multiplication by
scale and 1 for division by scale), sign flag for scale (0 for positive
and 1 for negative), scale, sign flag for offset (0 for positive and
1 for negative) and the offset. The mapping flag may be either 0 for
no map, or may be 3 indicating mapping to another index of the same
variable. If the mapping flag is 0, data types 10-14 are ignored and
the offset is taken to be the index value. As a matter of convention,
all data structures requiring the seven part indices will employ data
types 9-15 exactly as described here.
The second and third records in SECEDE each contain only a single
file. These files are ordinary REMOTE files composed of file entries
all equal in size. Each file entry contains alphameric characters
forming the name of an operator in the case of record two or the name
Cl)
H ''
a r
S a
c Ei
o ^
10 a
a) 0.^
g
Q)
Hl R
g,
$41a
0D+
& 0
0r rd
0)
CO 3d
0 n4 >
H Hc
CL| 1-0
0 4-;
o 4>
-4 a)
$4 *HHi-
*rH 0 CO
'0 PL, C)
03
a) 4-' tB
a) 04-
-4-a co
M : 0
H ci co m 'C C 0
H
*i- E
H )
a)
a)-j' a)
0 0V'0
a)i *H 0
Co H- $1 C
4 a) ,0 *)
03 m) 0)
O > w.
Ca ) >;f
$40 aD Ca )
a) a) a).
^i,0 e- a)
:2:> CM 0
0
$4
F:
u) 43
a)
,4 4
a 0) a)
., 1 0 .11
H $4l Cci
*H 0 4
o ca
a) a) -4-i$
*10) [.0 COa
a) a) 0,>
ri E >
rl ^1o crl
0 0 '0 ^
Z Z I-
m *i r
LC1 C) Orl?-
,n ,n cus
e e (u
3 F3 rl3
s; i- r-
r-H H m H H H
r-i r-A r-i H r-
+
0 > > CT
>
S > >
cq H > cq
c Cm "t m
__
4-J
X H
*H *H
0 0
>4-J X
0 0
,0
M) co 0
o
O. CO ,
mm
=5 co
Hl- r-H H H
H lH H-l -l -I H H Hr- H
r-l -l H H H
r-- oo o
Hl -l -l
0,
o
\'D COm
00
C) 0I
0 0 0 0
4 HE H
4- r
a 0a ,0 0 C (c
,0 ae>
( 0C0 *
4-4 0 0 4-
I pi-0 E u
0) 00U 4-01 Ce
l C1 (U 0O 0 *rl
0' n E' o Z 1.) o
S- C N H-i H H-
'3
C"
C H
H 0'
i-l ck
i 4-i 41'
Q4- *' ;-
4-1' C '0
ft3 34 r44
4-' 4-' 4-' 4-'
4-1 41 41
r-1 C, 4 C,
HH H
r- r- H "
'P 4- 4-' '4 4-1
"C 'od
40 i 0 "H 03 0
LO JC;I I
_-' 4-' 4-' l|-' 4-'1 -
n t n 00 ^--
3 3 "1- 3 3
s i d d jc t
r- ll r- i~ -1 i-
HH H H
' + H
4- C4 004
ft + + H
0 13 -l 4-
CO O '0 00
S0 CH
ll 1-1 H-
o H
0>
r-I c
cj
0
,n E
> 0
H- r-I r-
l lO l
r-i r- r-I
: +
4-\
0 0
r-l
M *
0 ca
(0 *H 1 0 0 0
W > C) *H a *H H
> -4 0
S> C I O I
r- i r i r ( O U O (1) Wt
H E p 0 CC W 0r :3 :3 0D
H E O O 0 m M m O C C i r-
m m a O *H > -j m m I
> E p C 1 ; IC
*H tB Io n 44 m cz 44 2 IH ql 44 >
H C > O > > i O IT O I O Ci O 0 a
o0 O H- r-H H I0 C 0 HC)
*H > 41 C r 0 *H C- ^ H C C C E 4
*I C C H 0 H C) > 10 0 10 w C i i IC 0 IC
cl E C4 E E VE 9 C
c 0 :3 0 0 oe z; 0 me 0 7 c O m
SE- ) C > H C > C >
H 4I C C C C fl C- U C- *H C- C- C- IC ,0 IC f
CI
Hm
C)
0
H
C) I
'-I
1C)
- 0
o
H\
Hl
C,
0r
H
C)
01
-I
o
O
r
I : I
H\
HI
C)
0,
H
m<
0
H H H
) C4) P4
*- -' *^
a K os
I I I I I H l l lo 'o I I I I
-H I I H N o H -H H H H H -H H io
H H mC t W O W w w) U) w I) m w
H H
1-1 *H
E-I C.)
M-
0A)
4J
r. *
0 m
O O
0 .5
0 0 0
0O 00
0 0 0
a 00 0t
4+ CD Q)
0 0 0
0
0 0 0 0
H +0 U
H 00 0 0
U *H
SH
4 U) 0
0 0 0 'O 0
co C 7o 9 +
S00 c00 H .0
o aE li a) O
(H O 4o'
a a) 0) H
0 0 0
0 +
1 4 20 0 0
0 0 4H*H 0
4 m1 ++ e
R 3 0
0 0
*H H f H
: 1
of a method in the case of record three. A method is a user prepared
subroutine for supervising the convergence of a cyclic calculation
during interpretation. The notion of a method is further pursued in
Chapter VII. The entries of records two and three may be described as
(tlfn), where n is the number of words per name.
The processing units are regarded in GENDER to be completely
separate entities. To form a processing plant, the units must somehow
be connected together to permit the transfer of material between the
units. This physical connection of units is represented algebraically
by a connection equation. For example, VCN201 = VCN422 is a connection
equation relating variable code name (VCN) 201 to variable code name 422.
If the scale factor for unit numbers employed in developing the unique
code names is 100, then this example indicates the equality of variable
1 of unit 2 with variable 22 of unit 4. It is entirely possible that
a single variable may appear in several connection equations. That is,
many variables may share a common value. This leads to the notion of
a common storage location for the value of all variables sharing a
common value as stipulated by connection equations. Further, if the unit
variables are connected by the sharing of value storage locations, the
need for explicitly stating the connection equations in either SECEDE
or the GENDER list is eliminated.
Unit 0 is contained within record four of SECEDE and is reserved
for common variables. This record contains three files. The first
file is an RAF and contains data relative -to the dimensionality of the
common variables. The similarity of function between this file and
the DIMENSION statement in FORTRAN suggested the name declaration file.
Apart from those containing relative pointers, each declaration file
ASE will contain the fields (tlf(2+d)), where d is the dimensionality.
I
Field (tlf2) contains the dimensionality. The d fields reserved for
the indices indicate the maximums of each index. The field (tlfl) is
the pointer to the value storage location. The field is an absolute
pointer which is'computed by the program SECIAO during the establishment
of SECEDE. In particular, the absolute address corresponds to an entry
of the common variable value file. Although this file is only the
second on the record, a LISTER of (4, 4, 3, 1) must be employed to
permit access. The second directory entry is reserved for the number
of common variables. The variable value file consists principally of
entries of the form (tlfn), where n is the number of words per floating
point value. All values are in floating point format. While a single
entry containing (tlfn) is satisfactory for scalar variables, many such
entries are required for dimensioned variables. If a dimensioned
variable appeared on the file expanded into its components, the access
of any variable, appearing later in the file than the dimensioned
variable, would require knowledge of the number of dimensioned variable
components. That is to say, the random access feature of the file
is greatly compromised. As an alternative, let us consider partitioning
the variable value file into two divisions. The primary division
appears first in the file and contains one entry per variable. For scalar
variables, the primary entry is simply the value. For dimensioned
variables, the primary entry is of the form (tl7fl, tl8fl), with the
fields containing respectively the integer 21 and a relative link to
the first of a sequence of entries in the secondary partition. This
sequence of entries encompasses the values of every component of the
dimensioned variable. The integer 21 is provided as a safety measure
but has proven to be of only occasional utility.
_ _
The third file of unit 0 is the common variable name file and is
referenced by the fourth directory entry. The entries of the variable
name file are identical to those of the operator name and method name
files of records two and three.
Each record following record four is designated as a unit. The
unit records are considerably more complex than any record we have
previously considered.
A unit record comprises eight major file divisions, four of which
are further subdivided by second level directories. The individual
files are all of types we have already considered in the first four
records. The first entry of the first level directory references an
eight entry second level directory. Entries 1, 3, 5 and 7 of the
second level directory reference declaration files for variables, ER's,
equations and constraints. Directory entries 2, 4, 6 and 8 are respec-
tively reserved for the numbers of variables, ER's, functions and
constraints. The four declaration files are essentially the same as the
common variable declaration file of record four.
The variable declaration file requires the addition of a data type
1 field between the value address and the dimensionality, making each
entry of the form (tlf3+d). This additional field is reserved for the
code name of a common variable. When a unit variable is declared
common by a non-zero (tlf2) field, the common variable code name and
value supercede those of the unit variable during preparation and
interpretation of the GENDER list. That is, the common declaration
substitutes for the connection equation. The remaining three declaration
files require only the fields (tlfl+d), where the field (tlfl) is the
dimensionality.
The second and third first level directory entries refer to the
variable and constant value files. The variable value file is identical
to the common variable file of record four. The constant value file
is quite similar to the variable value file, except that all constants
are single entities making the provisions for dimensioned variable
components unnecessary for the constant variable file.
The ER and the variable name files correspond to the first level
directory entries.four and five. The name files are structured identi-
cal to the files of the second and third records.
The first level directory entries remaining correspond to the ER,
equation and constraint files. Let us consider the equations. Each
equation is recorded on a separate SAF. The equation SAF's are recorded
on the equation directory, which is in turn recorded on the first level
directory. For example, the LISTER vector (5, 5, 7, 1, 1) would be
appropriate to accessing the first equation of unit 1. The equation
SAF is not unlike the decision and tear variable SAF's. The first ASE
pertains to the equation and is of the form (tlf3, 2xd). The field
(tlfl) will always be the relative link in an SAF. The fields (tlf2)
and (tlf3) are respectively the number of outputs and the dimensionality.
The indices are recorded exactly as they were for the decision and tear
variables. Each ASE after the first ASE represents a variable, operator
or a constant. A field, (t5fl), is employed as an identification flag
Flag values range from 0 to 2 and correspond in order to an operator,
a variable or a constant. The operator and constant entries are
identical and consist of the fields (tlfl, t5fl, tl6fl), with (tl6fl)
containing the operator or constant code name.
The variable ASE contains the fields (tlfl, t5fl, t7fl, t8fl, tl9fl,
Ixd). In order of appearance commencing with (t7fl) these fields are
an output selection .cost flag, variable code name, dimensionality and
the indices. The algorithm employed for output set assignment permits
the use of weights to influence the output set selection process.
The weights represent a cost of assignment and are scaled from 0 to
10. One word is reserved for each index which are in the seven part
format described for the decision and tear variable files. The ER and
constraint files are identical to the equation files except that
operators and constants do not appear in the ER files.
* IV.4.b. SECIAO
In the previous chapter, it was noted that certain support struc-
tures to the sparse incidence matrix were of utility. Much the same
situation exists here for SECEDE. The file entries are of varying
compositions and sizes, suggesting the use of an information block to
serve as a reference table.
The twenty-five word information block, mentioned in Chapter III
with respect to networks and SIM's, is again pressed into service.
Information block components 1 through 7 are reserved for data pertinent
to SECEDE. Table 12 list these components. It should be noted that
component 2, the length of a floating point value, is uniform throughout
SECEDE. All variables will either all be single precision or all be
double precision.
Apparently all of the ALLOC space required for SECEDE is in the
form of record segments, making the use of a SPUR block a somewhat
dubious feature. This is, however, not necessarily the case. In the
previous section, the description of the variable declaration ASE's
included a field reserved for the address of a storage location. While
this is perfectly satisfactory for scalar variables, a single address
may not be sufficient for a dimensioned variable. In particular, if
H
n H 4-
Cr
9 0 0 0
t o C) I) C)
Sa, -
D E ) ci 0
O 0 0 C
41 4-.J c Q r
o Hcu
S 4 00 co 41 rl 7- o
C 0 !< C) 0 01
> u ua H
S 04 *H 0 c H 0 C-
M 0 0 cO *
S00 O 0 0 0 CO
Ca X 4r 1 (
( 04-1 c a co *
t 0 ClC 4 u 0
0 C ci
C 0 0 0 co o c iC
M C Wcci ci) C 0 C)0
ci)
0 H NJ co c- LI) 10 c
0
I-)
1
_
the value locations reserved for a dimensioned variable extend over
several record segments, the single address will be inadequate. This
situation is remedied by establishing for each dimensioned variable a
dimensioned variable address resolution block, DIVARB. It is the
address of the DIVARB which appears in the declaration file for a
dimensioned variable. The DIVARB encompasses (2+d+r) words, where
d is the dimensionality and r is the number of record segments.contain-
ing values of the components to a dimensioned variable. The first word
of the DIVARB contains the dimensionality d. The next d words contain
the ranges of the indices. The (d+2)nd DIVARB word is called the offset.
The offset is the integer which when added to the address of the record
segment containing the first variable component will give the address
of that first variable component. For example, suppose that the values
of a dimensioned variable commence with the 2902 nd word of ALLOC.
Further, suppose the record segment address is 2861. The offset to be
recorded in the DIVARB would be 41. The remaining or DIVARB words
are reserved for record segment addresses. The DIVARB permits rapid
address resolution for a dimensioned variable component. The variable
value file is a linear storage medium necessitating the conversion of
multi-index sets into a single index. That is, the set of indices for
an array component must be converted into the single equivalent index
for the storage of the array as a vector. Except for the length of a
record segment and the number of words per value, all of the data
necessary for both the index conversion and the address resolution is
contained within the DIVARB.
The need for a SPUR block is now some what obvious. The size of
the SPUR block (i.e. the number of SPUR's required), however, is not
clearly defined. The DIVARB size depends not only on the dimensionality,
but also on the number of components of a dimensioned variable. The
dimensionality and number of components will remain unknown to SECIAO
until input of the variable declarations commences. Although it would
be possible to complete variable declaration input before preparing the
SPUR block and establishing the DIVARB's, it is unnecessary to do so
and may even result in the wastage of ALLOC space. A SPUR stipulating
a list entry size larger than one half the ALLOC segment size will
waste a portion of each segment allocated. This cannot be avoided.
However, the SPUR itself can be eliminated. We shall reserve a single
SPUR for all large DIVARB's, employing it by altering the list entry
size contained in the fourth SPUR word. The SPUR block adopted for
SECEDE consists of (2+(ALLOC segment size)/2) five word SPUR's. The
first SPUR is provided for the requisition of DIVARB's larger than one
half of ALLOC segment size. The second SPUR is appropriate to record
segment acquisition. The remaining SPUR's are graduated in list entry
size from 1 to one half of ALLOC segment size. It is the address of
the SPUR for the record segment which is considered to be the address
of the SPUR block.
The use of REMOTE requires a LOAD vector. In particular, two LOAD
vectors are required by SECIAO for manipulating SECEDE. The LOAD vectors
are furnished as a single vector 60 words in length which is called the
LOAD block.
The entire service module is bound together by a service module
block, SECBL. The first word of SECBL contains the address of the
SECEDE catalogue. The remaining SECBL words are pointers to the SPUR
block, the LOAD block and to an allocation of space reserved for index
calculations.
|
Full Text |
xml version 1.0 encoding UTF-8
REPORT xmlns http:www.fcla.edudlsmddaitss xmlns:xsi http:www.w3.org2001XMLSchema-instance xsi:schemaLocation http:www.fcla.edudlsmddaitssdaitssReport.xsd
INGEST IEID EVE5L2XQ8_G5O88E INGEST_TIME 2011-06-09T08:19:48Z PACKAGE UF00098195_00001
AGREEMENT_INFO ACCOUNT UF PROJECT UFDC
FILES
xml version 1.0 encoding UTF-8
REPORT xmlns http:www.fcla.edudlsmddaitss xmlns:xsi http:www.w3.org2001XMLSchema-instance xsi:schemaLocation http:www.fcla.edudlsmddaitssdaitssReport.xsd
INGEST IEID EJFBAPZB8_4I80NM INGEST_TIME 2011-07-15T21:47:17Z PACKAGE UF00098195_00001
AGREEMENT_INFO ACCOUNT UF PROJECT UFDC
FILES
PAGE 1
AUTOMATIC COMPUTER GENERATION OF SOLUTION PROCEDURES TO LARGE SETS OF NONLINEAR SIMULTANEOUS EQUATIONS VIA GENDER By JAMES RICrL\RD CLIn'NINGHAM A DISSERTATION PRESENTED TO THE GR^^DUATE COUNCIL OF THE UNIVERSITY' OF FLORIDA IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY' UNIVERSITY OF FLORIDA 1972
PAGE 2
COPYRIGHT JAMES RICHARD CUMINGHAM 1972 C5^
PAGE 3
ACKNOWLEDGEMENTS The author wishes to express his indebtedness to the chairman o£ his supervisory committee, Dr. A. W. Westerberg, Associate Professor of Chemical Engineering, for suggesting the research topic and for providing the necessaiy guidance. The author also wishes to thank the members of the supervisory committee: Dr. F. P. May, Professor of Chemical Engineering, Dr. R. G. Self ridge, Professor of Mathematics and Director of the Computing Center, and Dr. F. D. Vickers, Associate Professor of Computer and Information Sciences. Thanks also are extended to the National Science Foundation, which provided financial support through grant GK-18633. In addition to providing the funds for my research assistantship, this grant defrayed, the extensive computer expenses incurred during the debugging of the 135 subprograms constituting the GENDER System. Without this assistance and support, the development of GENDER would not have been possible.
PAGE 4
TABLE OF CONTENTS Page ACKNOWLEDGEMENTS iii LIST OF TABLES vii LIST OF FIGURES ix ABSTRACT xi CHAPTERS: I. INTRODUCTION. 1 II. OVERVIEW OF THE CHEMICAL ENGINEERING DESIGN ROUTINES SYSTEM 5 III. DATA MANIPULATION AND STORAGE 11 . III.l. Data Handling. 11 III. 1. a. Lists 11 Ill.l.b. Files...... 14 III. I.e. Memory Allocation.... 14 111.2. Special Data Structures 16 III. 2. a Networks........ 18 III.2.b Sparse Incidence Matrices 18 111. 3. Implementation Details. 22 *III.3.a. COAST 22 *III.3.b. REMOTE.. ' 33 r ' *III.3.c. NETPAC . 43 *III.3.d. SIMPAC 57 IV. DATA BASE 66 IV. 1. Service Module, SECEDE 66 IV. 2. Solution Procedure, GENDER List 68
PAGE 5
TABLE OF CONTENTS (Continued) Page IV. '3. Input/Output Facilities 68 IV. 4. Implementation Details 70 *IV.4.a. SECEDE. 70 *IV.4.b. SECIAO 85 *IV.4.c. GENDER List 89 *IV.4.d. GENIAO 98 V. ANALYSIS ALGORITHMS 101 V.l. Hungarian Output Assignment Algorithm 102 V.2. Speed-Up Precedence Ordering Algorithm. 103 V.3. Barkley Motard Minimum Tear Algorithm....... 104 V.4. Implementation Details 105 *V.4.a. HASSAL 106 *V.4.b. SPEDUP.... 107 *V.4.c. BEMOAN... 112 VI. INTERPRETATION. 114 VI.l. Link Editor ....... 115 VI. 2. Converter 116 VI. 2. a. SOLVE.... 119 VI. 3. Interpreter... 120 Vl.S.a. MATH.... 122 V VI. 3. b. Subroutines 122 VI. 4. Implementation Details..' 125 *VI.4.a. LINKED. 125 *VI.4.b. COVERT 126 *VI.4.c. GLINT... 128
PAGE 6
TABLE OF CONTENTS (Continued) Page VII. USER MANUAL.. 130 VII. 1. Input Data Preparation. 130 VII. 2. Program Preparation. 131 VII. 3. Additional Algorithms 134 VII. 4. GENDER as a Design Tool 134 VIII. EXAMPLES.. 137 VIII. 1. A Simple Analysis Strategy 147 VIII. 2. Equilibrium Flash .. 147 VIII. 3. Binary Distillation. 155 IX. CONCLUSION 165 IX. 1. Convenience Aspects 165 IX. 2. Additional Algorithms. 166 IX.3. A Final Note on GENDER 168 APPENDICES 169 Appendix A. l70 Appendix B 498 Appendix C. 501 Appendix D 504 BIBLIOGRAPHY. 510 BIOGRAPHICAL SKETCH 511
PAGE 7
LIST OF TABLES Table Page 1 COAST Verbs... : 28 2 LEND Components Required by REMOTE..... 42 3 Auxiliary Data Fields Required by NETPAC. 44 4 NETPAC Verbs . .. 55 5 Data Fields Required for Ordinate Entries 59 ,6 Data Fields Required for SIM Elements 61 7 Information Block Components Pertinent to the SIM. . . . . . 62 8 SIMPAC Verbs 64 9 Data Fields for SECEDE 75 lb File Entries for SECEDE. .. 77 11 '" _ SECEDE Files , 79 12 Information Block Components Pertinent to SECEDE . 86 13Data Fields for GENDER 90 14, The List Entries of GENDER 93 15; Information Block Components . Pertinent to GENDER List. : 99 16 Data Fields for SPEDUP Working Lists 109 17 List Entries on SPEDUP Working Lists 110 : 18 Data Fields for the BEMOAN Working Ordinate. 113 19 Operator Set. 121 20 GLINT Error Codes 123 21 Information Block. 132 22 The Code Name /Variable Assignments for a Distillation Tray 140 23 The Constant/Code Name Assignments for a Distillation Tray. • • • 141 vii
PAGE 8
LIST OF TiJBLES (Continued) Table Page 24 Values for Information Block Components 149
PAGE 9
LIST OF FIGURES Figures Page 1 GENDER Architecture.9 2 Typical List Structures 12 3 Typical Hierarchical File 15 4 A Simple Network 19 5 Sparse Incidence Matrix. 20 ,6 A User Mask 24 7 PUSH 30 8 POPUP 32 9 File Structure... 34 10 A Record.... 38 11 Trace (Start). 47 11a Trace (Step 1) 48 lib Trace (Step 2)....... 49 lie Trace (Step 3)..... 50 lid Trace (Step 4)........ . . .. ^ 51 lie Trace (Completed) 52 12 Sparse Matrix. 58 13 An Equilibrium Stage 138 14 SECIAO Data for a Distillation Tray 142 15 Data for COIN 148 16 Equilibrium Flash 150 17 SECIAO Data for Equilibrium Flash. 153
PAGE 10
LIST OF FIGURES (Continued) Figures Page 18 Data for VARIAO. 154 19 Simple Distillation Column 156 20 SECIAO Data for Simple Distillation Column 158
PAGE 11
Abstract of Dissertation Presented to the Graduate Council of the University of Florida in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy AUTOMATIC COMPUTER GENERATION OF SOLUTION PROCEDURES TO LARGE SETS OF NONLINEAR SIMULTANEOUS EQUATIONS VIA GENDER By James Richard Cunningham December, 1972 Chairman: Arthur W. Westerberg Major Department: Chemical Engineering Fundamentally, chemical process plant design is the solution of a large set of nonlinear simultaneous equations. For large and complex equation sets, it is frequently not possible for the design engineer to determine readily how the solution should proceed. Algorithms have been developed which analyze equation sets with respect to solution procedure. The algorithms do not generally attempt to solve the equation set, but merely provide the directions for solving to the design engineer. While computer implementation of certain algorithms analyzing equation sets has been accomplished, little emphasis seems to have been placed on the implementation of a complete analysis system integrating a number of algorithms. This dissertation presents an automatic and machine-independent system permitting the design engineer to direct solution procedure generation and execution via selections from a spectrum of analysis algorithms. GENDER is the acronym for General Engineering Design Routines. The primary objective of GENDER is the development of a complete solution procedure. To be complete, a solution procedure must reflect (1) decision variable selection, (2) output set assignment, (3) tear variable selection
PAGE 12
and (4) precedence ordering. These attributes are provided to a solution procedure by GENDER through a minimum tear analysis strategy. While only the minimum tear strategy has been furnished with the first version of GENDER, the GENDER System has been designed to readily accept additional analysis algorithms, expanding the analysis strategy repertoire. The design engineer, having generated a solution procedure for an equation set, may perform the translation of the solution procedure into FORTRAN for execution. However, an interpreter capable of direct execution of a solution procedure is provided in GENDER. The interpretation capability, while sparing the engineer from the drudgery of translation, has a somewhat more noble purpose. If the design problem involves constrained optimization, the solution procedure will be subjected to a series of revisions as additions or deletions to the set of binding constraints are required. The optimization-solution procedure generationexecution cycle is potentially faster for interpretation than for FOR.TRAN execution owing to the elimination of the translation and compilation steps. GENDER depends extensively upon list processing techniques. In fact, the solution procedure has been implemented as a list. In the list format, the revisions and rearrangements associated with an analysis strategy may be conveniently performed on a solution procedure. The application of list processing techniques is not restricted to the solution procedure alone, but permeates the GENDER System. Linked data structures of note include a paged storage system (REMOTE) and the sparse incidence matrix. The former is notable for compatability with mass memory and the latter for memory conservation (on machines lacking virtual memory).
PAGE 13
CHAPTER I INTRODUCTION The objective of process design is the determination of equipment specifications and operating conditions which will meet certain production goals developed by management. Process design problems are not particularly amenable to solution. The equations quantitatively describing the equipment characteristics may be highly nonlinear, a situation further confounded by the presence of recycle streams. The recycle stream is necessary to economic operation, but it imparts a cyclic character to the design calculations just as it imparts a cyclic character to the process flow. To these complexities of process design, yet another must be added. Processing plants are frequently complex entities, consisting of many individual processing units connected by a maze of piping. This is particularly true if the process engineer intends to extend the scope of the plant model to include not just the major features of the process, but all unit operations. That is, the mathematical model is to resemble the processing plant as closely as possible. The availability of large, powerful computers has caused process engineers to revise the design procedure. Prior to his introduction to computers, the engineer was forced to simplify the process model to facilitate the completion of hand calculations in a reasonable amount of time. While short-cut techniques were developed for some unit operations, the "assumption" reigned as the arme supreme . Unlike the human brain.
PAGE 14
the digital computer is well suited to complex and repetitious calculations. The engineer could now expect solutions for large and complex process models without the uncertainties of simplification. The new exactness permitted to the process engineer by the digital computer proved to be something less than a complete blessing. The programs developed by the engineer from the mathematical models all too frequently either failed to converge, giving no answer, or generated unreasonable answers. Research, both industrial and academic, determined that the computational difficulties were, characteristic of particular formulations of a model. Further, certain formulations of a model may require more information to initiate cyclic calculations than other formulations. What had developed at this point was a new field of endeavor for process engineers: the study of process models, This study begins where the traditional concept of mathematical modeling ends. The result of mathematical modeling is the development of an equation set descriptive of, for instance, a unit operation. This set of equations is not unique. That is, the algebraic rearrangement of one model produces another equivalent model. It is this rearrangement and its effects which have captured the attention of the process engineer. The result has been a variety of algorithms for selecting a particular model formulation. The algorithms are rather specific in character, dealing with only a particular aspect of a process model. Algorithms have been developed for selecting the output variables for a set of equations, for selecting the: variables for which value estimates are required to initiate cyclic calculations and for ordering the equations so that the calculation of each variable value will depend only upon variable values already calculated. These operations are respectively known as output set
PAGE 15
assignment, tear variable selection and precedence ordering. The process engineer employs selected algorithms sequentially to convert the original model he formulated into an equation set amenable to computer solution. The particular selection of algorithms may be referred to as an analysis strategy. The strategy is largely dictated by the objectives of the design engineer, such as a minimum tear solution or a rapidly converging solution. Unfortunately, the execution of an analysis strategy must be primarily manual. Only a few algorithms have been programmed, all of which are machine dependent and isolated from other analysis capabilities. The next step in this evolutionary development of process design would seem to be totally automatic process model analysis. The notion of automatic design is not original to this work (Kevorkian and Snoek, 1972; Soy lemez, 1971; MahandRafal, 1971), but has been attempted previously. It is the limitations of other automatic design systems which have encouraged the present effort, the General Engineering Design Routines (GENDER) System. GENDER does not restrict the design engineer to a single analysis strategy by virtue of a library of analysis algorithms. Further, the inclusion of additional algorithms has been made relatively easy. While it is possible to convert the product of an analysis strategy, which we shall call a solution procedure, into FORTRAN code for execution, the GENDER System provides the capability of directly interpreting the solution procedure to produce a solution to the design problem. As a feature designed to permit compact problem representation, GENDER can accept indexed variables and equations. Finally, the GENDER System affords the design engineer with a problem solving medium permitting the convenient modification of the original design problem during the execution of the analysis strategy and/or interpretation of the solution procedure. This feature is essential to constrained
PAGE 16
optimization where fluidity in the inclusion and exclusion of constraints is an absolute necessity. While many of these features have appeared in previous attempts at automatic design packages, they have to date not all appeared in a single automatic design system.
PAGE 17
CHAPTER II OVERVIEW OF TP GENERAL ENGINEERING DESIGN ROUTINES SYSTEM The heart of the GENDER System is the solution procedure and is essen^ tially the set of instructions for solving a set of simultaneous equations. In order to make possible direct machine interpretation of the solution, the solution procedure must be explicit and complete. The purpose of this chapter is to introduce the concept of the solution procedure, its terminology and its relation to the GENDER System. In Chapter I and in the preceeding paragraph the term equation was used for a model constituent. To be more precise, the model constituents are actually equations and solved equations. That is, the model is / composed of algebraic relations between variables and constants, but having the form f(x,y,z,...) =0 rather than the solved equation form 5C = F(y,z,...) In the solved equation form, the x is called the output variable. An equation may be transformed into a solved equation by selecting a variable to be the output and performing the algebraic rearrangement necessary to place this variable alone on the left-hand side of the equality. Certain of the equations defining a processing plant may be constraints. Normally one thinks of constraints as inequalities. However, inequalities are readily converted to equalities via the intro-
PAGE 18
duction o£ slack variables. CENDER, at least in its current version, is prepared to manipulate equality constraints only. Being identical to the equations describing the process, the constraints could be grouped with them without differentiation. However, during constrained optimization the set of active constraints varies in numbers and composition. To permit the free inclusion (exclusion) of constraints into (from) a problem, constraints are regarded as distinct model constituents and are carefully differentiated from all other model components. Normally an equation is permitted but a single output variable, with one exception. The external routine (ER) is a special model constituent which may possesses more than one output variable. In essence, the ER is a subprogram for determining values to output variables given the values of the input variables. An ER may be encoded in any acceptable programming language. , To facilitate the incorporation of existing subprograms in a plant model, a mechanism for indicating prechosen output variables is essential. The mechanism selected for GENDER is a weighting scheme with an integer scale of to 9. Each variable in each equation and ER is assigned a weight in the to 9 range. This weight is the cost of assignment as an output variable. Thus, for an existing subprogram, the output variables are all weighted at while the input variables are all weighted at 9. This weighting scheme allows the design engineer to indicate to GENDER his preferences with respect to output set assignment. For instance, similarity of a new model with one or more previous models may suggest at least a partial output assignment. The weighting mechanism allows the engineer to guide GENDER in performing the initial output assignment and may reduce execution t?'.me depending on the ultimate
PAGE 19
degree of similarity between the solution procedures for the models. " In addition to output set selection, analysis of the equation set must also order the equations and, if possible, subdivide the functions into smaller groups. Initially, the plant model is treated as a single large group of equations. The decomposition of the large problem into a multitude of smaller problems is obviously advantageous. Equations which are acyclic in character may be grouped, although the equation grouping normally reflects the presence of a cyclic character. It is permitted by GENDER to have groups as members of groups. Thus, we may have, for example, a cyclic group appearing as a constituent of another cyclic group, or even as a constituent of an acyclic group. Once tear variable selection has rendered all cyclic groups apparently acyclic (by ignoring all occurrences of the tear variables except in the equations where they are the output), it is possible to order all members of groups and to order all of the groups so that the information flow is strictly forward. That is to say, the value of a variable is never required as the input to a equation before it has been calculated as the output of a previous equation. This then is the concept of precedence ordering. The solution procedure must reflect the output set assignment, grouping, tear variable selection and precedence ordering. The solution procedure must also indicate decision variable selection, the decision variables being the unassigned variables following output set selection. Numerous strategies exist for acquiring these ingredients to the solution procedure, but for completeness all must explicitly appear. The solution procedure is called the GENDER list. The GENDER list consists of group, each group possessing a body of equations, ER*s or groups. Each equation and ER appears once somewhere on the GENDER list.
PAGE 20
Its position on the GENDER list is dictated by precedence ordering. Space is reserved with each equation and ER to indicate the selected output variables. Similarly space is reserved for the recording of the decision and tear variables associated with each group. The completed solution procedure vvill. generally be evolved from a skeletal, random listing of the equations in a single group called the crude GENDER list. The completed solution procedure contains all of the instructions for solving the equation set, but is as yet not amenable to interpretation. The conversion operation transforms equations into solved equations via algebraic arrangement. In lieu of destroying the original equation set, the converter operates on a copy of the equations. This feature of GENDER preserves the original model should reanalysis of all or a portion of the solution procedure be required. This eventuality might, for instance, be realized if convergence difficulties of a cyclic group are encountered. Once subjected to conversion, the solution procedure is transformed into an ordered and grouped list of solved equations ready for numerical evaluation. The GENDER System is divided into five major program levels as shown in Figure 1. The program packages COAST (level 1), REMOTE (level 2), SIMPAC and NETPAC (level 3) are discussed in Chapter III. These packages provide the capacity to manipulate certain data structures essential to GENDER. Chapter IV introduces the data base SECEDE and provides greater detail on the GENDER list. The algorithms available for problem analysis are discussed in Chapter V. Level 4 of GENDER is devoted entirely to the analysis algorithms. The highest current GENDER level is level 5. On this level is found the input/output
PAGE 22
10 facilities and the programs relative to interpretation of the GENDER list. The description of the input/output facilities has been incorporated into Chapter IV. The notion of GENDER list interpretation is treated in Chapter VI. Chapter VII is 'a brief user's guide to the GENDER System. In this chapter the expansion of the repertoire of analysis algorithms is discussed, as well as the employment of GENDER as a design tool. Illustrative problems are presented in Chapter VIII. This work is concluded in Chapter IX with some' remarks on the limitations and possible future of GENDER. Particularly in the next four chapters, some sections are extremely detailed. In addition to being difficult to read, they are likely only of benefit to readers contemplating algorithmic additions or modifications to the GENDER System. For this reason, these sections are identified by an * in the section number and may be omitted by readers not requiring the* implementation details of GENDER.
PAGE 23
CHAPTER III DATA MANIPULATION AND STORAGE III.l. Data Handling The algorithms for solution procedure development suggest certain data structures. Effective implementation of the algorithms' requires the availability of these data structures. Unfortunately, the data structures require vast quantities of on-line memory. A large scale problem would, by virtue of the data structures developed during problem analysis, very quickly reach the bounds of on-line memory. Fortunately, not all of the data structures need exist at one time, making feasible the sharing of memory. A priori, the, memory required by each phase of problem solving is unknown. Thus, the simple partitioning of memory is an infeasible sharing policy i Two basic and complementary data storage mediums have been provided: lists and files. The list permits complex data structures which may be readily rearranged, expanded orcontracted. The penalty for this flexibility is high access times. Reaching a particular location may be accomplished only by stepping through all preceding list locations. Conversely, the file allows rapid random access of any location. Files are, however, restricted to a strictly sequential structure. Memory sharing is accomplished by a dynamic memory allocation procedure. For readers not familiar with list processing, Knuth (1968) provides a complete discussion of list processing. principles and structures, including memory allocation. III.l. a. Lists Figure 2 is an illustration of three possible list structures. As 11
PAGE 24
12 o I
PAGE 25
13 indicated.pictorially in Figure 2, the structure of a list is relatively arbitrary. The arrows in Figure 2 represent the connection betv>/een list entries and are called links. Thus one data item (at least) in a list entry is a pointer to an adjacent entry on the list. This flexibility has not been restricted to structure alone. Each entry on a list possesses the attributes of size, quantity of data and organization of the data within the list entry. All of these attributes are also arbitrary. The structure of a list, while arbitrary, is specified by the programs which generate and manipulate the list. That is, the degrees of freedom permitted in the selection of a list structure are consumed by the programmer of a list processing application. Since one of the . objectives was machine independence, and since word size and memory size vary from machine to machine, it seemed necessary to segregate the organization of data within list entries from the tailoring of list structures to meet strictly programming requirements. This has been accomplished by designing the list processor to accept the data organization parameters as data prepared and supplied by the user. These parameters are further discussed in Chapter VII. The utility of a list processor lies mainly in the usefulness of its operations. We shall call the subprograms providing these operations "verbs." Verbs have been provided for obtaining and releasing list entries and for making and breaking the links between list entries. These verbs form the nucleus of the structure manipulation power of the list processor. Another set of verbs provides the capability for transferring information to or from a list entry. Of great utility is the ability to search a list for the occurrence of a particular set of data values. A verb providing this service is also included in the list processor.
PAGE 26
Ill.l.b. Files Figure 3 is an illustration of a typical hierarchical file. The arbitrariness of structure present in lists has, for files, been reduced to the specification of the number 'of levels in the hierarchy. Rapid access to randomly selected entries at any level is the incentive for the sacrifice of arbitrariness in structure. Owing to the sequential storage of file entries in on-line memory, large contiguous blocks of memory allocation may be required. It is, therefore, vital that the file system utilize core effectively. However, the sequential nature of the file entries makes possible the transfer of file data to mass memory devices. This enables the release of on-line memory normally occupied by files during problem solution phases not relying on the file data. Further, even when file data is required, it is possible to retrieve only portions of a file. • A file entry is essentially the same as a list entry, except that the explicit specification of links, as in the list entry, is absent. The organization of data within a file entry is accomplished identically as for a list entry. Thus, the file entry shares the same arbitrariness of data organization provided for the list entry. Many fewer verbs need be provided for file manipulations than for lists since link manipulations are not required. In fact, three verbs are sufficient. One verb is required to provide a file entry and transfer data into it. A second verb provides the capability for retrieval of data from a file entry. Finally, the third verb permits the searching of a file for a particular set of data values. III. I.e. Memory Allocation The particular memory allocation strategy adopted for GENDER continues the theme of flexibility and arbitrariness. Each phase of
PAGE 27
15 a
PAGE 28
.16 problem solving is allocated memory only as it is required. An accounting mechanism keeps track of the memory assigned to each phase. This mechanism permits the release of memory assigned to a particular phase once its task is con^jlete. The released memory may then be reallocated to another phase of problem solving. The allocation, release and re-allocation capabilities give memory the fluid character essential to providing a time varying memory distribution in response to the time varying demands of the solution phases. The dynamic allocation of memory provides an opportunity for fracturing memory into small isolated segments. This eventually would prevent the servicing of a request for a large continuous allocation of memory. Though procedures such as garbage collection have been proposed for reclaiming the isolated memory, these procedures have not been used for GENDER, The need for large blocks of memory has been avoided by designing the file system so as to utilize only reasonably sized continuous blocks of memory. III. 2. Special Data Structures Networks Since the algorithms for solution procedure development in many instances specify rearrangements of the solution procedure, a list structure was adopted. Hence, the solution procedure became known as the GENDER list. During the course of evaluation of the entries on the GENDER list via the interpreter, an anomaly may be encountered necessitating reanalysis of a portion of the GENDER list. In fact, all of the GENDER list from the anomaly to the list end is subject to reanalysis. Consider the following set of equations. (1) ZCz,v) = If reanalysis of Y is required, Z would be subject to reanalysis.
PAGE 29
17 although reanalysis of Z would result in no change. Instead of the list structure, suppose a structure is substituted in which each ent"ry precedes only those entries that it influences. Then, Y and Z would appear on parallel paths since they are independent. This structure is a network, and was adopted for the solution procedure (which is still called the GENDER list). Sparse Incidence Matrices (SIMs) Incidence matrices provide a convenient and lucid medium to express the problem to which an algorithm is to be applied. In fact, many algorithms for solution procedure geneiv ation are most easily explained in terms of their effect on incidence matrices. This is to suggest that incidence matrices may be a natural and effective tool in the implementation of these algorithms. Unfortunately, matrices are relatively expensive in terms of memory requirements. This is particularly damaging in light of the intention to construct GENDER so as to be applicable to large scale problems. In chemical engineering, and perhaps in other disciplines as well, most equations contain only a small number of variables compared to the totcQ. number of variables in the problem. The average incidence for several chemical engineering applications examined was approximately three to four variables per equation. The majority of the incidence matrix elements are null. By considering the matrix elements to be list entries, and by disregarding all null elements, the use of incidence matrices is made. possible without the disadvantage of excessive memory requirements. The elements form the orthogonal list structure shown previously in Figure 2. For example, if an equation contained only two variables, then the row would be composed of only two list entries. The columns represent variables so that each ,of the two row list entries are also members of the orthogonal column lists as well.
PAGE 30
18 III. 2. a. Networks A network is an extension of the forward-backward list, structure to permit each list entiy more than a single forward and a single backward link. The capacity for parallelism is furnished by auxiliary lists called divergers. All list entries other than diverger entries are referred to as network nodes. Figure 4 depicts a node followed by three parallel nodes. Networks have virtually all of the attributes associated with a forward-backward list struct-ure. The arbitrariness of data organization within the nodes is somewhat restricted by the requirement that certain data entries be present as an integral part of the structure. Highly parallel structures may suffer with respect to access times as a result of large divergers. The network verbs implemented are essentially concerned with the peculiarities of network linkages. The list processing verbs for data transfer serve equally well for nodes as for list entries. Subprograms are provided for the connection and for the separation of nodes. A complementary pair of function subprograms permits the extraction of linkage data, one for the forward link and one for the backward link. The policy of providing the capability for searching list structures is continued here for networks. Finally, a rather special verb is provided enabling an orderly, predictable tracing from node to node through a network. This verb, a function called NEXT, has proven to be of considerable utility. III.2.b. Sparse Incidence Matrices Sparse incidence matrices are actually a hybrid of the orthogonal list and of the file data structures. Figure 5 illustrates a sparse
PAGE 31
19 node node node node Figure 4. A Simple Network.
PAGE 32
20
PAGE 33
incidence matrix consisting of two equations and three variables. The files required for the sparse incidence matrix are termed ordinates. Each file entry contains a pointer to a row or column of the matrix. For simplicity, when reference is made in general to a row or column the term vector will be employed. Even with the inclusion of the two ordinates, the memory conservation remains substantial. Consider a system of 1,000 equation in which 1,000 variables are incident. The resulting incidence matrix must contain no fewer than 1,000,000 words of memory if stored as a standard two dimension array. Allowing three words per non-null element (for the horizontal link, vertical link and data item), the elements of a typical sparse incidence matrix would consume only about 9,000 words. The ordinates and supporting data structures would require at most approximately 30,000 words. Thus, the memoiy savings afforded by the sparse incidence matrix exce'eds 960,000 words over the simple two dimensional array. If the ability to pack information into list and file entries is utilized to its fullest extent, the size of the sparse incidence matrix may be reduced by as much as 50% depending upon the word length. The penalty for memory conservation is increased access time. A matrix vector may be accessed randomly and relatively quickly by virtue of the ordinates. Reaching a particular element list entry, however, can be accomplished only by tracing the selected vector from element to element until the desired element is accessed. The nature of the subprograms provided for the manipulation of sparse incidence matrices are rather specific in character. Each subroutine is designed to fulfill the requirement by one or more of the algorithms for a certain sparse incidence matrix operation.
PAGE 34
I II. 3. Implementation Details The implementation of the data handling facilities discussed in Sections III.l and III. 2 has been partitioned into four program packages. COAST is the name given to the program set providing the core allocation and list processing capabilities. The subroutines furnishing the file manipulations constitute the REMOTE system. NETPAC and SIMPAC are respectively the network and the sparse incidence matrix program sets. Each of these packages are discussed in detail in the subsections to follow. The remainder of Chapter III may be omitted by any reader not requiring a knowledge of the programming details. A knowledge of these details is not expected to be generally advantageous except to those readers planning additions to the algorithm library, alterations to an existing algorithm, or alterations to the GENDER facilities. * III. 3. a. COAST To achieve machine independence, FORTRAN was selected as the programming medium. To provide the space required for the development of list structures, a COMMON declaration was employed to reserve a vector named ALLOC. The length of ALLOC is a user specified parameter. The position of a word of memory within ALLOC is referred to as the absolute address, or simply address, of that word. For example, the fifth ALLOC word has an address of five. The memory allocation strategy adopted for GENDER is the buddy system. To reduce the administrative effort required in supervising the allocation of ALLOC to user programs, ALLOC is partitioned into multi-word segments. Segment size is also an adjustable parameter. To permit the allocation of space in sizes other than a single segment, consecutive segments may be combined to form buddies. In fact, two contiguous blocks of memory
PAGE 35
23 of equal size may be combined to form a buddy. Requests for space are satisfied by supplying the smallest buddy satisfying the request. Should only a larger than necessary buddy be available, a request for a lesser amount of space may be satisfied by first fracturing (splitting into two parts) the larger buddy. All of the available buddies of each size are linked together forming an available space list for each buddy size. The operations necessary for memory management are provided by the subprograms C8C0MB and C8GIVE. In order to facilitate the release of ALLOC segments by user programs, an accounting system is necessary. The accounting device adopted is a mask. Each bit of the mask represents an ALLOC segment. A set bit in a user's mask indicates that the corresponding segment is assigned to that user. Each user program is assigned a user mask on its initial request for space. Figure 6 is an illustration of a user mask. A similar mask, established before allocation commences, is provided to record segments released by user programs. Whenever the buddy available space lists become sufficiently depleted that a request for core cannot be honored, then the space represented by the return mask is re-buddied and returned to the available space lists. This strategy eliminates execution of the costly re-buddying process unless it is absolutely necessary. CORN is the program furnished to permit the release of ALLOC segments by a user. The program LIST accomplishes the update of a user mask as memory segments are made available to a user program. A user program requests space via a five word vector called a space utilization record (SPUR). The first word of the vector contains the address of the user mask. For the initial space request, this word must contain the integer zero. The second word will contain the pointer to
PAGE 36
/ /
PAGE 37
25 the space provided during allocation. The third and fourth vector components are respectively the quantity and the size in words of the requested list entries. The list entries are manufactured from a buddy of the appropriate size and provided to the user program as an available space list. The last component of the SPUR indicates the list type, a subject to be considered later in this section. Several programs requiring ALLOC space may share a SPUR vector, thereby sharing the allocated core. Information is contained within list entries in data fields. A data field consists of either all or a portion of a list entry word. Data fields consisting of only a few bits are usually referred to as flags. A data field appearing in one or more consecutive list entry words constitutes a data type. The collection of all data types associated with the entries of a particular list structure constitutes a list type. The quantitative specification of a data type requires four parameters. The first two delimit the bounds of the data type within a list entry. For example, if these parameters are valued at 1 and at 4, the data fields of this data type appear in words 1 through 4 of the list entry inclusively. The second pair of parameters delimits^ the bounds of the data field within a list entry word. The third word, called a shift, is the integer by which a list entry must be divided to place the first bit of the data field in bit position 1. of the dividend. For instance, if the data field begins in bit position 3, dividing by a shift of 4 will translate the field the required two positions. The last parameter is a field mask comprising set bits indicating the bit pattern of the data field. The field mask should be right justified to the first bit position of its single word. The collection of all sets of these four parameter vectors constitutes
PAGE 38
26 the list entry definition (LEND) specifying the organization of data fields within the list entries of a list type. Thus, a LEND is required for each data type. COAST utilizes the subroutine COIN to accept the LEND's from a user as data. COIN is the only COAST routine requiring data. In order to accomplish the transfer of information to or from the data fields within a list entry, the data fields involved in the transfer operation must be uniquely identified. It is to be permitted that a single transfer operation may involve many data fields from many different data types. Thus, the transfer operation requires two vectors, one reserved for the values of the data fields and a second to identify the data fields. The latter vector consists of three words per data type involved in the transfer, plus an additional word specifying the number of data types. Each three word set comprises a data type, the" occurrence of the first field for transfer and the occurrence of the last field for transfer. For example, a three word set (4, 2, 7) indicates that the data type is 4, the first field transferred will be the second and the last field transferred will be the seventh. The transfer for data type 4 will consume six words of the value vector. All of the COAST verbs performing data transfer operations employ the vectors described here, except COPY. COPY performs the direct list entry to list entry transfer of information, and does not require, a vector for value storage. The first occurrence in a list entry of data type 1 was selected for the forward link. Similarly, the first occurrence of data type 2 is reserved for the backward link when backward links are required. Technically, links are simply data fields and may be manipulated as data fields using the data trransfer subprograms. The convention adopted
PAGE 39
27 regarding data types for links permits the creation of faster, more convenient verbs specific to link manipulations. It is the nature of the forward-only list to prohibit the access to the predecessor of a list entry. The absence of the backward link makes necessary special handling of operations involving the removal of entries from a forward-only list. In particular, if the last entry is to be removed, it is not possible to set the forward link in its predecessor to zero since the address of the predecessor is unknown. In this situation, the last list entry becomes a private termination cell, PTC, (Cooper and Whitfield, 1962/3) and is fitted with a forward link of 1. Thus, a unity forward link is the identifying characteristic of a PTC. PTC's remain linked into the list but are not otherwise an active part of the^list. If the list entry is to be removed from a forward-only list, the entry itself cannot be physically removed as its precursor in the list (which points to it) is not known. However, by copying the entire contents of the list entry follov/ing the one to be removed into the list entry to be removed, one has created the effect of removing the chosen entry. The list entry following is then deleted from the list and added to the user's available space list. Table 1 presents a list of the COAST verbs which are the primary list processing subroutines. Omitted from Table 1 are those COAST programs which are not of direct utility to the programmer of a list processing application. Three verbs included in the table require further attention. LOCATE, as its name implies, searches a list for the occurrence of a specified pattern of data field values. The data specification vector employed in data transfer operations provides LOCATE with the
PAGE 40
28
PAGE 41
29 identification of the data fields to be inspected. LOCATE permits two modes of operation which are referred to by the descriptors "AND" and "OR", In the "AND" mode, LOCATE is directed to accept as a match the first list entry found to contain the specified data pattern in its entirety. The "OR" mode relaxes this requirement for matching somewhat. In the "OR" mode, the data pattern is partitioned according to data type. The partitions are compared individually to their respective data fields of a list entry. The search is successful when a list entry is encountered possessing the fields of a data type which match the corresponding data value partition. In either mode, the search may be specified to proceed in the forward direction, in the backward direction or specified to encompass the entire list (accessible from the specified starting point). Like LOCATE, the verbs PUSH and POPUP involve both links and data, but unlike LOCATE result in alterations to the list structure. The PUSH operation is pictorially presented in Figures 7. Although the illustrations are based on a forward-backward list, PUSH operates essentially the same on fo]::vard-only lists with two exceptions. Owing to the absence of the backward link, the push-up mode and the insert-before mode cannot be performed per se. If the position of the data on the list is the important consideration and not the address of the particular list entry containing the data, then the insert-after mode and the pushdown mode may be taken as the equivalent of the push up and insert before modes respectively. The verb POPUP is essentially the inverse of the verb PUSH. Figure 8 shows the POPUP operation in the forward direction. In the case of forward-backward lists, POPUP is symmetrical and will operate equally well in the backward
PAGE 42
c
PAGE 43
31 B B 3,
PAGE 44
32
PAGE 45
,33 direction. Thus, if POPUP from C to B (according to the backward link) is specified, the entries from B through C in the forward sense will be transferred to the user available space list. The data source will be list entry C. In the example of Figure 8, if the operand C were replaced by 0, POPUP would remove from the list all entries from B to the end of the list. For a forward only list, B would of course become a PTC. Again, the symmetry of POPUP allows this mode of operation for forward-backward linked lists. As stated at the beginning of this section, machine independence was a goal of the GENDER system design. Unfortunately, the logical operations "AND", "OR" and "exclusive OR" are required for the mask manipulation operations. These logical operations cannot be conveniently provided directly in FORTRAN, necessitating recourse to assembly language. These operations are basic machine instructions and required little effort to prepare for the IBM-360 or 370. This is expected to be true for all other machines as well. *,III.3.b. REMOTE Avoidance of dependency of the hierarchical file storage system, REMOTE, on large continuous partitions of the ALLOC vector was a paramount consideration in the design of REMOTE. The design is to require file storage in smaller ALLOC partitions, which are somehow connected together to give the illusion of being contiguous. As a further constraint, the linkage mechanism must not seriously interfere with the intention to permit file storage and retrieval form mass memory. Figure 9 shows the structure adopted for use by REMOTE. The catalogue consists of a forward-backward linked list of ALLOC segments (which could contain, say, 32 or 64 words each). The forward and
PAGE 46
catalogue ^' 34 register 1 record 1 -1 1 1 register 2 record 2 V Figure 9. File Structure
PAGE 47
35 backward links are respectively the first and second words of each catalogue segment. All other catalogue segment words may contain the address of a register. A register is identical in structure to the catalogue. Each register segment word (excluding the first and second) may contain the address of a record segment. The set of all record segments referenced by a single register constitutes a record. It is customary, since a one-to-one correspondence exists between registers and records, to say that the catalogue refers to records. It is in the record segments that the files are stored. Record segments may be any desired multiple of the ALLOC segment size. The size is specified via the SPUR vector introduced in the preceding section. The continuity of a record (or should we say apparent continuity) is achieved by virtue of its register. The absolute addresses of all record segments participating in file storage are kept in the register segments. Zero contents of a register segment word indicate that the corresponding record segment has not yet been requisitioned from ALLOC. A negative integer stored in a register segment word indicates that the contents of the corresponding record segment are currently resident on mass memory. Let us briefly review the objectives and constraints noted in the first paragraph of this section before pursuing the features permitting the hierarchical character of file storage. The use of record segments certainly satisfies the stipulation of eliminating any dependence of the file system on large partitions of ALLOC. The registers provide the linkage mechanism for the record segments which is thus segregated from the records and interference with mass memory operations is therefore minimal. Further, the linkage mechanism seems to satisfy the requirement to provide rapid random access and gives the record
PAGE 48
36 apparent continuity to the user. It is important. to note, however, that these objectives were met without creating a support structure that would require a large amount of memory. For example, consider an ALLOC segment to be 32 words and a record segment to be 64 words. A catalogue segment and a register segment, a total of 64 words, can hold the addresses for up to 30 record segments or a total of 1920 record words. Thus, the support structure (catalogue and registers) only consumes slightly over 3% of the total memory allocated to a file storage application. The responsibility for the hierarchical character of the file storage system belongs to the directory concept. Consider, if you will, a file consisting of single word file entries. Into each file entry place the address of a file. This then is the notion of a directory. It is a file which refers to subsequent files. One or more of these subsequent files may also be a directory . giving rise to the hierarchical property. However, care must be exercised with respect to the addresses employed in the directory entries. If absolute addresses are used, the file system would become dependent upon the particular ALLOC buddies serving as record segments. This would seriously impair the use of mass memory. An addressing scheme independent of the absolute addresses of the record segments is required; a relative addressing scheme is used. The relative address of a particular word in a record is simply the integer identifying its sequential position within the record. That is, the ninth word of a record has for its relative address the integer 9. (We shall adopt the convention that the word "address" appearing without the modifier relative will be taken to mean "absolute address.")
PAGE 49
The absolute address is readily calculated from the relative address by using the register. If a record segment has 64 words in it then relative address 132 is in the third record segment, word 4. The absolute address of the third record segment is kept as the third entry in the register. When preparing to add a new file to a record already containing one or more files, it is necessary to know where the last file ends. To this end, the first word of each record (the word in relative address 1) is reserved for the relative address of the first empty word in the record. It is also advantageous, when manipulating a particular file within a record, to know how many file entries constitute the file and how mary words each file entry occupies. A special file entry appears as the first entry of each file containing these two parameters. We shall call this file entry the parameter entry of a file. Figure 10 is an example of the contents of a record. In this example, 16 words are occupied by files, so that the first record word contains 17. The first file commences in word 2 of the record with its parameter entry; this special entry is illustrated as occupying two words. It indicates that the first file contains two single word entries, whose contents here are 6 and 11. In particular, this first file is a directory and its entries contain the relative addresses of two other files. For instance, in word 11 we find the parameter entry of a file composed of two file entries of two words each. Quite naturally, the question arises, as to how access to a particular file entry may be achieved. Access to a particular file entry entails selecting the appropriate record (ie., the address of its register) from the catalogue, and then making selections from each directory to reach the desired file. Once having accessed the file, by using the
PAGE 50
38 word number (Relative Address) 1 3 5 7 9 11 13 15 17 record
PAGE 51
39 number of words per file entry, reaching any particular file entry has been reduced to a problem primarily in counting. The required selections to be made from the catalogue and directories are specified by a vector, LISTER'. The first word of LISTER is its dimension, or in other words one plus the number of choices. The record to be selected from the catalogue is indicated in the second LISTER word. If the dimension of LISTER is N, then the next (N-3) components of LISTER specify selections from the directory hierarchy. (There is no requirement that directories need be employed if a record is to contain only a single file.) Finally, the last LISTER component, the Nth, identifies the particular entry from the file selected. For example, if the record shown in Figure 10 is record number 10, then the LISTER vector (4, 10, 2, 1) will result in the access of the file entry commencing at relative address 13. (Word 1 indicates the length of the LISTER vector which is 4. The 10 says the address of the register for this record is in the tenth entry in the catalogue. The 2 says we are to go to entry 2 of the initial directory which points us to file 2. The 1 indicates we want the first word of the file which is word 13.) The LISTER vector provides sufficient information for accessing an entry in an existing file, as in the transfer of data from a file entry. When data is to be stored in a file which until this point has not existed, supplemental information is required about the size of any new directories, the size of the new file and the number of words per file entry. This supplemental information is required to insure that sufficient space is reserved (since later entries may be added) for each new directory and file added to a record. This information is provided by a second vector supplied by the user, the length of which
PAGE 52
is 2+ the number of directories. If LISTER(l) is N, then the number of components in the auxiliary vector is (N-1). Note that it is necessary only to provide the number of entries in each directory and not also the directory entry size since by convention the directory entry size is permanently fixed at unity. Directory sizes account for the first (N-3) components of the auxiliary vector. The remaining two components are respectively the number of file entries and the file entry size. The supplemental information is of utility only for those directories which have not previously been established. Components corresponding to existing directories are ignored. Consider a file processing scheme involving the access of many entries on a particular file. The catalogue and directory selections, if repeated for each file entry, would constitute needless repetition since access of the same file would be the result each time the selection sequence is executed. Thus, it is desirable to provide the means ofreaching another entry in a file from a file entry that has already been accessed. The move relative to a given file entry to reach another is specified by providing the distance (i.e. number of file entries) of the move and the direction of the move. The LISTER vector is the vector for this information. LISTER(l) is set to 1, indicating the move-relative mode. LISTER(2) contains the displacement as a signed integer, with positive and negative values indicating forward and backward displacements respectively. The LISTER vector (1, 1) would access word 14 of the previous example. Repeating with (1, 1) would then access word 15, and so forth. If movement relative to a particular file entry is to be accomplished, one must know exactly the location of that file entry. Unfortunately, knowing the location of a file entry involves more than simply knowing
PAGE 53
4:1 its absolute or relative addresses, though these addresses are certainly essential. It is also necessary to have available tie address of the record segment, the sequence number in the record of the, record segment, the register segment address and the particular record segment word referencing the record segment. This is by no means a complete list, for many other parameters have been found to be of utility in expressing positions within files or of utility in executing the relative move itself. To provide a storage medium for these parameters, a vector, JCLOAD, has been created. This vector consists of 30 components, each of which is described by the comments to program C4ADRS in Appendix A. For most users it will be sufficient to know that the vector exists and is provided by the user, and that user changes to the vector are prohibited if the relative movement option is to be exercised. As a result of the sequential appearance of file entries within the files, no verbs for link manipulations are required. In fact, the user is provided with only three verbs for performing manipulations of file storage. These are STORE to store data in a file entry, FETCH to retrieve a copy of data in a file entry, and FIND to locate a file entry containing a particular data value pattern. The specification of the data fields to participate in the data transfer operations is accomplished identically as in the description in the preceding section for COAST. REMOTE does require certain restrictions with respect to data types. Table 2 gives the data types, with their LEND components, which are necessary. Beyond these four data types, the user is free to organize the LEND in any convenient fashion. The V in Table 2 indicates locations where the user may exercise choice. One eventuality of file storage has until now been neglected. It is possible that a file entry occupying several ALLOC words may not
PAGE 54
42 ^
PAGE 55
43 exactly fit at the end of a record segment. Two policies are possible. One, the file entries are required to be continuous, risking the waste of a few words per record segmeint. Two, the partitioning of file entries between record segments is to be allowed. If the file entries are not small with respect to record segment size, the latter policy is clearly more desirable with respect to efficient use of memory. Since the sizes of file entries and of record segments are choices permitted to the user, and since the restriction of the user's freedom to organize a file structure was to be minimized, the partitioning of file entries is allowed by REMOTE. As with the JCLOAD vector, the user need not be aware of file entry partitioning to successfully employ REMOTE. The user may prevent partitioning by a judicious choice of the record segment size or of the number of words required by the parameter file entry initiating the file. This latter play is implemented by the word index selection in the LEND component for data type 4. The parameter entry (See Figure 10) is structured with data type 4 concluding the entry. Thus, by adjusting the number of fields subtended by data type 4, it is possible to regulate the size of the parameter entry without otherwise disturbing its contents. * III.3.C. NETPAC The basic network structure has been discussed in Section II. 2. a. As noted there, certain data fields are essential to the network structure. That is, the links alone are insufficient to adequately define a network structure. Table 3 is a list of the data fields augmenting the link fields. Of these additional fields, only data type 3 and the first two fields of data type 5 are of an essential nature. In order to differentiate , nodes from diverger entries, some unambiguous feature must be provided
PAGE 56
44 M
PAGE 57
to each. This feature is a flag, which is zero for a diverger entry.' The first field of data type 3 serves as the flag. The + symbol in the LEND for data type 3 indicates that the mask may encompass more than a single bit. The first two fields of data type 5 contain the number of paths leaving a node in each direction. These fields are absent from diverger entries. The remaining data fields listed in Table 3 are not essential to the network structure, but are required if the network is to be traced using the verb NEXT. The trace strategy employed is somewhat involved. Each trace is assigned a unique trace key. We shall call this key the master trace key. The purpose of the key is to flag the nodes which have been encountered by the trace so they may be distinquished from those which have not yet been reached. This is necessary since several paths may lead to the same node. Upon the first encounter of a node, which is indicated by its trace key being unequal to the master trace key, the trace key is set equal to the master key and the counter in field 3 of data type 5 is set to unity. Successive encounters with this node will be indicated by the trace key matching the master key. The counter is incremented by one at each encounter of the node. When the counter matches the first field of data type 5 for a backward trace or the second field of data type 5 for a forward trace, a node has truly been "reached." Further, it is only upon meeting this criterion that the links leading from a node in the direction of trace may be examined. , The trace strategy was dictated primarily by the needs of the interpreter in evaluating the components of a solution procedure. No component may be evaluated until all preceding components have been evaluated. That is, no node is considered as reached until all paths
PAGE 58
leading into the node have been followed. Figures 11 through lie illustrate the steps in tracing a simple network. The data fields appear in the nodes shown in the order of their occurrence in Table 3. For simplicity, each is assumed to occupy an entire word. An * appears beside each node as it is reached. Let us consider Figure lie. The count does not match the number of backward paths. This causes the trace procedure to backtrack and consider the path parallel to B. For more complex networks, it is necessary to distinguish the parallel paths yet to be considered from those which have already been inspected. This distinction between paths is facilitated by an auxiliary push-down list. Each entry on this list points to a diverger entry. These diverger entries are the first on their respective divergers which have not yet participated in the trace. The top member of this list always points to the last parallel path eneountered and the first to trace when the current path terminates. It may be noted that the sub-nodal network trace key played no part in the trace illustration. This trace key is the master key for networks existing as auxiliaries to network nodes. The import of the network within a network will be pursued in Chapter IV. When the sub-nodal networks are present in a network structure, the trace procedure accounts for their presence by entering each auxiliary network just prior to advancing to the next node on the main list. For example, if node A of the trace example presented in Figures 11 through lie possesses a sub-nodal network, node B is not considered to directly follow A in the network trace. Rather, the first node of the sub-nodal network follows A in the trace. A unity identification flag identifies nodes possessing sub-nodal networks. All nodes possessing flags greater than unity are not permitted sub-nodal networks.
PAGE 59
.'A7 Start node Forward Diverger Parallel Paths End Node Backward Diverger Figure 11. Trace (Start).
PAGE 60
* i 48 Figure 11a. Trace (Stepl).
PAGE 61
Figure lib. Trace (Step 2).
PAGE 62
F,0' Figure lie Trace (Step 3 no node selected).
PAGE 63
Figure lid. Trace (Step 4).
PAGE 64
Figure lie. Trace (Completed)
PAGE 65
As a result of networks within networks, the auxiliary list employed by the trace procedure must be complicated somewhat. The paths yet to be inspected at each level in the network must be segregated from those of all other levels. This segregation is accomplished by a list composed of one entry per network level. Each entry points to a list indicating the remaining parallel paths on a particular level. The manipulation of this auxiliary list structure is not required of NETPAC users. The subroutine NEXT is the NETPAC verb providing the trace capability. NEXT requires only that the user indicate the address of a current node and the value of the master trace key. NEXT performs all of the network and auxiliary list manipulations necessary to provide the user with the address of the next node in the trace sequence. The COAST verbs require SPUR vectors to indicate the size of list entries and the list type. In order for the NETPAC verbs to employ the COAST verbs, it is necessary to provide a battery of SPUR vectors, since many different sizes of list entries appear in the networks used in GENDER. One SPUR is required for each list entry size. To satisfy this requirement, a sequence of SPUR's graduated in sizes from a single word list entry up to the largest possible list entry size are stored in a continuous ALLOC partition. It is expected that this SPUR block will typically be less than the ALLOC segment size. Having the SPUR block only solves half the problem. To be able to select the proper SPUR, one must know the sizes of the various list entries constituting the network. A vector, which we shall call the information block, contains this data. The values for each information block component are provided as data by the user. Only three pair of
PAGE 66
the 28 information block components are required by NETPAC. These pair are components 8-9, 20-21 and 22-23, and are associated with networks employing list types 2, 6 and 5 respectively. Networks have been restricted to list types 2, 6 and 5 primarily as a programming convenience since the use of NETPAC external to GENDER is doubtful. Information block components 8, 20 and 22 indicate diverger entry sizes, while con^jonents 9, 21 and 23 are node sizes. The identification flag distinguishes nodes from diverger entries. Although more than one type and size of node may appear in a network, NETPAC requires access only to data types 1 through 5. Since every node contains these data fields, the SPUR for any node will suffice NETPAC. For the user's convenience, information block components are reserved for the sizes of the other nodes permitted to list types 2 and 5. Discussion of the remaining information block components is deferred to the particular cha'pters to which they are relevant. ' The information block introduced in the preceding paragraph resides in ALLOC. The address of this block is recorded in the seventeenth ALLOC word. Consequently, access to information block data is relatively simple and the data is available to all GENDER subroutines sharing ALLOC. It would seem advisable to make similar provisions for the SPUR block. In fact, a vector, NIMBL, has been invented to contain the addresses of the network and the SPUR block. NIMBL also contains the value of the master trace key. The address of the NIMBL, thus, furnishes sufficient data to permit the access and manipulation of a network. Table 4 is a list of the NETPAC verbs. BREAK and COUPLE appropriately adjust the path counters, as well as. performing the necessary link manipulations. One node to be separated from a second via BREAK
PAGE 67
55
PAGE 68
must be specified by its absolute address. Although the second node ' may also be specified by its absolute address, it may be designated by reference to a path leading from the first node. Referring to Figure 11, node A may be separated from node C by providing BREAK with the addresses of both A and C, or with the address of A and the integer 2 . indicating the second diverger entry. The path specification mode is available to both forward and backward directions. That is, A may either precede or follow C. BREAK is designed to provide the calling program with the path position if the addresses of both nodes are specified, or with the address of the second node otherwise. This feature has proven to be of use in the algebraic package, GALAP. COUPLE requires the specification of the addresses of both nodes to be connected and the specification of the path positions. While the order of diverger entries is of little consequence to solution procedure network, the arrangement of parallel paths is of considerable importance in GALAP. Consequently, COUPLE has been designed to permit selective path placement. The verb SEARCH provides the capability to search a network for a specified pattern of data values. The data values and the corresponding data fields are provided to SEARCH identically as for the COAST verb LOCATE. SEARCH employs NEXT in performing the network trace. Networks possessing a single starting node and a single terminal node may be readily searched in either direction. However, a network having multiple terminal nodes cannot be completely searched in the backward direction. The selection of a terminal node to serve as the initial trace node excludes from the trace, at the very least, the other terminal nodes.
PAGE 69
f;7 * Ill.S.d. SIMPAC Section III.2.b provided a glimpse at the sparse incidence matrix structure. This section will further detail this most important data structure. The ordinates of an SIM (sparse incidence matrix) are applications of REMOTE. However, this need not have been the case. The ordinates might simply have been continuous partitions of ALLOC. An ordinate of 1,000 entries would require a maximum of approximately 9,000 words. This would constitute a demand for a buddy unlikely to be available, except when specially provided. The implementation of the ordinates as REMOTE records eliminates the requirement for special supervision of the ALLOC allocation mechanism. Further, the use of a record as an ordinate entails no further sophistication of the REMOTE facilities. Figure 12 shows a sparse incidence matrix with the ordinates detailed as REMOTE records. This matrix is the same as the one in ,, Figure 5, but shown here in more detail. List type 3 has been selected for the ordinates. A number of data fields are required for each ordinate entry. For convenience, these fields are tabulated in Table 5. A few of these fields require further clarification. The status flag is a relatively small field reserved for use by the solution procedure generation algorithms discussed in Chapter V. When equal to one, the dimension flag indicates the substitution of a pointer to an auxiliary data block for the name in data type 9. The auxiliary data block contains the name, dimensionali-ty and index values as whole word entries each. The name is more properly called a code name. The code name uniquely identifies the occurrence of a function, ER, constraint or variable in the data base SECEDE. SECEDE and the rationale of code names is discussed in Chapter IV. Data type 8 has, no significance for
PAGE 70
58 w o o ^ c o c o o o I , >c row ordinate
PAGE 71
59 o o ^ a (V PS to c •H O ft c 6 3 H O CJ o o ^ CO + > rH CO C COO O -H -H '-"^ •H ^-1 -p a< •HOD +J c o G 3 U 0) ^ bD CO c a; e QJ H q; «P o 5^ C Qj e e H 3 O ^ O > > > >. >" >" >^ >^ >" >" >' >" > > « > > p. p 3 3 ^ ra O (U H CD ^ -H e u 3 CC Z > C 3 S & bO 0) H Oh •H 4-> H 4-
PAGE 72
60 the column ordinate entries, since all columns represent only variables. The group mentioned in Table 5 for data t^/pe 8 will be pursued subsequently in Chapter IV and is moire properly called a protected group. For our purposes in this section^ it is sufficient to regard a protected group and the ER (for external routine) simply as functions. That is, they are functional relationships involving two or more variables. If the multiple output flag is set to one, the output assignment in data type 13 is replaced by a pointer to a list of output assignments. Two words are required for each list entry. The first contains the link and the second contains the output assignment. An output assignment is simply a row or column number depending on whether the ordinate pertains to columns or to rows respectively. Each element of a sparse incidence matrix must also carry some information in addition to the links. In particular, it is necessary to 'know to which column and row an element belongs. This information is provided by fields reserved for the row and the column indices. Other fields are required, but are of a more specialized nature. Table 6 summarizes the data fields appearing in each element. The field for the sensitivity may be omitted at the user's option. The status flag and output selection cost are required for the output assignment and other algorithms. List type 4 is reserved for the SIM elements. The 28 component information block introduced in the preceding section contains components pertinent to the SIM. Table 7 indicates the information block partition dealing with the SIM. As in the case of networks, a SPUR block is essential in constructing and performing manipulations on an SIM. The SPUR's required correspond to LOAD vector size (30 words), the element size, ordinate
PAGE 73
61
PAGE 74
62 4-> C 0) c o o
PAGE 75
63 segment size and list entry sizes from a single word up to the largest required for an auxiliary data block. TViis largest list entry size is determined as (2 + maximum dimensionality). The maximum dimensionality is contained in the fifteenth information block component. The individual SPUR' s appear in the SPUR block in the order of their enumeration above. The point of reference in the SPUR block was selected as the sixteenth word of the block. That is, the address used to access the SPUR block is the first word of the SPUR for a single word list entry. Decrementing this address by five accesses the SPUR for an ordinate segment. Not only has the SPUR block been adapted from NETPAC, the SIMBL is not unlike the NIMBL. The first two words point respectively to the column catalogue and the row catalogue. The third SIMBL word points to the SPUR block. The description of the SIM structure in detail is completed by stating that the address of the LOAD vectors are contained in the catalogues. That is, the address of the LOAD vector for the row ordinate appears in the second catalogue word. It is permissible for an SIM to be equipped with more than a single row and a single column ordinate. Working, or temporary ordinates are frequently utilized by the solution procedure generation algorithms. Because of the inclusion of the LOAD vector addresses in the catalogues, all ordinates are odd numbered REMOTE records. The majority of the SIM verbs are specialized in nature, dealing with a single, generally repetitive SIM operation. The SIM verbs are listed in Table 8. The SIM generator, SIMGEN, performs a great, deal more than a simple SIM manipulation. SIMGEN uses the list of functions, ER's, etc. belonging to a partition of the solution procedure (called
PAGE 76
64 +-'
PAGE 77
<^^ a group) for which further analysis is required as the basis for SIM generation. Each functional relationship is assigned a row in the order of occurrence in the group. SECEDE furnishes SIMGEN with the incidence and output assignment cost data. SECEDE is described in Chapter IV. In addition to structuring the SIM, SIMGEN also initializes the row, column and element status flags at zero. The utility of the SIMPAC verbs will become more obvious in Chapter IV.
PAGE 78
CHAPTER IV DATA BASE The information constituting a system of equations and the associated solution procedure must be readily available. One approach to the data base would have been the inclusion of all information relative to an equation set within the solution procedure. As noted in the preceeding chapter, the network structure was adopted for the solution procedure for reasons of flexibility and ease of manipulation. The concept of the unified data base would, during certain operations, encumber the solution procedure with much more data than required. An alternative approach involves providing the general information apart from the specific information pertinent to the solution procedure. IV. 1. Service Module, SECEDE The general information phase of the data base must at times augment the information within the solution procedure. For instance, during generation of a sparse incidence matrix the variables appearing in an equation must be known. Since this information is not contained within the solution procedure (as SIM generation is one of the few instances when it is required), it must be extracted from the general information. Further, since the equations on the solution procedure are subject to re-ordering, it seems appropriate to require rapid random access to the general information. The file system, REMOTE, described in Chapter III not only fulfills the requirement for rapid random access, but also permits the release 66
PAGE 79
of ALLOC space by the transfer of data not currently required to mass memory. The application of REMOTE to the storage of information relative to an equation set is termed the service module (SECEDE). The organization of data within SECEDE required careful consideration. First, the construction of a library of data relative to various processing units is to be permitted. Second, the organization must permit the deletion or inclusion of units from SECEDE. Finally, SECEDE should permit the reorganization of the flowsheet (i.e., connections between units). All of these considerations are essential if the employment of GENDER during the synthesis phase of design is to be feasible. The first two requirements are satisfied by assigning each unit to a separate record. The third requirement is satisfied by restricting all of the information on stream connections to a single record called the zeroth unit. Thus, reorganization of a flowsheet would involve changes only to the zeroth unit unless additional units or unit substitutions are involved as well. It is, of course, not known a priori what position a unit, which may be from a library, might occupy in the service module. This necessitates a code name assignment scheme for the variables and equations which will produce unique codes. The variables and equations within each unit are sequentially assigned code numbers commencing with unity. The unique code is developed by adding to the code number, as assigned within the unit, the unit number multiplied by an arbitrarily selected scale factor. For instance, vari'able 5 of unit 9 would be known by the code 905 if the scale happens to be 100. The code 905 differentiates this particular variable from the fifth variable of all other units.
PAGE 80
68 IV. 2. Solution Procedure, GENDER Lis.t For the reasons noted in Chapter III, the solution procedure is a network application. It is expected that many solution procedures will involve cyclic calculations. The GENDER list must reflect the existence o£ such cycles. Special nodes are provided, called groups, which represent the occurrence of a special set of functional relationships. These may be cyclic, or may be grouped because of other common characteristics. The group node appears in the network as a representation of the group members. Membership within a group is indicated by the nodes of a network called the group body. Each group contains the address of its group body. Groups as well as equations, ER's and constraints may belong to a group body. The group bodies give the GENDER list a dimension of depth i.e., networks within networks. • The GENDER list must be a complete specification of the solution procedure it represents. That is, the GENDER list must reflect decision variable selection, output set assignment, precedence ordering, tear variable selection, and selection of the method for resolving cyclic calculations. Data fields and/or auxiliary lists are provided to store all of the foregoing information with the exception of the precedence order. The precedence order is reflected by the arrangement of the nodes on the GENDER list. IV. 3. Input/Output Facilities The initial point for a GENDER list is generally expected to be the crude GENDER list generated by a program called CUDGEL. Each equation, ER and constraint is represented by an entry on the crude GENDER list, but missing are the details and auxiliary lists necessary for a complete solution procedure specification. Though this may be
PAGE 81
• 6y the usual starting point, it will not always be most convenient. For instance, a solution procedure might be completely developed, but interpretation prohibited by the lack of a value for an algorithm selected decision variable. For operation in a batch machine environment, this eventuality would cause the effort of analysis to be wasted unless recovery facilities are provided. While one obvious solution is to require estimates for all variables prior to initiating analysis to prevent the development of this particular situation, an inordinate amount of effort would be required from the user. This is but one instance of when an analysis might be wasted. Others exist, and enumerating precautions against all is unlikely. The recovery mechanism has been incorporated into the input/output facilities. While the recovery provisions are not automatic, they do posses the virtue of simplicity. When the development or interpretation of a solution procedure must be abandoned, the service module and the solutionprocedure may be saved for use at a later time in one of two ways. Both SECEDE and the GENDER list reside in the ALLOC vector. Hence, a copy of the contents of ALLOC will save SECEDE and the GENDER list. The second approach involves the output of only SECEDE and the GENDER list. This latter strategy will greatly reduce the output volume, but this is not the primary advantage. The format of output may be adjusted to produce a much more manageable medium. Particular significance will be attached to each output record and the output records formatted according to content. The medium selected for storage of service modules and solution procedures for later use is punched cards. Thus, when the solution of a problem must be aborted, the programs SECIAO and GENIAO may be directed to produce respectively the contents of SECEDE and of the GENDER list
PAGE 82
70 , in card form. These cards may later be read by SECIAO and GENIAO to resume solving the problem. Observe that a solution procedure, complete in every detail, may be stored in card form as readily as a partially complete solution procedure. In. fact, a library of solution procedures may be amassed to eliminate repetitive analysis of problems which are frequently solved. The format of each card generated by SECIAO and by GENIAO is presented in Appendix A in terms of data fonnats. This is permissible since the input and output formats are identical. For the convenience of the user, a printed output will always be provided with card output. In fact, a printed only output mode may be selected for both SECIAO and GENIAO should the punched card output not be desired. IV. 4. Implementation Details The remainder of this chapter delves into the implementation details for SECIAO and for GENIAO. These details will be of utility only to those users wishing to prepare programs which directly access either SECEDE or a GENDER list. Most users should find the program comments for SECIAO adequate to encode properly the statement of the problem as SECIAO data. The printed output of both SECIAO and GENIAO is preceded by a table indicating the composition of each type of output line. A third subprogram, VARIAO, completes the input/output facility package. VARIAO supplies a user with a list of variables for which values are required. VARIAO is provided primarily .for use by the interpreter, GLINT, to indicate variables encountered for which values have not been provided. * IV. 4. a SECEDE Basically, the service module, SECEDE, is an application of REMOTE.
PAGE 83
71 The REMOTE system is founded on the premise that all entries of a file are of the same size. Unfortunately, exceptions to this fundamental premise may arise. For example, SECEDE is required to store functions in terms of the variables, operators and constants of which they are composed. All three entry types require data fields for an identification flag and a code name. However, the variable also requires fields for the dimensionality and, if applicable, the indices. While it would certainly be possible to insist that all file entries representing a function be equal in size, the opportunity for wasting considerable ALLOC space would just as certainly be present. This, eventuality would be realized for all functions containing only a few dimensioned variables with respect to the total number of entries. The apparent inconsistency between storing functions as REMOTE files and efficient memory utilization can be reconciled, albeit artificially. To each file entry add another data field containing, the length of the entry. Moving from one file entry to the next would involve adding the file entry length to the current position in the file. Except for the variations in file entry length, this procedure is decidedly reminiscent of the relative move capability already present in REMOTE. In fact, if REMOTE were led to believe that the file entry length is unity, and if the actual entry length is used as the number of file entries to advance, then movement can be accomplished via the REMOTE relative move mechanism. Before proceeding, we should clearly 'differentiate the two types of entries discussed in the preceding paragraph. When establishing a file, the JCFINE vector specifies the file entry length. This is a fixed number and is the length employed in specifying the length of a file. The entry of variable size is not a true file entry. It is rather a sequence of one or more words of a file which we choose to
PAGE 84
treat as a single entity and to which we attach special significance. Let us assign the acronym ASE to the adjustable size entries, while reserving the term file entry to mean true file entry in the REMOTE sense. A file composed of ASE's strongly resembles a forward-only list. That is, the length stored in each ASE serves as the link to the next ASE. Consequently, we shall refer to this scheme as relative linking, and to the stored length as the relative link. The last ASE must contain zero for the relative link just as a terminal list entry must contain zero for the forward link. Since the identification flag stipulates the fields within the last ASE, and since the LEND stipulates field placement within the ASE, the zero length specification presents no hindrance to data transfer. A hindrance to data transfer does, however, exist. The file entry length must be specified as unity to permit relative linking. Normally, REMOTE will not permit data transfer operations to exceed the bounds of a file entry. The ASE's are expected to be multi-word entries. To circumvent this problem, REMOTE was adjusted to permit the violation of file entry bounds if L0AD(29) is set equal to -1. The user must ensure that L0AD(29) is properly set before attempting acces to any file. LOAD (2 9) should be for all files not employing relative linking. As we noted earlier, an ASE file resembles a forward-only list. Consequently, it is not possible to randomly access the ASE's. This need not be the case. Suppose the relative links are removed from the ASE's and placed at the beginning of the file. The value of the relative links would, of course, be different since the relative link is the number of words to advance from the current position to the ASE.
PAGE 85
What we have developed is the notion of a directory, employing relative links instead of relative addresses, which is internal to a file. The term internal directory shall be employed to describe this placement of the relative links. Files containing ASE's in the list format will be called sequential access files, SAP's. Files containing unlinked ASE's and an internal directory will be called random access files, RAF's. The RAF does not provide a storage capability which can not be duplicated by an ordinary REMOTE file structure without recourse to ASE's. This could be accomplished by establishing each ASE as a separate file and providing a directory permitting random access to the separate files. However, this structure demands that the relative access be accomplished at the expense of repeating all catalogue and directory hierarchy selections for each access. The RAF structure permits the access computations to commence with the internal directory, since this directory and the ASE's are actually all members of a single file making the REMOTE relative address capability applicable. That is to say, the RAF access time would be generally shorter. SECEDE consists of at least five records, each record containing from one to five files. These files include all three types; ordinary REMOTE files of equal sized entries, SAF's and RAF's. Each record will be given individual attention. In the discussion to follow, the notation (t i f j) will be used. The letters i and j represent integers indicating data type and data field respectively. The letters t and f should be translated as type (i.e., data type) and field. If we were to speak of a data field (t5f9), we will be considering the ninth field of data type 5. On occasion it may be convenient to expand our field designation shorthand to include a range of fields for a single data
PAGE 86
74 type. For example, (t5f7-9) is translated as fields 7 through 9 of data type 5. Armed with the above bit of cryptography we are prepared to inspect the purpose and contents of record one. Tables 9 through 11 may be of assistance in this discussion. The first record consists of a directory and two files. The files contain respectively decision and tear variables and are of the SAF type.. Each of the ASE's contain the data fields (tlfl-3), plus an additional two words for each degree of dimensionality. The two vrord allocation for each index is required to permit the specification of minimum and maximum of an index range. A single ASE may represent, for a dim.ensioned variable, a single component or many components. Each word reserved for an index contains the fields (t9fl, tlOfl, tllfl, tl2fl, tl3fl, tl4fl, tl5fl), which correspond to the seven constituents permitted in an index calculation as discussed in "Appendix B. These constituents, in the order of the fields, are mapping flag, mapping index, operator flag (0 for multiplication by scale and 1 for division by scale), sign flag for scale (0 for positive and 1 for negative), scale, sign flag for offset (0 for positive and l.for negative) and the offset. The mapping flag may be either for no map, or may be 3 indicating mapping to another index of the same variable. If the mapping flag is 0, data types 10-14 are ignored and the offset is taken to be the index value. As a matter of convention, all data structures requiring the seven part indices will employ data types 9-15 exactly as described here. The second and third records in SECEDE each contain only a single file. These files are ordinary REMOTE files composed of file entries all equal in size. Each file entry contains alphameric characters forming the name of an operator in the case of record two or the name
PAGE 87
75
PAGE 88
76
PAGE 89
77
PAGE 90
$ as
PAGE 91
79 H
PAGE 92
80 H
PAGE 93
of a method in the case of record three. A method is a user prepared subroutine for supervising the convergence of a cyclic calculation during interpretation. The notion of a method is further pursued in Chapter VII. The entries of records two and three may be described as (tlfn), where n is the number of words per name. The processing units are regarded in GENDER to be completely separate entities. To form a processing plant, the units must somehow be connected together to permit the transfer of material between the units. This physical connection of units is represented algebraically by a connection equation. For example, VCN201 = VCN422 is a connection equation relating variable code name (VCN) 201 to variable code name 422. If the scale factor for unit numbers employed in developing the unique code names is 100, then this example indicates the equality of variable 1 of unit 2 with variable 22 of unit 4. It is entirely possible that a single variable may appear in several connection equations. That is, many variables may share a common value. This leads to the notion of a common storage location for the value of all variables sharing a common value as stipulated by connection equations. Further, if the unit variables are connected by the sharing of value storage locations, the need for explicitly stating the connection equations in either SECEDE or' the GENDER list is eliminated. Unit is contained within record four of SECEDE and is reserved for common variables. This record contains three files. The first file is an RAF and contains data relative to the dimensionality of the common variables. The similarity of function between this file and the DIMENSION statement in FORTRAN suggested the name declaration file. Apart from those containing relative pointers, each declaration file ASE will contain the fields (tlf(2+d)), where d is the dimensionality.
PAGE 94
Field (tlf2) contains the dimensionality. The d fields reserved for the indices indicate the maximums of each index. The field (tlfl) is the pointer to the value storage location. The field is an absolute pointer which is^ computed by the program SECIAO during the establishment of SECEDE. In particular, the absolute address corresponds to an entry of the common variable value file. Although this file is only the second on the record, a LISTER of (4, 4, 3, 1) must be employed to permit access. The second directory entry is reserved for the number of common variables. The variable value file consists principally of entries of the form (tlfn), where n is the number of words per floating point value. All values are in floating point format. While a single entry containing (tlfn) is satisfactory for scalar variables, many such entries are required for dimensioned variables. If a dimensioned variable appeared on the file expanded into its components, the access of' any variable, appearing later in the file than the dimensioned variable, would require knowledge of the number of dimensioned variable components. That is to say, the random access feature of the file is greatly compromised. As an alternative, let us consider partitioning the variable value file into two divisions. The primary division appears first in the file and contains one entry per variable. For scalar variables, the primary entry is simply the value. For dimensioned variables, the primary entry is of the form (tlVfl, tl8fl), with the fields containing respectively the integer 21 and a relative link to the first of a sequence of entries in the secondary partition. This sequence of entries encompasses the values of every component of the dimensioned variable. The integer 21 is provided as a safety measure but has proven to be of only occasional utility.
PAGE 95
83 The third file of unit is the common variable name file and is referenced by the fourth directory entry. The entries of the variable name file are identical to those of the operator name and method name files of records two and three. Each record following record four is designated as a unit. The unit records are considerably more complex than any record we have previously considered. A unit record comprises eight major file divisions, four of which are further subdivided by second level directories. The individual files are all of types we have already considered in the first four records. The first entry of the first level directory references an eight entry second level directory. Entries 1, 3, 5 and 7 of the second level directory reference declaration files for variables, ER's, equations and constraints. Directory entries 2, 4, 6 and 8 are respectively reserved for the numbers of variables, ER's, functions and constraints. The four declaration files are essentially the same as the common variable declaration file of record four. The variable declaration file requires the addition of a data type 1 field between the value address and the dimensionality, making each entry of the form (tlf3+d). This additional field is reserved for the code name of a common variable. When a unit variable is declared common by a non-zero (tlf2) field, the common variable code name and value supercede those of the unit variable during preparation and interpretation of the GENDER list. That is, the common declaration substitutes for the connection equation. The remaining three declaration files require only the fields (tlfl+d), where the field (tlfl) is the dimensionality.
PAGE 96
84 The second and third first level directory entries refer to the variable and constant value files. The variable value file is identical to the common variable file of record four. The constant value file is quite similar to the variable value file, except that all constants are single entities making the provisions for dimensioned variable components unnecessary for the constant variable file. The ER and the variable name files correspond to the first level directory entries. four and five. The name files are structured identical to the files of the second and third records. The first level directory entries remaining correspond to the ER, equation and constraint files. Let us consider the equations. Each equation is recorded on a separate SAF. The equation SAP's are recorded on the equation directory, which is in turn recorded on the first level directory. For example, the LISTER vector (5, 5, 7, 1, 1) would be appropriate to accessing the first equation of unit 1. The equation SAF is not unlike the decision and tear variable SAF's. The first ASE pertains to the equation and is of the form (tlf3, 2xd). The field (tlfl) will always be the relative link in an SAF. The fields (tlf2) and (tlf3) are respectively the number of outputs and the dimensionality. The indices are recorded exactly as they were for the decision and tear variables. Each ASE after the first ASE represents a variable, operator or a constant. A field, (tSfl), is employed as an identification flag . Flag values range from to 2 and correspond in order to an operator, a variable or a constant. The operator and constant entries are identical and consist of the fields (tlfl, tSfl, tl6fl), with (tl6fl) containing the operator or constant code name. The variable ASE contains the fields (tlfl, tSfl, t7fl, tSfl, tl9fl, Ixd). In order of appearance commencing with (t7fl) these fields are
PAGE 97
an output selection cost flag, variable code name, dimensionality and the indices. The algorithm employed for output set assignment permits the use of weights to influence the output set selection process. The weights represent a cost of assignment and are scaled from to 10. One word is reserved for each index which are in the seven part format described for the decision and tear variable files. The ER and constraint files are identical to the equation files except that operators and constants do not appear in the ER files. * IV. 4. b. SECIAO In the previous chapter, it was noted that certain support structures to the sparse incidence matrix were of utility. Much the same situation exists here for SECEDE. The file entries are of varying compositions and sizes, suggesting the use of an information block to serve as a reference table. • The twenty-five word information block, mentioned in Chapter III with respect to networks and SIM's, is again pressed into service. Information block components 1 through 7 are reserved for data pertinent to SECEDE. Table 12 list these components. It should be noted that component 2, the length of a floating point value, is uniform throughout SECEDE. All variables will either all be single precision or all be double precision. Apparently all of the ALLOC space required for SECEDE is in the form of record segments, making the use of a SPUR block a somewhat dubious feature.This is, however, not necessarily the case. In the previous section, the description of the variable declaration ASE's included a field reserved for the address of a storage location. While this is perfectly satisfactory for scalar variables, a single address may not be sufficient for a dimensioned variable. In particular, if
PAGE 98
86
PAGE 99
87 the value locations reserved for a dimensioned variable extend over several record segments, the single address will be inadequate. This situation is remedied by establishing for each dimensioned variable a dimensioned variable address resolution block, DIVARB. It is the address of the DIVARB which appears in the declaration file for a dimensioned variable. The DIVARB encompasses (2+d+r) words, where d is the dimensionality and r is the number of record segments . containing values of the components to a dimensioned variable. The first word of the DIVARB contains the dimensionality d. The next d words contain the ranges of the indices. The (d+2)nd DIVARB word is called the offset. The offset is the integer which when added to the address of the record segment containing the first variable component will give the address of that first variable component. For example, suppose that the values of a dimensioned variable commence with the 2902 nd word of ALLOC. Further, suppose the record segment address is 2861. The offset to be recorded in the DIVARB would be 41. The remaining or DIVARB words are reserved for record segment addresses. The DIVARB permits rapid address resolution for a dimensioned variable component. The variable value file is a linear storage medium necessitating the conversion of multi-index sets into a single index. That is, the set of indices for an array component must be converted into the single equivalent index for the storage of the array as a vector. Except for the length of a record segment and the number of words per value, all of the data necessary for both the index conversion and the address resolution is contained within the DIVARB. The need for a SPUR block is now some what obvious. The size of the SPUR block (i.e. the number of SPUR's requii'ed), however, is not clearly defined. The DIVARB size depends not only on the dimensionality,
PAGE 100
but also on the number of components of a dimensioned variable. The dimensionality and number of components will remain unknown to SECIAO until input of the variable declarations commences. Although it would be possible to complete variable declaration input before preparing the SPUR block and establishing the DIVARB's, it is unnecessary to do so and may even result in the wastage of ALLOC space. A SPUR stipulating a list entry size larger than one half the ALLOC segment size will waste a portion of each segment allocated. This cannot be avoided. However, the SPUR itself can be eliminated. We shall reserve a single SPUR for all large DIVARB's, employing it by altering the list entry size contained in the fourth SPUR word. The SPUR block adopted for SECEDE consists of (2+(ALL0C segment size)/2) five word SPUR's. The first SPUR is provided for the requisition of DIVARB's larger than one half of ALLOC segment size. The second SPUR is appropriate to record segment acquisition. The remaining SPUR's are graduated in list entry size from 1, to one half of ALLOC segment size. It is the address of the SPUR for the record segment which is considered to be the address of the SPUR block. The use of REMOTE requires a LOAD vector. In particular, two LOAD vectors are required by SECIAO for manipulating SECEDE. The LOAD vectors are furnished as a single vector 60 words in length which is called the LOAD block. The entire service module is bound together by a service module block, SECBL. The first word of SECBL contains the address of the SECEDE catalogue. The remaining SECBL words are pointers to the SPUR block, the LOAD block and to an allocation of space reserved for index calculations.
PAGE 101
89 * IV. 4. c. GENDER List We have already established that a GENDER list is actually a network. However, the GENDER list is far from being a simple network. This complexity includes, but certainly extends beyond, the concept of depth discussed briefly in Section IV. 2. To assist in describing the details of the GENDER structure, Tables 13 and 14 summarize the data types and list entries embodying a GENDER list. The fundamental GENDER list building blocks are nodes representing equations, ER's or constraints. Nodes in this category contain the fields (tlfl, t2fl, t3fl-2, t4fl-3, t5fl-3, tl6fl, tlVfl, tl8fl, tl9fl, t20fl, 2xd). The fields (t3f2, t4f3, tl6fl, tl7fl, tlSfl, tl9fl,t20fl, 2xd) are additional to fields required of all NETPAC applications. The value of the flag (t3fl) is 2 for these basic nodes. The identification flag (t3f2) indicates the exact character of the node. Its values may range from to 7 and correspond in ascending order to an ER, an evaluated ER, an equation, solved equation, an evaluated equation, a constraint, a solved constraint and an evaluated constraint. A solved equation relates an output variable to a set of one or more input variables. The solved equation is simply an algebraic rearrangement of an equation. The solved constraint has been algebraically solved for a particular variable, making it analogous to an equation. An evaluated equation is best explained by example. Suppose we have, an equation of the form F(x,y,z) =0 If we evaluate the equation for a given set of x, y and z values we obtain F(x,y,z) = f where f represents the value of the equation at x, y and z. If we were
PAGE 102
90
PAGE 103
91
PAGE 104
92
PAGE 105
93
PAGE 106
94
PAGE 107
95 If we were to include a "variable" representing f in the original equation F, and if we were to perform whatever algebraic rearrangement might be required to solve for the "variable" f , the result would be an evaluated equation. The evaluated ER and evaluated constraint are analagous to the evaluated equation. Evaluated equations, ER's and constraints appear only in cyclic calculations where they are employed for adjusting the values of tear variables. In order to consider the algebraic rearrangement of, for instance, a. function, it is necessary to have a list of the components to the equation. This list is called the link editor list, the pointer to which is field (tl6fl). Further discussion of the link editor list is momentarily deferred until the discussion of the nodes currently under consideration has been completed. The fields (tlVfl), (tl9fl) and (it20fl) are respectively the code name (for the equation, etc.), the dimensionality and the number of outputs. Two words are served for each index, to record an index range in the seven part format. The pointer to the output variable list is field (tl8fl). The output variable list consists of fon\?ard-only linked list entries containing the fields (tlfl, t2fl, tSfl, t21fl, d ). Field (t21fl) is the output variable code name . The flag (tSfl) will normally be 0, except when an output variable is also a tear variable and the function, ER or constraint is to be evaluated rather than solved for its output. In this case, the flag will be 2. The dimensionality is recorded in field (t2fl). One word only is reserved for each of the seven part indices. The link editor list of an equation must contain distinct entries for variables, operators and constants. A flag, data field (t3fl), is employed to identify the type of equation component represented by a list entry. The flag values 0, 1 and 2 correspond to operator, variable and
PAGE 108
96 constant list entries. The operator and constant list entries are identically structured as (tlfl, t2fl, t3fl, t21fl). Data type 1 is the forward link, and data type 3 has already been discussed. The field (t21fl) contains the code name of the operator or constant. For the constant, field ^fl) is an absolute pointer to the constant value. For an operator, this field specifies the order of the operator. A variable entry on a link editor list contains the fields indicated for a constant plus the field (t22fl) and one word per degree of dimensionality. The field (t22fl) is the dimensionality. The pointer to the variable value is (t2fl), and the variable code name appears in (t21fl). So far, we have considered variables, constants and operators with respect to the link editor list. One might be tempted to conclude that these three entries are sufficient for all functions, ER's and constraints. However, this is not the case. Recall the notion of an evaluated equation. For an evaluated equation, a link editor list entry must be provided to represent the equation value. This entry is identical in structure to the variable list entry. In fact, the data fields serve the equation precisely as they do a variable. A further entry type may be seen by considering the result of an algebraic rearrangement of an equation or a constraint. In solving for a particular variable (i.e. the output variable), it may be possible to combine some of the constants appearing in the equation or constraint. Rather than expand the constant name and value files, a second type of constant list entry has been invented. It contains only the forward link, the flag and an one or two word field reserved for the constant value. We shall differentiate the constants verbally by naming this
PAGE 109
second type a local constant. The flag values for the equation value and local constant entries are 4 and 5 respectively. The flag value 3 is reserved to indicate which variable (s) is the output of a function, ER or constraint. ' The connection of the basic GENDER building blocks into a network forms what is. termed a group body. The group body is the possession of a node called a group. Generally, a group represents a collection of equations, ER's and consti'aints having a common trait. For instance, the members of a group body might all be participants in a cyclic calculation. A group node is formed of the usual network fields plus (t3f2, t4f3, t7fl-4, t8fl-4), of which it is the field (t7fl) that points to the group body. The flag (t3f2) differentiates between a protected group (set flag) and an unprotected group (flag unset), The unprotected group may be modified by the analysis algorithms included in GENDER, whereas the protected group may not altered. An example of a protected group might be a completed solution procedure, perhaps retrieved from a solution procedure library, requiring no further analysis. The field (t4f3) appears in every GENDER list node and is provided as a programming convenience for GENIAO. The data fields (t7f2-4) and (t8, fl and 4) are, in order, the pointer to the decision variable list, the pointer to the tear variable list, the depth, the pointer to the SIM and the method identifier. The pointers (t8f2) and (tSfS) are reserved for use with the dynamic programming algorithms to be added to GENDER at a future date. The entries of the tear and decision variable lists are identical to the entries on the output variable lists for functions, ER's and constraints, except that t-wo words are reserved for each degree
PAGE 110
98 of dimensionality. Each dimension requires two words so that a minimum and maximum to each index may be specified. This feature permits compactness with respect to dimensioned variables assigned as tear or decision variables. * IV. 4. d. GENIAO The implementation of GENIAO was relatively straightforward, depending heavily on the COAST and NETPAC verbs. As was the case for SECIAO, GENIAO requires the reservation of seven words in the information block for data pertinent to the GENDER list. Table 15 lists these components with their respective contents. The GIMBL is the GENDER information block, and is the analogy of SECBL for SECIAO. The first word of GIMBL points to the GENDER list. The address of the first GIMBL word is recorded in JCC0RE(16). The second GIMBL word points to the SPUR block for list type 2. The SPUR block contains one five word SPUR for each possible list entry size from unity up to and including the largest possible GENDER list entry. The spur's are arranged in the block in ascending order. The third GIMBL word is reserved for the trace key applicable to the GENDER list at level 0. The remaining seven words of GIMBL contain the addresses of vectors employed during index calculations. Each of the seven vectors is equal in length to the maximum possible dimensionality for a function, ER, constraint or variable. This integer is obtainable from the fifteenth word of the information block. Let us label the vectors A through G in the order they are referenced by GIMBL. The vectors A through G correspond exactly to the vectors a through g of Appendix B. Although the GENDER list is principally a NETPAC implementation, REMOTE is employed by GENIAO. For both the input and output of a
PAGE 111
99 c c o &
PAGE 112
100 GENDER list, temporary storage is required for linkage data pertinent to the nodal connections. With rapid access being the paramount consideration, a file structure was selected for the temporary storage. Two files are enployed, one for the current GENDER list level and one for the previous level. As the input of the current GENDER list level is completed, the files are interchanged so that the current level file now becomes the previous level file. Each file entry contains the address of a node and a pointer to an auxiliary list. The list , entries each contain the file entry number of a predecessor node to the node labeled in the file entry.
PAGE 113
CHAPTER V ANALYSIS ALGORITHMS The current selection of algorithms available with the GENDER System is somewhat limited. Though limited, the algorithms nevertheless do permit the development of a complete solution procedure according to a realistic analysis strategy. The selected strategy involves resolving cyclic calculations via minimum tear considerations. Additional algorithms can be relatively easily provided. Several such additions are contemplated for GENDER in the near future. These additions are futher discussed in the concluding remarks of Chapter IX. The rationale for the selection of algorithms for inclusion in GENDER depended upon two principal criteria. First, the algorithm must be of obvious utility with respect to solution procedure' development generally. Secondly, the algorithm should be as simple as possible. This latter criterion arises since the algorithm must currently serve as a test and evaluation vehicle for the support and administrative facilities of the GENDER System. The next three sections of this chapter describe the analysis algorithms selected to perform out put set assignment, precedence ordering and minimum tear selection. Rather than reproduce in this work the algorithms stepwise, reference will be made to the literature source of the algorithm version implemented. To be described in the following sections, then will be the essential characteristics of the algorithms as pertaining to the design engineer and to GENDER. The literature 101
PAGE 114
10? references may be regarded as * flagged sections. V. 1. Hungarian Output Assignment Algorithm The Hungarian algorithm for output assignment selected for GENDER is the version presented by Gupta (1972) in his master's thesis. To each variable in each equation, ER and constraint a cost or weight of selecting the variable as the output must be assigned. The selection of weights will, in general, reflect the design strategy. The design engineer may simply assign equal weights to all variable/ equation incidences. By so doing, he has reduced the Hungarian algorithm to an arbitrary output assignment procedure. This strategy minimizes the effort expended by the design engineer in obtaining an output assignment. A second weight selection criterion, closely allied to the proceeding one, is user preference. The design engineer may wish to influence the Hungarian algorithm to make certain output assignments while avoiding certain other assignments. Thus, he would ascribe low weights to prefeired assignments and high weights to undesired assignments. Although the weight range may be as large as desired the range 0-9 is envisioned to provide sufficient resolution to convey user preference. Although a design engineer may weight each. variable/equation incidence according to preference, it is more likely that a specific weighting scheme would be applied. For example, Lee and Ozawa (1971) and Soylemez and Seider (1972) suggest weighting on the basis of the algebraic complexity of solving for a variable in the event of selection as the output. While this increases the effort expended by the engineer, a more efficient solution procedure will likely result.
PAGE 115
103 A final scheme for weight selection involves the determination of the sensitivities of each variable/equation incidence. If the weight is assigned as the negative of the logarithm of the sensitivity, than the Hungarian algorithm, which seeks to minimize the sum of the weights for a complete output assignment, will be performing output set assignment according to the maximum product criterion (Edie and Westerberg^ 1971). This criterion has been shown to lead to rapidly convergent solution procedures to cyclic equation sets. Chapter VII is a brief user's manual and discusses the use of the Hungarian algorithm. The subprogram performing this algorithm is designated HASSAL. As is the case for all of the analysis algorithms, the passed parameters required by HAS SAL are minimal, being only the address of a group and a unique call statement identification number. The latter is an essential feature of the debug facilities incorporated into COAST and described via comments in Appendix A. HASSAL operates on a single group, although this group may have groups as nodes on its group body. The effect of HASSAL on a group is the substitution of a new output assignment for the previous output assignment. The previous output set may, of course, be null. Unassigned variables at the conclusion of output assignment become decision variables and are recorded in the group. V.2. Speed-Up Precedence Ordering Algorithm The Speed-Up algorithm for precedence ordering is the product of research by Sargent and Westerberg (1964).. Two algorithms are presented in the reference, but only algorithm I has been selected for use with GENDER. The subprogram name is SPEDUP.
PAGE 116
104 SPEDUP performs precedence ordering of a group body on which the output set assignment is recorded. Only the address of a GENDER group and a call statement identification number are required as passed parameters by SPEDUP. The usq of SPEDUP in an analysis strategy is discussed in Chapter VII. The effect of SPEDUP is the reorganization of a group body to reflect precedence ordering. If the group body possesses an unresolved cyclic character, SPEDUP will create a new group containing only the equations which are not acyclic. That is, the cyclic equations are transferred from the original group body to the group body of a new igroup which becomes a member of the group body to the original group. The original group is, therefore, acyclic at the conclusion of SPEDUP. The sub-group into which the cyclic character has been concentrated may now be subjected to tear variable selection. V.g. Barkley Motard Minimum Tear Algorithm The Barkley and Motard (1972) minimum tear algorithm was presented in a paper at the NATO Advanced Study Institute on Decomposition as a tool for solving large problems held in Cambridge, England. The program executing the Barkley Motard algorithm is the subroutine BEMOAN. BEMOAN requires the same passed parameters as HASSAL and SPEDUP. Thie GENDER group on which BEMOAN is to operate must posses an output set assignment. After selection of the. tear variables has been made, the selections are recorded in the group. The deletion from consideration of the tear variables in all functions except where they are the output variables renders the group body acyclic. This strategy and the program SPEDUP are combined to precedence order the group body as the final BEMOAN step.
PAGE 117
105 V.4. Implementation Details Each of the analysis algorithms depends upon the existence of a sparse incidence matrix for the group under analysis. The concept of the SIM and the SIM manipulation verbs of SIMPAC were developed expressly for the implementation of analysis algorithms. Although the SIM is not always the appropriate medium for the execution of an algorithm, it is the most convenient medium for conveying to an algorithm the pertinent data relative to a group body. An important feature shared by the analysis algorithms, and indeed by most of the major GENDER programs, is the high degree of subroutinization. While the delegation of tasks among subprograms can be carried to the extreme, a certain degree of task delegation greatly simplifies the debugging operation and enhances the readability of the code. HASSAL, SPEDUP and BEMOAN are hardly more that supervisor programs directing the operation and interaction of their respective subroutine sets. In addition to the SIM, each of the analysis algorithms expects the existence of certain conditions before execution is attempted. For example, BEMOAN requires an output assignment before it can proceed. To save the design engineer from at least a portion of the details of solution procedure generation; each of the three analysis programs automatically generates missing information before proceeding. A subprogram DFAULT is employed to provide this service and is more fully described in Chapter VII. Continuing the pattern established in previous chapters, the following section provide the implementation details and are generally only of value to readers contemplating modifications to existing programs or expansion of the analysis algorithm repertoire. Before attempting the
PAGE 118
106 next three sections, it is strongly advised that familiarization with the Hungarian, Speed-Up and Barkley Motard algorithms be acquired. Only the adaptation of the algorithms to the data structures available with GENDER will be discussed 'in the ensuing sections. * V.4.a. HASSAL HASSAL is by far the largest and most complex of the three analysis algorithms. Gupta (1972) presents the Hungarian algorithm in the form of two interactive algorithms. One of the algorithms resembles a supervisor directing the utilization of the other algorithm. It is essentially after this supervising algorithm that the program HASSAL is patterned. The steps of the algorithm for performing the output set assignment are parcelled among several subprograms. The major subprograms employed by HASSAL consist of J2ACYC, J2A0SA, J2PATH, J2MARK and J2SWIT. . The subprogram J2ACYC is the acyclic output assignment phase of the algorithm (steps 1 through 4 of Cruptas algorithm). Step 5 represents a decision and transfer of control step exterior to the domains of J2ACYG and of the next algorithmic phase, J2A0SA. Such control steps have been incorporated into HASSAL. Steps 6 through 8 constitute the instructions incorporated within J2A0SA. J2A0SA performs an arbitrary output set assignment. The remaining subprograms under the guidance of HASSAL expand the arbitrary output assignment into a complete assignment. A complete assignment is characterized by output variables assigned to every equation. Not all variables need be assigned; those remaining unassigned become decision variables. J2PATH and J2MARK are both involved in the search for alternative output assignments which will permit the extension of the output set.
PAGE 119
107 J2PATH performs steps 10 through 14 of the assignment algorithm. Alternative assignments are sought via a row and column marking scheme. Marking is also employed by steps 16 through 17, which are embodied in J2PATH. The marking strategy employed by J2PATH is some what more complex than that of J2MARK. Both programs result in the identification of Steward paths. J2SWIT is employed whenever a Steward path is identified to perform the output set adjustments. For paths discovered by J2MARK, J2SWIT must break one output assignment and make two new output assignments. For paths discovered by J2PATH5 three output assignments are replaced by four new assignments. In either case, a gain of one assignment in the output set is noted. HASSAL and its subprograms operate entirely on the sparse incidence matrix. A working ordinate is created for both the rows and columns. The working ordinate file entries are identical to the file entries of the 'primary ordinates. The principal function of the working ordinates is for the recoding of row and column marks. Marks are stored in data type 13, which is the data type employed by the primary ordinates for storage of output assignments. Thus, as a programming convenience, the SIM routine for output set assignment is employed for marking the working ordinates. No other temporary data structures are required for the implementation of the Hungarian algorithm. * V.4.b. SPEDUP The Sargent and Westerberg (1964) Speed-Up I algorithm was by far the easiest and most natural to implement. The algorithm was developed expressly for list processing. The authors propose four list structures for use with the Speed-Up I algorithm. With a sparse incidence matrix available to SPEDUP, two of the four lists need not be generated.
PAGE 120
lOJ List 1 is an unordered list of all equations, ER's and constraints. The row ordinate of the SIM is a file containing references to the functions, ER's and constraints which SPEDUP is to reorder. Consequently, the row ordinate is substituted for list 1. The lists of type 2 are described in the paper as providing data on the linkages between the elements to be precedence ordered. A type 2 list must be provided for each element to be ordered. Let us consider an SIM row. Each SIM row contains an output variable (perhaps several outputs for an ER), one or more input variable and perhaps one or more decision variables. The input variables, by virtue of their not being either outputs in a particular row or decision variables, must each be assigned as outputs to other SIM rows. Thus, the SIM rows furnish the linkage data directly and eliminate the need for creation of the type 2 lists. Note the one to one correspondence between row ordinate file entries and SIM rows. Lists 3 and 4 must be created by SPEDUP. List 4 is employed as temporary storage during execution of the algorithm, with the final precedence ordering appearing on list 3. The algorithm stipulates the transfer of entries from list 4 to list 3 making it necessary to design only a single list entry data format serving both lists 3 and 4. The data format selected was (tlfl, t2fl, t3fl, t2lfl, t22fl), with the list being GENDER type 2. Tables 16 and 17 are provided as a guide to the structure and contents of the entries on lists 3 and 4. Data types 1 and 2 serve as the forward and backward links as is usual with forward backward lists. Data type 3 is a flag serving to differentiate equations (0) from decision variables (l) and groupings of equations (2). The contents of data types 21 and 22 depends upon the flag value. ,
PAGE 121
109 c •H -g O 2: P-i M W 6 CO ;z; o w
PAGE 122
no u
PAGE 123
Ill If the value of the flag is zero, the list entry represents an equation, ER or constraint. In this situation, data type 21 contains the SIM row number and data type 22 contains the address of a row element. In particular, data type 22 refers to the next input of an equation, ER or constraint to be considered by SPEDUP. Data type 22 will ini tally point to the first element of the row. If the value of the flag is two, the list entry represents a grouping of equations, ER's and constraints. Such groupings indicate cyclic information flow patterns among the group members. Data type 21 contains the pointer to a list of grouping members. The list entries on this auxiliary list are each identical to the list 3/4 entry with the flag set to 0. Data type 22 is also a pointer to an entry on the auxiliary list, but not necessarily pointing to the leading entry as is the case for data type 21. Data type 22 points to the first member of the grouping having a non-null input list. This pointer is advanced to the next grouping member when, during SPEDUP execution, the input list of a grouping member is depleted. A flag value of 1 indicates the list entry to be representative of a' decision variable. In this case, only data type 21 contains meaningful data. Data type 21 contains the SIM column number of the decision variable. Data type 22 is ignored. The implementation of the Speed-Up I algorithm does not exhibit the degree of decentralization observed for HASSAL. This is principally due to the design of the algorithm. The majority of the steps are simple; that is, they do not contain instructions to perform complex or extensive manipulations. Further, the overall manipulations demanded by Speed-Up I are much less complex than those required for HASSAL.
PAGE 124
* V.4.C. BEMOAN BEMOAN is the supervisor program for the Barkley and Motard (1972) minimum tear algorithm. The algorithm employs precursor, and interval lists to search initially for self-loops,, then for two-way edges in an effort to reduce to null the set of interval lists. Nullity of the interval list set indicates complete elimination of the cyclic character in a group body by virtue of tear variable selections. Instead of employing separate lists as suggested in the algorithm, the BEMOAN inplementation incorporates the list information into a single column ordinate. This working ordinate is composed of file entries containing the data, fields (tSfl, t4fl, tl4fl). The LEND summary for these data fields is given by Table 18. The field (tl4fl) is a flag whose possible settings of 0, 1 and 2 respectively indicate the file entry to represent the head of an interval, an interval member and a tear variable. Note that the head of an interval is also a precursor either to itself or to another interval. The field (t3fl) contains the column number of the interval to which a variable belongs. This field is only of significance for a flag of 1. The field (t4fl) is used variously, for counting membership of intervals in two-way edges or occurrences in other intervals. The number of occurrences of an interval in the other intervals is useful in selecting a tear variable when neither a self-loop nor a two-way edge is present. If the flag value is 2, both (tSfl) and (t4fl) contain no significant data.
PAGE 125
s •H U O W) C •H -g O i w m 0) o & c E CO ro O >, 2 -H CO s H H ^ CD CO CU CD C +J > CO C •H f-l n-i CD o c 0) rC O
PAGE 126
CHAPTER VI INTERPRETATION The GENDER list contains all of the instructions for solving an equation set. During the course of GENDER list development via the algorithms, no modifications are imposed upon the original equation set. The equation set stored in SECEDE serves only as a source of information. When a design engineer employs GENDER, the ultimate objective is, of course, the solution to the equation set and not merely the instructions for obtaining that solutions. Two choices are apparent at this point. The engineer may impose the algebraic rearrangements and precedence ordering on the equation set as per the GENDER list instructions. He may then program, for instance in FORTRAN, the evaluation of the output variables, including the resolution of cyclic calculations. It is possible to provide a FORTRAN converter as an integral component of the GENDER system. While FORTRAN conversion of the GENDER list could have been provided, it was rejected for the present version because of the difficulty in performing modifications to the FORTRAN source module. Changes to the source module might originate from reanalysis of a cyclic group if convergence problems are encountered, or they might originate from alterations in the active constraint set during constrained optimization. Even assuming that the modification of FORTRAN code could be conveniently accomplished, re-compilation would remain a necessity. The. foregoing considerations ledto the examination and ultimate 114
PAGE 127
selection of an interpreter system. By interpretation we mean execution directly from the GENDER list. The interpretation of a GENDER list is a three step process; link edit, convert and interpret. The link edit step creates for each equation, ER and constraint a list of components with variable value storage locations explicitly addressed. The conversion step performs any required algebraic manipulations on the link editor generated lists. The following sections describe the interpretation capability designed for GENDER. Since the advantages of interpretation will not be fully realized until the advent of a constrained optimization supervisor for GENDER, and since the creation of this supervisor is somewhat distant, the interpretation capability has not been fully implemented. To ensure compatability with the currently implemented GENDER components, the essential features of interpretation have been carfefully analyzed. The remainder of this chapter reflects the results of this analysis. The inclusion of this information in a description of GENDER has been prompted by two factors. (1) It will form the basis for the implementation of the interpreter, and (2) the interpreter (coupled with the notion of constrained optimization) provides an insight into the justification for the implementation of GENDER as a complex, list processing-based system. VI. 1. Link Editor At the completion of analysis, the GENDER list contains all of the instructions necessary to solve an equation set. However, the GENDER list contains only the instructions, for the equation set is stored in SECEDE. As files in SECEDE, the equation set is virtually unavailable with respect to performing the modifications recorded on the GENDER list i.e. algebraic rearrangements. Therefore, it is necessary to generate
PAGE 128
116 a second copy of the equation set in a form amenable to modification. The link editor, LINKED, provides each group body entry with a linked list of the constituents in the equation, ER or constraint represented by the group body entry. Thus, the second copy of the equation set is distributed over the entire GENDER list. This distribution has the characteristic of automatically conforming to the precedence ordering exhibited in the GENDER list. Now let us consider a variable appearing on a link editor list (LEL). In terms of interpretation, the really important aspect of the variable is not its code name, but is its value storage location. Since the variable value files are integrated into SECEDE, the use of REMOTE verbs is necessary to determine value storage addresses. While it is of no consequence for acyclic groups, deferring address determinations until interpretation causes the address of a variable to be determined on ^every iteration during convergence of a cyclic group. Consequently, each LEL entry representing a variable value is provided by the link editor with the address of the variable value storage location. VI. 2. Converter The converter, COVERT, has three primary duties: (1) solve LEL's algebraically for the output variable, (2) install equation, ER and constraint evaluation list entries into LEL's, and (3) provide a method insert to the group bodies of cyclic groups. The converter is programmed to accomplish all three tasks with only a single trace through the GENDER list. A method is a subroutine required to direct the successive selection of tear variable values as a means of accelerating the convergence of cyclic groups. Methods are identified in the GENDER system by the method code. This code is recorded in the data field (t8f4) of each group. A
PAGE 129
code o£ unity indicates a group to be acyclic, while a code of zero indicates that a group has not yet been subjected to the analysis algorithms. Thus, the reference by the method code to actual methods begins with the code 2. All cyclic groups, that is all groups having a method code of 2 or larger, must have a method insert as the last accessible node of the group body. The order of access is, of course, dictated by the verb NEXT. The contents and structure of the method insert has already been presented in Tables 13 and 14in Chapter V. The purpose of the method is twofold: (1) to indicate to the interpreter that repitition of the group body is required and (2) to provide information required by the method subprogram. . In general, a method subprogram requires a vector of values for evaluated equations, ER's and constraints, and a vector of tear variable values. The evaluated entities and the tear variables will be equal in number. The objective of the method subprogram is the selection of tear variable values which drive the values of the evaluated entities as close to zero as practicable. Since some convergence accelerators, i.e. methods, rely on a history of tear variable and evaluation values over several iterations, this data is provided as an auxiliary to the method insert. The current or latest values for both variables and evaluated entities are provided as a linked list containing the addresses of storage values. That is, these lists are essentially LEL's. The old values for both tear variables and evaluated equations, ER's and constraints are provided via an application of REMOTE. A single catalogue references two records. The first record contains a single file of tear variable values. Each file entry contains all of the old values for a particular tear variable. Therefore, if the last 5 values (excluding the current
PAGE 130
118 value) are required, then each file entry will accomodate 5 value fields. To avoid unnecessary shifting of the contents of a file entry when a current value becomes the most recent old value, an indexing scheme is proposed. An index is stored in the method insert which indicates which of the old values is the most recent. For example, an index of 2 indicates the values in the second value field of each file entry to be the most recent. By subtracting unity (modulo 5) one determines the value field to receive the current value just prior to the creation of a new set of current values. The twenty-second word of the information block (whose address is JCC0RE(17)) contains the number of old values to retain. The second record, identical to the first, is reserved for the values of evaluated equations, ER's and constraints. The second of the three functions performed by COVERT involves the addition of evaluation list entries to the LEL's of equations, ER's or constraints. In particular, such modification is performed on entities declaring a tear variable as the output. Further, this modification is only performed if the method code stipulated in the group node is greater than five. The method codes two through five are special cases in which the tear variables are calculated as output variables. Thus, for codes two through five, the method subroutine must rely only on the current tear variable values and perhaps a history of old tear variable values to provide an estimate of the tear variable values for the next iteration. The first of the three COVERT duties enumerated in the first paragraph of this section requires the capability of algebraically manipulating an LEL. All of the LEL manipulative power has been concentrated in a general algebraic package, GALAP. This program package has
PAGE 131
119 been developed expressly for the GENDER system as an independent research effort. The listings for GALAP have been included in Appendix A. User interface with GALAP is via the programs SOLVE and MATH. SOLVE permits the algebraic solution of an equation or constraint for its output, while MATH determines the value of an output variable based on the current value of the input variables to an equation or constraint. As one might suspect, it is SOLVE which is employed by COVERT. VI. 2. a. SOLVE The program SOLVE is employed to solve algebraically for a particular variable. The variable of interest is indicated to SOLVE by the occurrence of a flag value 3 for an output variable or a flag value 4 for an evaluation entry. The evaluation entry is viewed by SOLVE to be identical to an output variable. SOLVE accomplishes the algebraic rearrangement by initially expanding the LEL into a network structure. The algebraic rearrangement is actually performed on the network, which is collapsed back into an LEL after the algebraic manipulations have been completed. Algebraically speaking, SOLVE is not always capable of solving an equation or constraint for its incident variable. If purely algebraic manipulations cannot solve an equation for a particular output variable, then SOLVE must fail. For example, algebraic manipulations alone cannot reduce the equation . X + y = InX to the form X = f(y) SOLVE is, however, empowered to recognize and perform many simplifications. For example, the equation x + y = 2x
PAGE 132
120 becomes X = -y if X is designated as the output variable. Further, the equation 2(x + 2) y = 9 becomes X = y/2 + 2.5 again with x as the output variable. In order to accomplish the combination of constants, the constant entries on the LEL are released and new constants introduced. The new constants are termed local constants. That is, they are constants appearing only in one equation, with each equation having its own set of local constants. Table 19 indicates the operators which SOLVE is capable of recognizing and manipulating. VI. 3. Interpreter Put quite simply, the task of the interpreter is the determination of the values for all variables except the decision variables. However, the size and complexity of the interpreter program GLINT indicates the presence of some latent complexity in this simple task. With respect to acyclic groups, the assignment of values to output variables is relatively simple. Each equation, ER and constraint constituting an acyclic group need be considered once only. The GALAP program MATH is employed by GLINT to effect all output variable evaluations for solved equations and constraints. The presence of an ER on an acyclic group body somewhat complicates the procedure since the calling of the subprogram (i.e. ER) is necessary. The procedure for calling subprograms is the subject of section VI. 3. b. The necessity of calling method subprograms further complicates
PAGE 133
121 H o4 O o CM CM O >, P a w
PAGE 134
122 the resolution of cyclic groups, which by their cyclic character automatically require the repetitive evaluation of all concomitant output variables. The aspect of repetition requires that data be saved which will permit the reinitiation of the calculations at the beginning of a group body should satisfaction of the convergence criterion fail at the termination of an iteration. The program METHOD, discussed in section VI. 3. b, is responsible for evaluating a group with respect to the convergence criterion, unless such a comparison is performed by the method subroutine. If the interpreter encounters an error condition, the interpreter wilL return to the calling program the address of the group under consideration and a code indicative of the particular error. Table 20 lists the error codes which the interpreter is designed to recognize. The executive program prepared by the design engineer must be programmed to follow a recovery procedure for each error code. VI. 3. a. MATH Like SOLVE, MATH is constrained to equations and constraints constructed with the operator set tabulated in Table 19 of section VI. 2. a. MATH exists in two versions; one for single precision floating point arithmetic and one for double precision floating point arithmetic. The design engineer must select the MATH version appropriate to the accuracy demanded for the design computations. Since all variables must be either single or double precision, election to employ double precision may cause a significant increase in memory requirements. In view of the numbers of other machine instructions required to support the interpretation process, selection of double precision should not affect execution times. VI. 3. b. Subroutines The subroutines which the interpreter GLINT must call are ER's and
PAGE 135
123
PAGE 136
methods. The design engineer must provide the programs EXTRA (for ER's) and METHOD (for methods). Essentially, each of these programs is a library of call statements for the various ER or method subroutines. The ER and method code names are employed to access the appropriate call statement via a computed GO TO statement. Note that for an ER, two computed GO TO's must be employed: one conditioned on the unit number and a second conditioned on the ER code name exlusive of the unit number modifier.. This procedure for calling subroutines during GENDER list interpretation may seem somewhat crude. However, in light of the original decision to remain machine independent to the largest possible extent, the use of the call statement libraries EXTRA and METHOD is inescapable. In addition to the library functions of EXTRA and METHOD, these programs must also perform transformations on the data to be provided to an ER or method. That is to say, most ER and method subroutines accept values as data rather than the addresses of values so prevalent in GENDER list interpretation. The value address of interest to EXTRA are distributed within the LEL*s of the ER's. The ER output variables will be indicated by LEL entry flags equal to 3 just as for the output of an equation or constraint. For METHOD, the value addresses are available from an LELtype list and an old value file. One list/file pair will be available for both the tear variables and the evaluated entities (equations, ER's and constraints). Since it is the duty of METHOD to employ a method subroutine for the purpose of returning to GLINT a new set of tear variable values from which new values for the evaluated entities are to be determined, METHOD must update the old value storage files. The nature of the update procedure is suggested in section VI. 2. Finally, METHOD must be programmed
PAGE 137
125 to test for convergence when employing any method subroutine into which a convergence test has not been incorporated. Typically, a convergence test would involve the comparison of the latest tear variable value with its predecessor as for example in a sum of the squares of the differences technique. METHOD indicates satisfaction of a convergence test by returning zero to GLINT in substitution for the address of the method insert. VI. 4. Implementation Details In the subsections to follow, we shall concentrate on the implementation details for LINKED, COVERT and GLINT. As per the pattern established for previous chapters, these sections are marked with an * and may be omitted by all readers not requiring this detailed data. The information of the ensuing subsections is not necessary to the preparation of the programs EXTRA and METHOD. Sections VI. 2 and' VI. 3. b provides, when used in concert with Tables 13 and 14, sufficient information on the data structures involved. The user must thoroughly understand the LEL, method insert and old value storage structures. The programming tools are provided principally by COAST and REMOTE. In accessing LEL entries for an ER, LNKFWD and FRMCEL should be used to effect the advance and data transfer operations rather than POPUP. Although POPUP does perform the advance and data transfer operations automatically, POPUP also destroys the list as it proceeds. Remember that for cyclic groups or in the event of group reanalysis, the LEL's will be utilized repetitively. * VI. 4. a. LINKED LINKED is basically a supervisor program for the link editing step. NEXT is employed to access the group body entries "of either a single group or an entire GENDER list. LINKED utilizes the group body flag
PAGE 138
(tSfl) to identify the particular group body constituents, each o£ which is treated separately. A group on a group body causes no action by LINKED save to access the body of the group via NEXT. Equations, ER's and constraints all carry group body flags of 2. All entries with flags of 2 are referred to the lOPAC program JILEDL for LEL generation. The flag value 3 is reserved for method inserts. The LEL-type list entries, as well as the old value storage files, are released via CORN for later reallocation. The field (tl6fl) is the address of the SPUR employed with CORN. * VI. 4. b. COVERT COVERT, like LINKED, is primarily a. supervisor program. Also like LINKED, COVERT employs NEXT to access the group bodies. For the group body entries representing equations and constraints, COVERT utilizes SOLVE to solve algebraically for the output variable. The output variable list of each group body indicates which of the LEL entries are to recieve flags of 3. Although SOLVE is not generally employed for ER's, the flagging of the output variables on the LEL is performed. An exception to the exclusion of ER's from algebraic rearrangement is the declaration of an ER to be an evaluated ER. Equations, ER's and constraints become evaluated entities when the method code is greater than 5 and when an output variable is also a tear variable. COVERT makes a direct comparison of each output variable list encountered to the tear variable list for all groups having method codes exceeding 5. An evaluated entity receives an additional LEL entry with a flag of 4. This entry represents the value of the evaluated entity. COVERT requisitions a storage location for the value. The convention for including the new LEL entry is (1) place the new entry at the end of
PAGE 139
127 the LEL and (2) add to the new end of the LEL a list entry representing the equal operator. To understand this procedure, we must first recall that the equations and constraints stored in SECEDE conform to the reverse polish notation with the "= 0" implied. Since the LEL's are developed from SECEDE, it follows that the LEL's will also be in reverse polish without the "= 0" actually appearing. Let us now consider the conversion of an equation (written in reverse polish notation) to an evaluated equation. Including the evaluation entry and the subtraction operator, the equation becomes f(x,y,z)F = or in standard notation F = f(x,y,z) COVERT is programmed to release an evaluation entry discovered on LEL prior to the output variable list/tear variable list comparison, the elimination of an evaluation entry is simplified by the use of reverse polish notation for the LEL and by the fact that evaluation entries are encountered only as the algebraic output of the LEL. Thus, an evaluation entry may always be deleted by removing from the LEL the last two list entries; the evaluation entry and the equality operator. The storage location assigned to the evaluation entry is placed on the available space for later reallocation. For groups possessing method codes greater than 1, COVERT must install a method insert as the last accessible node on the group body. The end of the group body is indicated by a change in level following a call to NEXT. COVERT retains the address of the last node to effect the access to the last group body node once a level decrease is noted.
PAGE 140
128 COUPLE attaches the method insert to the last group body entry. COVERT establishes the value storage lists and files discussed previously in sections VI. 2 and VI. 3. b. The tear variable list furnishes the data required for establishment of the storage facilities, necessary for the tear variables. No such list being automatically available, COVERT develops the LEL-type list for evaluated entities as the evaluation entries and the value storage locations are created. Note that this list will not be created for method codes less than 6. The storage facilities of NEXT are employed to store the address of a partially completed list of evaluation entries whenever a level increase occurs i.e. whenever a group is encountered on the group body of another group. * VI. 4. c. GLINT GLINT uses NEXT to trace through either a single group or an entire GENDER list performing numerical evaluations with MATH and EXTRA. At the* conclusion of each group possessing a method code exceeding unity, GLINT must call METHOD. If METHOD returns the address of the method insert, iteration on the current group body is necessary. Conversely, if METHOD returns zero for the address of the method insert, the convergence criterion has been satisfied and consideration of the next group may begin. To facilitate the iteration on group bodies, GLINT uses a temporary list to store the address of the group. If an interior group is encountered, a new entiy is pushed onto the temporary list. The trace of a group body is repeated by first incrementing the group trace key (t4f2) by unity. The trace is begun directly with the first group body entry rather than with the group. This procedure is essential to preserve the temporary lists upon which NEXT depends.
PAGE 141
129 A program called NIMBER serves as an interface betvveen GLINT and MATH. -NUMBER directs MATH In the computation of an output variable value. NUMBER maintains a push-down list for the storage of operands (variables and partial results) in the fashion of . a stack. NUMBER begins with the first LEL entry in computing an output value. Each operand encountered is stored on the push-down list until an operator is encountered. The encounter of an operator causes NUMBER to pop-up from the push-down list (PDL) a number of operands equal to the order of the operator (t21fl). MATH performs the operation of the operator on the selected operands, and the result is placed on the PDL. The computation is complete when both the LEL and the PDL are simultaneously exhausted.
PAGE 142
CHAPTER VII USER MANUAL In this chapter we shall not try to present all of instructions for using the GENDER System. Rather, we shall discuss briefly the essential instructions on a somewhat superficial level. References to text and tables in other chapters will furnish the details. The intent is the creation of a guide to the use of GENDER while repeating information already presented to the smallest extent possible. Two principal areas of activity are required of the design engineer prior to employing GENDER: (1) preparation of input data and (2) program preparation. Each of these very general instructions contain a number of steps and are discussed in the sections to follow. One instruction which fits in both the data preparation and the program preparation areas is the preparation of the information block. The data required to establish the information block may be input either via a READ statement or via a DATA statement. VII. 1. Input Data Preparation The input data may be categorized as follows: (l) the core allocation, list and data field information required by COIN, (2) the information block, (3) SECEDE and (4) an initial GENDER list. Category 4 is optional and would be supplied when the continuation of a previous problem analysis is desired. The data in categories 1, 3 and 4 are input via the programs COIN, SECIAO and GENIAO respectively. The data formats for each of these programs are presented in the comment statements for the respective programs in Appendix A. 130
PAGE 143
131 The data required to initialize the core allocation and list processing package read by COIN furnishes the means by which a design engineer may tailor GENDER to the machine available. If performed with caution and foresight, the preparation of the data for COIN may need be performed only once for a given machine environment. Tables 2, 3, 5, 6, 9 and 13 give the LEND's required for the various list types. The table entries indicated by a V represent variables which the engineer is permitted to choose. Perhaps we should review the definition of a LEND. For example let us consider a data field occupying bit positions 4 through 7 of the second and third words of a list entry. The four LEND components are, in order, the word index of the first field, the word index of the last field, the shift and the mask. For the data type we are considering, the LEND would be (2, 3, 2^=8, 2'^_1=15). The aforementioned tables must be used in conjunction with Tables 10 and 14 for determining the data organization within the list and file entries. It is the data organization adopted by the engineer which will assign integer values to the V's in the LEND tables. Table 21 lists all of the components to the information block. In general, numerical values can be assigned to each of these components only after the data for COIN has been prepared. Since the information block is to be established by the user provided main program, the format for the information block data is a matter of user preference. VII. 2. Program Preparation Program preparation involves the coding of three programs by the design engineer. The programs METHOD and EXTRA are described in Chapter VI. Note that even if no ER's have been included in the problem, a program named EXTRA must still be provided to avoid an unresolved external reference error.
PAGE 144
13 i
PAGE 145
133 The third program which must be supplied by the user is a main program which must be supplied by the user is a main program. This program is the executive routine which will supervise the data input operations, problem analysis and solution, and the output of results. The data input operations might be regarded as an initialization phase prior to attempting to solve the problem. In this phase, the program COIN is called, the information block is established and the program SECIAO is called. If the input of a GENDER list is desired, GENIAO is employed. Note the order of events for the initialization phase, for successful initialization is possible only in this order. Establishment of the information block involves the acquisition, via NEWCEL, of a list entry at least 22 words long. The data may be read directly into this list entry. Finally, the storage of the address of the list entry in JCC0RE(17) completes the procedure. The remainder of the main program is devoted to the analysis and output phases. The analysis strategy is limited to weighted output assignment and then minimum tear for the present. The future expansion of ALPAC (or perhaps additions to ALPAC by the design engineer) will permit alternate strategies. The completed solution procedure (i.e. GENDER list may be output via GENIAO. SECEDE may also be output using SECIAO. To facilitate the resumption of analysis at a future date, punched output of both the GENDER list and SECEDE from GENIAO and SECIAO is available. If direct interpretation of the GENDER list is elected, either VARIAO or SECIAO may be employed to obtain the numerical results of the calculations. Note that the main program must be coded to react properly to any contingencies which may develop during interpretation. This topic of error recovery has already been discussed in Chapter VI.
PAGE 146
; 134 ^ In the event a user may wish to employ output facilities other than those afforded by GENIAO, SECIAO or VARIAO, JCGORE (13) must be set equal to 6 prior to the utilization of any GENDER program. JGGORE (13) serves as a printer carriage control character. The integer 6 indicates that a new line is to be begun for the next output. This internal carriage control does not supercede formated carriage control instructions, but applies only to GENDER generated trace and error messages. VII. 3. Additional Algorithms It was noted in the preceeding section that the algorithm selection currently available permits only a single analysis strategy. While it is planned to expand the algorithm library in the near future, it is unlikely that it will be possible to satisfy the needs of all potential users. Thus, it is likely that a design engineer will wish to program an analysis algorithm himself. Before attempting the expansion of the algorithm library, certain of the * marked sections must be read. In particular, the purpose of an analysis algorithm is to modify a GENDER list. Consequently, the * marked section pertaining to the GENDER list must be understood. If the algorithm to be implemented is to employ a sparse incidence matrix, and particularly if the matrix operations are not presently provided in SIMPAC, the implementation details or SIMPAC must be read. The * marked sections for all data structure manipulation packages must be regarded similarly to SIMPAC whenever the manipulations to be imposed on the data structure are not the standard manipulations provided in GENDER. VII. 4. GENDER as a Design Tool The design of a chemical processing plant is a rather complex procedure. Let us consider the impact of GENDER on the single design phase concerned with the differentiation of processing alternatives.
PAGE 147
i.-^s In response to a proposed raw materials/products set, the design engineer will develop a number of possible processing schemes. By omitting processing elements such as pumps and heat exchangers a simplified flowsheet can be created. The simplified flowsheet should retain only those units essential to the intent of the processing scheme. From the simplified flowsheets, mathematical models maybe developed employing short cut and simplification techniques wherever possible. The equation sets thus developed may be subjected to analysis and interpretation via GENDER. The design engineer has been relieved of the burden of solving the several modes either by hand or by programming the models for computer solution. Frequently, the resolution of the crude models is insufficient to distinguish the best processing scheme from one or two other proposals. Consequently, it may be necessary to perform a run-off comparison between a Subset of the original possible schemes. This second level comparison can afford improved resolution only if the accuracy (and the complexity) of the remaining models is increased. If the re-comparison involves only a few models, the development of models describing the processes to the greatest possible extent may be justified. Again, GENDER is to be employed for solution procedure generation and interpretation. The GENDER list of the model selected as best should be retained for conversion (by hand) to a FORTRAN program. This program should be found to be quite useful as a comparison to actual plant performance. The model may even be of utility in establishing set joints for automatic control. It is realized that the use of GENDER as a design tool is limited by the lack of an optimization supervisor to the GENDER system. A
PAGE 148
136 program package performing constrained optimization would lend a higher degree of credibility to the model comparisons, particularly for the higher resolution models. Futher, it would improve the steady state performance predictions required to select optimally controller set points.
PAGE 149
CHAPTER VIII EXAMPLES In this chapter we shall consider the application of GENDER to two example problems; equilibrium flash and. a simple binary distillation. The equation set describing the behavior of a binary equilibrium flash operation is not dissimilar to the equation set pertaining to a distillation equilibrium stage. Consequently, it is possible to propose a single equation set sufficing, with minor modifications, for both examples. We shall adopt the convention that the tray numbers of a distillation column increase from bottom to top. The letter I will be employed to'represent .the tray number. Figure 13 illustrates the general distillation tray, for which the following equations have been prepared. (2) Kj^2V-\2 = (3) [exp (Z0^(32000) 2.30(7. 6))]/P K^ ^ = (4) [exp (Z2^(39000) + 2.30(8.3))]/P K^ 2 = (^) \lh ' \lh \lh Vl,l^I+l Vl,lVl = ' . (^) ^1,24 ' \2\ \2h h.l ^1-1,2^1 = « (7) L^+Vj-F, -L^,,-V^_^=0 («) ^1,1 ' \i -1 = (^) . ^1,1 "^1,2 1 = (10) h^^^Lj . H^^jVj hp^^Fj \^j^,^^^,^ H,^i_,V^_, Q = (12) "v,i V^i,i) V^^ ^i,i> ^1^1,1 ' ^2(^-^1,1))^ 137
PAGE 150
138 h+l'^I+l,l'^I+l,2'\,I+l ^I»^I,l»^I,2»"v,I ^P^I,P^I,2'^',I h'^I,l'^I,2»\,I » ^I-1'^I-1,1''^ 1-1,2 '^,1-1 Figure 13 An Equilibrium Stage.
PAGE 151
139 This equation set is adapted from the equations presented by Edie (1970) as an illustration of equilibrium flash. Two basic assumptions are implied by this equation set: (l) Raoult's law holds and (2) the pressure is constant throughout the column. For both of the examples, the twelve equations will be regarded as a processing unit. The encoding of the equations for the creation of a unit in SECEDE requires the assignment of code names to each of the variables and constants. Table 22 presents the code name/variable assignments, while Table 23 provides the analagous information for constants. To illustrate the preparation of the data required to establish the twelve equations describing a distillation tray as a unit in SECEDE, Figure 14 is provided. The formats for each of the input cards are given in the prefatory comment statements for the program SECIAO in Appendix A. With respect to the equation files, it must be recalled that the reverse Polish notation is employed. For example, equation 1 written in reverse Polish is Kl,lXl,l * Yi^i = Note that in the reverse Polish notation, all operators appear explicitly. GENDER has been programmed to "assure" the = terms for equations in which an explicit equality is not declared. Thus, equation 1 is encoded for SECEDE as if it were simply Kl,lXl,l * Yi^i In Figure 14, the cards terminating files contain messages indicating their specific function. This is in contradiction with the SECIAO requirement for concluding files with a blank card. The comments were included in Figure 14 for clarity and must not actually appear in the
PAGE 152
140 TABLE 22 The Code Name /Variable Assignments for a Distillation Tray Code Name
PAGE 153
141 TABLE 23 The Constant/Code Name Assignments for a Distillation Tray Code Name Constant 1 0.120 2 32000. 3 2.30 4 7.6 5 39000. 6 8.3 7 1.0 8 2.0
PAGE 154
145
PAGE 156
1 12
PAGE 157
145
PAGE 158
145 1 271
PAGE 159
147 data prepared for SECIAO. VIII. 1. A Simple Analysis Strategy Both of the example problems share a common, simple analysis strategy. This strategy consists of the following steps: 1. Call HASSAL to perform output set assignment 2. Call SPEDUP to precedence order the acyclic equations and to collect the cyclic equations into groups 3. Call BEMOAN to select the tear variables for a cyclic group and to perform precedence ordering within a cyclic group 4. Repeat from step 2 if any cyclic groups remain unanalyzed The analysis strategy is implemented in the main program prepared by the user. In addition to the analysis strategy, the main program must also perform the administrative duties of preparing memory for allocation (via COIN), creating the information block and creating SECEDE (via SECIAO). The data required by COIN is contained in Figure 15. The LEND's selected for these example problems specify all data fields, except those for the seven part indices, to be whole words each. The example problems are sufficiently small to make memory conservation tactics unnecessary for the IBM-370/165. The whole word data items have the distinct advantage of rendering an allocatable core map (i.e. JCCORE) readable. The values of the information block components reflect the use of whole word data fields. These values are presented in Table 24. VIII. 2. Equilibrium Flash An equilibrium flash is essentially a distillation tray for which the Li+i and Vi_i are both zero. This situation is depicted in Figure 16. There are at least two acceptible ways of adapting the 12 equations
PAGE 160
148 32 A 19 1 2 1 2 2 99 3 A 1 1 1 1 1 1 1 3 1 2 5« 22 1 2 3 5 8 1 11 15 1 1 1 1 1 1 1 11 12 13 14 15 5 14 1 2 I 3 1 2 3 4 5 6 . 7 8 9 2 7 1 2 3 4 5 6 7 4000, 32 2
PAGE 161
149 TABLE 24 Values for Information Block Components Component
PAGE 162
150
PAGE 163
describing a distillation tray to the equilibrium flash problem. One method is suggested by the nature of the data required by SEGLAO for establishing SECEDE, Each constituent of an equation (whether it be a variable, an operator or a constant) appears on a separate card. That is to say, an equation is constructed in SECEDE by supplying SECIAO with an ordered sequence of cards, each of which represents a component of the equation. Consequently, it is possible to remove cards to effect the elimination of the variables pertaining to the (l+l) and (I-l) stages. Care must be exercised in editing the equation, set by the simple expedient of removing cards, to avoid the introduction of syntac errors by failing to eliminate the variables associated with the eliminated variables. Aside from the physical editing of the equation set, another alternative is available. If the variables pertaining to stages I+l and i-l could somehow be declared to be decision variables, and if the values of Li+i and Vi_l could somehow be declared to be zero, then the transformation of the distillation tray equation set into the equilibrium flash equation set would be accomplished. If it is desired, the decision variable file and the variable value file supplied as data to SECIAO may be ammended to achieve the above declarations. This procedure, as was the case for the method of the preceding paragraph, entails the alteration of the SECIAO data. If the alteration of the SECIAO data is to be avoided, while still accomplishing the task of declaring the variables Lj^-^ and Vt •, to be decisions valued at zero, recourse to a small amount of programming will be necessary. The program VARIAO must be employed to set the values for Ll+l and Vl_i at zero. This task may be installed in the main program at any point prior to interpretation (or any other use for variable
PAGE 164
; 152 values, such as sensitlvit>analysis). It is suggested that VARIAO precede the use of LINKED. The task of declaring the I+l and I-l stage variables to be decisions must be completed prior -to initiation of equation set analysis. In other words, the declaration must precede the use of HASSAL. Although programs whose names begin with J are not normally recommended for direct user call, the program J2TADV may be employed to obtain de• cision variable list entries for the variables of stages I+l and I-l. These entries, when linked together and installed on the group decision variable list, establish the variables of stages I+l and I-l as decision variables. The modification of the decision variable list is best accomplished immediately after geneation of the crude GENDER list by CUDGEL. If J2TADV and VARIAO are to be employed to effect the tailoring of the distillation tray equations to equilibrium flash, the input data for SECEDE is shown in Figure 17. The symbol TRAY represents the inclusion of the unit data contained in Figure 14. The data required by VARIAO is presented in Figure 18. Should the reader desire to run this problem, using the data from Figures 14, 17 and 18, a comparison of the results obtained may be made with Appendix C. The machine listing presented in Appendix C was created from the GENIAO card output. Since this card output is consistent with the input format expected by GENIAO, the input format described in the prefatory comment cards for GENIAO (Appendix A) should be employed as the key for deciphering Appendix C. The declaration of decision variables without revising the SECIAO data may be extended to other decision variables. For example, the elimination of the I+l and I-l stage variables leaves 16 variables in a
PAGE 165
153 I 125
PAGE 166
154 1 105 +O.0E+0O 1 109 . . -Q -. .__ +0,0E+00 END OF V^lRlABLE VALUE LIST Figure 18 Data for VARIAO
PAGE 167
155 problem involving only 12 equations. Obviously, four of the remaining variables must be decisions. The inclusion of the four decision variables on the decision variable list follows exactly the procedure for the I+l and I-l stage variables. However, unlike L-^., and V__^ , the values for the decision variables supplied to VARIAO via data will in general be unequal to zero. Edie (1970) selected Y ,, P-,, V and F to be the four decision variables reducing the problem to a 12 variable/12 equation problem. Note that the user selection of decision variables is not necessary. HASSAL effects decision variable selection by regarding as decisions all variables remaining unassigned at the conclusion of the Hungarian algorithm. Weighting the variable /equation incidences can force HASSAL to select Y ^, P^ , V and F to be the decisions. In fact, the output assignments selected by Edie (1970) can be duplicated by HASSAL with the prdper weights (based on the maximum product criteria). In retrospect, the key feature presented in this section have been (1) the modification of a general problem formulation to a specific problem and (2) a procedure for the declaration of user selected decision variables, with particular emphasis on procedures for effecting the necessary alterations without recourse to revisions of the SECIAO data. Great importance has been placed on general problem formulations and maintaining the integrity of SECIAO data primarily because the preparation and modification of SECIAO data are tedious operations. A library of general formulations for common processing units prepared as SECIAO data should prove invaluable to the design engineer. VIII. 3. Binary Distillation Figure 19 depicts a three tray distillation column employing a reboiler and a total condenser. The trays have been diagrammed separately
PAGE 168
(unit 1) Figure 19 Simple Distillation Column.
PAGE 169
giving the column a disjointed representation. This has been done to emphasize the designation of each tray as a separate unit. The primary purpose of this example is to illustrate the SECEDE provisions for assembling a collection of units into a processing scheme. Units 1 through 4 are designated as the reboiler and the three trays respectively. Unit 5 represents the partitioning of the overhead vapor into a product and a recycle stream. The equations associated with total condensation are (13) \^-\^^ = (14) Xj,i + X^,2 1 = (15) Lj + D Vj_^ = (16) L^/D R = ; (^«) \i-i-Vi-2 = o The variables R and D represent the recycle ratio and the distillate product flow rate. Two steps are required to declare commonality between variables of several units. First, a common variable value storage location must be reserved in unit 0. This is accomplished with the variable declaration file for unit 0. Second, the code name of the unit variable must be installed in the declaration file entry for each of the unit variables for which commonality is to be established. The second step is accomplished via the variable declaration files for the affected units. The use of the variable declaration files to provide the connections between processing units is illustrated by Figure 20. Figure 20 is the SECIAO data required to establish SECEDE for the three tray distillation column. The variable declaration file appears explicitly in Figure 20 for all units. The remaining files for units 1 through 4
PAGE 170
158 2 3 4 5 6 7 3 9 ^ 10 11 12 13 109 no 111 112 6N0 OF DEClSlOfi VARIABLE FILE / START OF TEAR VARIABLE FILE END OF TEAR VARIABLE FILE / START OF OPERATOR NAME FILE UMARY 1 COMP 2 SIN 3 COS 4 TAN 5 ARCSIN 6 ARCCOS 7 ARCTAN 8 ALOG 9 EXP 10 RECIP :-.--11 -: SQRT -12 SQUARE BINARY 101 = . 102 103 ; / 104 •• OTHER 201 *H 202 »N END GF OPERATOR NAME FILE / START OF METHOD NA.VE FILE END OF METHOD NAME FILE 7 START OF UNIT 47 1 2 3 4 ^ 5 6 7 8 9 10 11 12 13 14 . 15 16 17 18 19 20 Figure 20 SECIAO Data for Simple Distillation Column.
PAGE 171
169 1 21
PAGE 172
160
PAGE 173
161
PAGE 174
162
PAGE 175
163
PAGE 176
164 are indicated by the symbol TRAY. These files for units 1 through 4 are identical to the files presented in Figure 14. Note that unit represents the reboiler, for which the V , , Y ^ and H ^ variables are meaningless. These variables should be eliminated from consideration prior to the algorithmic analysis phase according to the instructions of the proceeding section. As a specific example of commonality, let us consider the variable L^. This particular variable appears in both units 1 and 2. Let us assign the code name 1 to the unit variable we shall employ for the variable L„. An inspection of the variable declaration file for unit 1 reveals a common variable declaration of 1 for the variable L^ , . Similarly, the variable L for unit 2 also carries 1 as the common variable declaration. Consequently, L , for 1=1 and L, for 1=2 share a common value location (with the code name 1) in unit 0. Should the reader wish to run this problem, the fully analyzed GENDER list may be compared with the machine listing in Appendix D. The SECIAO data for the distillation problem may be extracted from Figures 14 and 20. It is recommended that a single copy of the Figure 14 data be prepared and tested with SECIAO. Once the bugs, if any, have been removed, this, card deck should be employed as the master for generating the three additional copies required on a duplicating card punch. When collated with the data prepared from Figure 20, the unit data decks will be integrated into a processing problem. Appendix D, following the example of Appendix C, is the machine listing generated from the GENIAO card output.
PAGE 177
CHAPTER IX CONCLUSION The GENDER System has been developed to assist the design engineer with large scale design problems. This initial version of GENDER, however, is not completely suitable for a production system. Modifications and additions to GENDER have already been planned (l) to improve convenience aspects and (2) to include additional analysis algorithms. IX. 1. Convenience Aspects Let us consider the contact of the design engineer with GENDER. To employ GENDER, an engineer must encode the equation set in the format expected by SECIAO. Further, the output of SECEDE via SECIAO produces code. Similar considerations apply to GENIAO and the GENDER list. The coded input/output is a usable medium for communication with GENDER, but is not a convenient medium. GENDER would be simpler to use, if the input/ output language was already familiar to the design engineer. The adaptation of algebraic equations for the input/output medium is contemplated, perhaps ultimately resembling the input/output language developed by Soylemez (1971). Another aspect of the engineer/GENDER interface involves the user prepared main program. In the current version of GENDER, a main program directs the solution procedure development. This program must be devised to properly react to error conditions recognized as a consequence of analysis or perhaps even interpretation. It is most probable that many of the preconceived error conditions would never be realized for a particular design problem. Thus, the effort of developing a complex error 165
PAGE 178
166 recovery mechanism is somewhat wasted. So far we have been describing the utilization of GENDER in the batch mode. Let us now consider a real time interactive environment. The responsibility for creating the main program would be relieved from the user entirely. Instead the user would employ a console to direct GENDER in performing an analysis strategy. The user need not consider alternative strategies until an error condition has been detected. If a recovery procedure cannot be immediately conceived, the user may temporarily leave the system after employing GENIAO and SECIAO to output the GENDER list and SECEDE. Analysis may be resumed whenever a corrective course of action has been charted. Further, the interactive environment facilitates monitoring either the development or the interpretation of a solution procedure at the discretion of the user. Optimization is an essential factor in design. GENDER has been developed to permit convenient constrained optimization. For the present, the search for optimality has been left to the user. The development of an optimization supervisor to the GENDER System has been proposed. The theoretical foundation for the optimization program has already been established by DeBrosse (1971). The existence of this program should relieve the design engineer of a considerable burden. IX. 2. Additional Algorithms In Chapter VII, we noted that the algorithms provided with GENDER allow only a single analysis strategy. Albeit a realistic strategy, one cannot expect it to suffice in all instances. Several algorithms have been proposed for inclusion in the analysis repertoire. In section V.l. it was pointed out that the weights employed by HASSAL in performing output set assignment could be derrived from a sensitivity analysis. The resulting output set assignment would thus be rapidly
PAGE 179
167 convergent (Edie and Westerberg, 1971). The use of HASSAL to obtain output set assignments enhancing the convergence of a solution procedure is expected to, be relatively simple to implement. However, there is an inherent disadvantage. HASSAL makes no attempt to differentiate between the convergence properties of every output set assignment. An algorithm developed by Edie (1970), based on the creation of a dynamic programming network, selects the best output set from the standpoint of convergence and singularity of the resulting Jacobian. Once implemented, this algorithm should be regarded as something of a last resort since the extensive network manipulations are expected to entail high execution times. The influence of the output set assignment extends beyond the convergence properties of a solution procedure. For a particular design problem, the output set determines the minimum number of tear variables. The. criterion for output set assignment may be arbitrary weights, user preference or sensitivities. Let us consider minimum tear as the criterion for output set selection. With this criterion, the output set selected would be the set for which the minimum number of tear variables would bei the minimum over all possible output sets. The adaptation of this criterion to an algorithm performing both output set and minimum tear selections has been accomplished by Christensen (1970). As in all cases where an improvement in the results of an optimization is expected, the Christensen algorithm is more complex than BEMOAN. In fact, it is vastly more complex. Consequently, a user must cautiously weigh the advantages of perhaps reducing the number of tear variables against the increased execution time over BEMOAN. The algorithms discussed in the proceeding paragraphs already exist in the literature, there remaining only the adaptation to GENDER. Another
PAGE 180
168 algorithm currently being devised focuses on the compaction of GENDER lists via indexing considerations. These considerations parallel the simplification of FORTRAN programs by employing DO statements. As one might suspect, pattern recognition plays a key role in the identification . of indexed GENDER list components in a repeating sequence. Considerable simplification to the GENDER list and to the SIM's is anticipated for all staged and discretized unit processes, such as distillation and absorption. IX. 3. A Final Note on GENDER The current version of GENDER is heavily diagnostic. That is, many more tests, with provisions for diagnostic messages, are performed than are essential to the task of solution procedure manipulation. These tests must be removed before GENDER can begin to assume the configuration of a production system. The tests were originally devised as debugging conveniences. However, by retaining the myriad tests, GENDER affords the research engineer with a convenient medium for developing and testing analysis algorithms, and for studying the influence of analysis strategies on solution procedures.
PAGE 181
APPENDICES
PAGE 182
APPENDIX A
PAGE 183
171 c* •••••»«...«•••»..».••••». ..•••.. ••• • c •••.»• C • GENDER • C • GENERAL • C • INFORMATION • c ....»•• c C SPECIAL INSTRUCTIONS/JOB STEPS C A USER PREPARED MAIN PROGRAM MUST C 1. CALL COIN C 2. ESTABLISH INFORMATION BLOCK C 3. CALL SECIAO C A. CALL GENIAO (OPTIONAL! C 5. EXECUTE ANALYSIS STRATEGY C 6. OUTPUT RESULTS C C SPECIAL INSTRUCTIONS/DEFAULT OPTIONS C THE PROGRAM DFAULT IS PROVIDED TO CREATE THE DATA C STRUCTURES REOUIRcD FOR ANALYSIS AUTOMATICALLY. THE USER C MAY, IF DESIRED, OMIT SIM GENERATION, CRUDE. GENDER LIST C GENERATION AND OTHER PROCEDURES FROM THE USER PREPARED C MAIN PROGRAM. c C CURRENT STATUS C OPERATIONAL, EXCEPT THE INTERPRETER. THE INTERPRETER C IS CURRENTLY IN THE CODE/DEBUG STAGE.
PAGE 184
172 C c«^«» »••• ••..••••••••.•»•••• •.»...•». ••...• C • CFAULT « C • • C PURPOSE C OFAUUT PROVIDES DEFAULT OPTIONS FOR THE GENDER SYSTEM. C C USAGE C CALL DFAULTUCGRUP,JCASIM,JCMOOE,jCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCGRUP = THE ADDRESS OF A GENDER GROUP C JCASIM = THE ADDRESS OF A SIM INFORMATION BLOCK C JCMOOE = AN INTcGfiR HAVING THE FOLLOWING VALUES AND MEANING C = ALL OPTIONS C 1 = PROVIDE GROUP IF JCGRUP = C 2 = OPTION 1 AND PROVIDE SIM IF JCASIH = C 3 = OPTIONS I THROUGH 2 AND PROVIDE OUTPUT SET C IF THE SIM HAS AT LEAST ONE UNASSIGNED ROW C JCCLNO = A USER ASSIGNED CALL STATEMENT PARAMETER C C REMARKS C THE INTEGER I IN THE NAMED COMMON STATEMENT MUST, FOR C SOME MACIHINES, BE REPLACE BY THE VALUE OF JCTCIA. C MORE DEFAULT OPTIONS WILL BE ADDED AS THEY ARE DEVELOPED. C C SUBROUTINE AND FUNCTION SU6P0RGRAMS REQUIRED C CUDGEL C FIND C FRMCEL C HASSAL C J70SUP C SIMGEN C SYSENT C SYSEXT C TOCELL C C ERROR COOES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C C c ••••>«••• SUBROUTINE CFAULT < JCGRUP* JCASIH, JCMODE, JCCLNO) COMHON/ALLOC/JCCOREI 1) DIMENSION S(A),R12),D{1), 0(4) INTEGER S,R.D,0 DATA S/1.8,l.l/,R/1.0/,0/l,13tlf 1/ C ENTER CALL SYSENTd, 6, 1,1, JCCLNO) C MA=ADCRESS OF SPUR FOR GENDER GROUP Ml=JCC0RE(l6)»l . H2=JCC0RE(I7)ta MA=jCC0RE(Kl)*5»JCC0RE«M2)-5 C CRUDE GENDER LIST IF(JCGRUP.EQ.O)CALL CUDGEL (0, JCGRUP, H
PAGE 185
173 IFCJCHODE.EQaiGO TO 99 C SIM CALL FRHCEL(JCCORE(HA),JCGRUPtJCASIH,S,l» IF(JCASIM.EC.O)CALL SIHGEN{ JCGRUP, JCASIM, 1, I) CALL TOCELL(JCCORE(HA), JCGRUP, JCAS1H,S,U IF«JCM00E.EQ.2»G0 TO 99 C MB=ADORESS OF SPUR FOR ORDINATE Ml=JCASIMt2 MB>»JCC0RE(MU-5 C HC^AOORESS OF LOAD FOR ROW HC3j70SU?UCASIH.l,OtO,l) M0=MC»7 C OUTPUT SET ASSIGNMENT R{2)»l-JCC0RE(MD) Ml=l 0(1)=0 CALL FIND(JCC0RE(MB),R,D,0,R,JCC0RE(MC).H1,1) IF( Ml. NE.O) CALL HASSALI JCGRUP, JCASlMtl) IF(JCM00E.EC.3)C0 TO 99 C MORE DEFAULT OPTIONS TO BE ADDED LATER C EXIT 99 CALL SYSEXT RETURN END
PAGE 186
.174 C c«>«»«*«»*****««*«>**«*>« .».».•...•.».» ..».••# ••• c .•»... •••• C • USRPAC • C • GENERAL • C • INFORMATION • C .••••.».•.•»••» c C SPECIAL INSTRUCTIONS/DATA TYPES C LIST TYPES I (SECEDE) AND 2 (GENDER LIST) MUST BE FORHAROC BACKWARD. C C SPECIAL INSTRUCTIONS/LEND C THE FOLLOWING DATA STRUCTURES MUST BE PERMITTED BY THE C LENDS. C SECEDE LIST TYPE 1 C SEE LEND REQUIREMENTS FOR REMOTE. C (1, 5 TYPE FLAG, 7 SELECTION COST, 8 CODE NAME, C 19 DIMENSIONALITY) C (I, 5TYPE FLAG, 16 CODE NAME, 16 ORDER OF C OPERATOR) C GENDER LIST LIST TYPE 2 C SEE LEND REQUIREMENTS FOR NETPAC (IN SUPPAC). C DATA TYPE 6 MUST HAVE A LEND OF (1,0,1,0). C (I, 2. 3, 3 TYPE FLAG, ^,4, 4 WORKING SPACE, 5, 5, C 5, 7 POINTER, 7 POINTER, 7 POINTER, 7 C DEPTH, 8 POINTER, 3 POINTER, 8 POINTER, 8 C METHOD CODE) C (If 2, 3, 3 TYPE FLAG, 4, 4, 4 WORKING SPACE, 5, 5, C 5, 16 POINTER, 17 POINTER, 18 POINTER, 19 C DIMENSIONALITY, 20 NUMBER OF OUTPUTS) C (I, 2, 3, 21 CODE NAME, 22 DIMENSIONALITY) C (1, 3, 23 CONSTANT VALUE) ' c C SPECIAL INSTRUCTIONS/DEBUG C THE FOLLOWING TABLE GIVES THE PACKAGE AND PROGRAM ID. C NUMBERS FOR USRPAC. C PROGRAM PKG. ID./PROG. ID. C lOPAC C GENIAO l/l C SECIAO 1/2 C VARIAO 1/3 C JIARBS 1/4 C JICONS 1/5 C JIDECL 1/6 C JIOIMS 1/7 C JIFILE 1/8 C JIGMBL 1/9 C JILEOL 1/10 C JINAME 1/11 C JIRAFE 1/12 C JIRESO 1/13 C JIVALU 1/14 C JIVARI 1/15 C JIVTVF V 1/16 C INTERP C COVERT 2/1 C GLINT 2/2 C LINKED 2/3 C NUMBER 2/4 C JIFATV 2/5 C
PAGE 187
175 C CURRENT STATUS C lOPAC OPERATIONAL C INTERP COCe/DEBUG C c>««**«*>»**<«*« •••••«. c
PAGE 188
176 C c ...•«•• «..». » • .»« c •••• C • GENIAO • c • c C PURPOSE C GENIAO HANDLES THE INPUT ANO OUTPUT OF THE DATA DESCRIBING C A GENDER LIST. C C USAGE C CALL GENIAO(JCSENS,JCCLNO) C C DATA FORMAT C THE SYMBOLS , AND $ ARE USED TO DELIMIT LOOPS. B C INDICATES A BLANK CARD. THE SYMBOLS *H* 00 NOT APPEAR ON C THE CARDS READ, BUT ARE USED HERE TO INDICATE A CARD TYPE C NUMBER, N, WHICH CORRESPONDS TO THE FOLLOWING DATA FORMATS. C CARD TYPE FORMAT C 1 11,119,3120 C 2 15,120,215,120.15,120 C 3 11,119,2120 C 4 11,119,120 C 5 4120 C C +ILEVEL 0) C IGROUPS) C +1, IDENTIFICATION FLAG (=0), PROTECTION FLAG, OEPTHt C METHOD CODE •!• C * C ^ INDICES •2» (MIN. AND MAX.) C $ C (DECISION VARIABLE LIST) C C + 1, VARIABLE CODE NAME, DIMENSIOMALI TY, SELECTION FLAG C 'S* c C INDICES •2» (MIN. ANO MAX.) C *» c a C (TEAR VARIABLE LIST) c '*.-. . C 1» VARIABLE CODE NAME, DIMENSIONALITY, SELECTION FLAG C •i* C C INDICES -Z* (MIN. AND MAX.) C $$ C B c . $ C +8 C < LINKAGE) C C I, NUMBER OF PATHS OUT OF A NODE (FORWARD), SEQUENCE C NUMBER OF LEADING NODE ">• C C SEQUENCE NUMBERS OF TRAILING NODES 'S* C $$ C +8 . C (LEVEL 1 REPEATED FOR ADDITIONAL LEVELS) C (GROUP BODY ENTRIES MAY BE A GROUP AS IN LEVEL 0) C C 1, IDENTIFICATION FLAG (1 ER, 2 EVALUATED ER, 3
PAGE 189
177 C EUUATION, 4 SOLvEO EQUATIONt 5 EVALUATED EQUATION, 6 C CONSTRAINT, 7 SOLVEO CONSTRAINT, 8 EVALUATED C CONSTRAINT), CODE NAME, OIMESNIONALI TY, NUMBER OF C OUTPUTS »i» -OR1, IDENTIFICATION FLAG (9 METHOD C . INSERT), NUMBER OF ENTRIES •4» C C INDICES COMIT FOR ID. FLAG 9» 'Z* (HIN. AND MAX.) C $ C (OUTPUT VARIABLE LIST OMIT FOR ID, FLAG 9) c ! C +1, VARIABLE CODE NAME, DIMENSIONALITY, SELECTION FLAG C O* c C INDICES •2» C $» C B C (LINK EDITOR LIST OMIT FOR ID. FLAG 9) C C ;1, IDENTIFICATION FLAG 10 OPERATOR, 1 VARIABLE, 2 C CONSTANT, 3 OUTPUT VARIABLE, 4 EQUATION VALUE), C CODE NAME, DIMENSIONALITY (ORDER OF OPERATOR) "l* C C INDICES "a* c $$ C B , C +8 C (LINKAGE) C C l|, NUMBER OF PATHS OUT OF A NODE (FORWARD), SEQUENCE C NUMBER OF LEADING NODE •-!»• c C SEQUENCE NUMBERS OF TRAILING NODES S* c *%s c *a c $ . i C B C B : C C DESCRIPTION OF PARAMETERS C SEE SECIAO C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C NOTE THAT TWO BLANK CARDS IN ADDITION TO THE BLANK C TERMINATING THE LAST LINKAGE INPUT ARE REQUIRED TO C . TERMINATE GENDER INPUT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C CORN C COUPLE C FETCH C FRMCEL . C JIDIMS C JIFILE C JIGMBL C JltEOL C JIVARI C JIVTVF C LNKBNT C LNKFWO C NEHCEL
PAGE 190
178 C NEXT C POPUP C PUSH C STORE C SYSENT C SYSERR C SYSEXT C TOCELL . C." . C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERROR(OATA PROVIDED) C 1 NF NO GIM8L (JCC0REtl6)) C 2 NF NO GENDER LIST ( JCCOREIJCCORE C16) I ) C 3 NF NO ENTRIES FOR LEVEL (LEVEL) C C METHOD C SELF-EXPLANATORY C c . ••••••••«• c SUBROUTINE GENI A0( JCSENS* JCCLNO) COMMCN/ALLOC/JCCORE( 1) DIMENSION S(5),C(5),0I8),L(5),F(2),Z(30),G{13),B(19),U(10),H(4), IK(7),P14),V(7),H(4),E{4),N('V),Y(4),A(4),0(4),X(4),T{30),M(7) INTEGER SfC,C,F,Z,G,BtU.P.V.H,£,Y,A,Q,X,T,SAVEfH DATA S/0f0,1.0,2/,C/0,0,li0.l/f0(l)/l/,L/3il,l,lf0/fF/l,2/,Z(15) 1 /-l/,Z{29)/0/,Z(30)/18/,G/4,3,l,2,7,4,A,8,4,A,7,2,3/,B/6,3,l»2, 2 17.1,ltl9,l,l,20,l,l,I8,lf ltl6,ltl/tU/3.3,1.2.17.1,l,16,I,l/,H/l> 3 6,0>0/,K/2,2l.l.l,22,l.I/>P/l,l.I,l/.V/2,5,2.2.2>l.l/.H/1.7,l,l/. ^ E/I,I.lf2/,N/l,A,3,3/,y/l,l,2,2/,A/l,21,l,l/,Q/l,3,ltI/t 5 X/l,4,l»l/,T(15)/-l/,T«29)/0/,T«30)/18/tW/2,5,l,l,lfl,l/ C ENTER CALL SYSENT«l,5,l,l,JCCLN0) SAVE=JCC0RE(18) C IN OR OUT IF(JCSENS.LT,1)G0 TO I C SET UP GIMBL CALL J1GHBL(HA,MB,MC,1) GO TO 2 C NA^AOORESS OF GIHBL 1 MA=JCC0RE(16) M1 = HA M2»l IF(HA.LE.0)G0 TO 41 C MB=ADCRESS OF SPUR BLOCK Ml=MA*l MB=JCCORE(MI) C MC=MAXIMUH CORE BLOCK SERVICIBLE WITH THE SPUR BLOCK Ml=JCC0RE(I7)*8 MC=JCC0RE(H1) Hl=Hl*l M2=JCC0RE(Ml) Ml=Ml+5 M2 = M2«-JCC0RE(Ml) IFJK2.GT.HC)KC=H2 IF(10.GT.MC)«C=10 C MO=ADORESS OF SPUR FOR GROUP 2 Hl=JCC0RE(17)+3 M0=M8+5»(JCC0RE(Ml)-l) C HE^ADORESS OF SPUR FOR GROUP BODY ENTRY (NO INDICES) Ml-Ml+l ME=HB*5»(JCC0RE
PAGE 191
179 C MF=AODRESS OF SPUR FOR OLD VALUE UPDATE INSERT HF=H8»5»CJCC0RE(HU-l) C MG=ADCRESS OF SPUR FOR METHOD INSERT MG»HB»5»(JCC0RE(U-ll C S(4) Hl=Hl-2 S14)=JCC0RE(MI) C C(4) Ml=Ml-ll C(4l=JCC0RE(Ml) L(2)=l L(3)=l H5)=0 C IN OR OUT IFUCSENS.LT.DGO TO 16 C INPUT C MH=AOCRESS OF SPUR FOR LARGE CORE BLOCKS MH=KB-5 C HI=INPUT DATA SET H1=JCC0REJ10) C MJalNClCATOR MJ=1 C MKaMETHOO LIST HEAOCELL MKsQ C . MM=TEMPORARY LIST ENTRY Ml=Ml+8 M2=SU) S(*)=JCCORE(Hl) CALL NEHCEL(S,MM,1) S<4J=M2 C READ 3 REACJHI, 101X0(1), I'»l, 5) lOl FORMATdlf 119,3120) IF(D(1).EQ.0)G0 TO 10 C TYPE MI*C<2)+1 GO TO (4, 5,5, 5, 5, 5, 5, 5, 5, 7), HI C GROUP A CALL J1FIL6(C,L(MJ),MD,M1,M2,1,F,Z,1) MJ«3 H2=K2-1 IF(C(4).GT.0)CALL J10IHS(M2, 1, 2, 2, 1 , 1 ) D(2)=l 0(6)*0 D(?)=0 M2*0 CALL JlVARIIM2,0U),2,M2,l,l) Call jivari(h2,d(7),2,m2,i,2» call tccell(jcc0re(hd),m1,0(2),g,1) GO TO 3 C GROUP BODY 5 M1 = ME*-0(A)»10 CALL J1FILE(C,L(MJ),M1,M2,M3,1,F,Z,2) MJ=3 H3=M3-D(',)»2fl IF(C(4).CT.0)CALL J1DIMS(M3,0I A) ,2,2, 1,2) D{2)=C(2)-l 0(l)=2 0»6)=-0 0(7I*0
PAGE 192
180 CALL JIVARK JCSPUR.0(6),1,MK,1.3) CALL JILEDL(S,0(7J,HK, 1,0,1) CALL T0CELL(JCC0RE(H1),H2,D,&,2) GO TO 3 C INSERT METHOD 7 CALL JlFILE(C,L(HJ),HG,Hl,M2,l,F,Z,'i) HJ=3 CALL J1VTVF{MG,M1,D«3),1» GO TO 3 C LINKAGE INPUT 10 D(5)=0 0(6)=0 *1N=S(4) Hl=L(2) M2=3-M1 C READ LINKAGE (PART I) 11 REA0(MI,101)M3,H<^,L(3) IF(M3.EQ.0)G0 TO 15 C MODE H3=PM IF(L<3).LE.0)GO TO 12 L<5)=L(3)-Z(8) CALL FETCH 141 CALL TOCELL(JCC0RE(MO),MM,0(5),W,7) GO TO 11 C ITERATE 15 IF((0(1)+M3).EQ.0)G0 TO 40 S(4)=MN L(5)=0 L(3)'=l L(2)-H2 MJ^l GO TO 3 C OUTPUT C MH AND MI ARE OUTPUT DATA SETS 16 MH=JCCORE(ll)
PAGE 193
181 m=ilABS(JCSENS) C MJ AND HK ARE GROUP LIST HEADCELLS MJ»0 MK'O C HL=TAILCELL CORRESPONDING TO HJ ML«0 C HM=LEVEL HM»0 C FILE ENTRY FOR CIM8L D<2)=0 0(31=0 CALL ST0REIC,L,D«2),E,F,Z,1) C MN=FILE ENTRY NUMBER OF CURRENT PARENT MN=l C HO=PARtNT GROUP INDICATOR M0=0 C M M1=JCC0RE117)+13 M13)=JCC0RE(MI) M(4)=M(3» C PREPARE FOR TRACE Ml=JCCORE{MA) M2=2 1F(M1.LE.0)G0 TO 41 M2=NA*2 M2=JCC0RE(M2)+1 H3=0 H4=0 G(3»=2 B13)=2 U(3)=2 M5=Ml M6=-l C PREFACE WRITE(MH,103J 103 F0RHAT(115HITHE FOLLOWING TABLE GIVES THE VARIOUS OUTPUT FIELDS WH IICH MAY APPEAR AS OUTPUT. EACH LINE OF OUTPUT BEGINS WITH A) WRITE(MH,10^) 104 FORHATdlSH LETTER DESIGNATION. THIS LETTER CORRESPONDS TO OnE OF I THE ENTRIES IN THIS TABLE, THUS IDENTIFYING THE VARIOUS FIELDS) WRITE(MH,105) 105 FORHATOOH IN THE LINE OF GENDER OUTPUT.) WRITE(KH,106) , „^ 106 F0RKAT(60H A IDENTIFICATION FLAG, PROTECTION FLAG, DEPTH, METHOD ICODE) HRITt(HH,I07) . , , 107 F0RHATJ107H B MAPPING FLAG, MAPPING INDEX, OPERATOR FLAG, SCALE S IIGN FLAG, SCALE, OFFSET SIGN FLAG, OFFSET (OR INDEX)) HRITE(MH,108) 108 F0RMAT(54H C VARIABLE CODE NAME, DIMENSIONALITY, SELECTION FLAG) WRITE
PAGE 194
182 WR!Te(HH,113) 113 F0RNAT(73H H NUMBER OF PATHS OUT OF A NODE (FORWARD) i SEQUENCE NU IMBER CF NODE
PAGE 195
183 CALL JlVARI(0,D<7),2,0,JCSENSf 5) IF(JCSENS.LT.0iHRITHtHI,119) TEMPORARY GROUP LIST D(5)=Ml 0<7)=NQ CALL PUSH(SiML,CC6),K,2,2) IF(MJ.EQ.O)MJ=HL GO TO 26 ER, ECUATION OR CONSTRAINT 22 CALL FRfCEL(JCC0RE«ME),Ml,0(2!,8,4) Ot2)=D«2»*l WRtTE(HH,12l)(D( n,I = 2,5) 121 FORMAT{AH 4129) IF 123 F0RKATH9H (LINK ECITOR LISTJ) JCC0Re(l3)=6 CALL JlLE0L(0,0(7),0,JCSENS,0i3) IF(JCSENS.LT.0)WRITE(Hi,119) GO TO 26 INSERT 24 CALL FRHCEL(JCC0RE{MG),Ml,0(2)iU,5) 0(2)=.D(2)+8 METHOD 25 CALL FRHCEL(JCC0RE(HG),M1,0(3),M,7) HRirE(HH,l25){0(I),I=2.3) 125 FCRr^AT(4H G 2129) IF(JCSENS.LT.0)WRITE(MI,l01)(D(l)iI»1.3) JCC0RE(13)=6 CALL JlFILE(C,L{4),MF,Ml,M5tO,FfZt8) STORE LINEAR SEQUENCE NUMBER 26 CALL TCC£LL(JCC0RE(MD),M1,MP,N,8) ITERATE M5=H1 M6=-l GO TO 16 NEXT PARENT GROUP 27 IF(HO.EQ.O)GO TO 29 IF{^•K.EQ.O)GO TO 30 MO=NO+l MP=MP*1 HN=MP L(5)=l 28 CALL P0PUP{Sf.HK,HK,DI6),K,l,2) CALL JIFILE(C.L(4),MD,-D(7),M5,0,F,Z,9) CALL FRMCEL(JCC0RE(H0).0(6)fM2iX,8) M5=D(6) «6=HM-1 IFIHO.EC.DGO TO 17 . GO TO 18 LINKAGE OUTPUT PART I 29 «0=2 30 L(5)=1-ZI8)
PAGE 196
184 IF(JCS6NS.LT.0)WRITE(MI,H9) WRITE(MH,126»MM 126 F0RHAT(19H LINKAGE FOR LEVEL 12) JCCCRE{13)=6 . M5=0 M6=0 31 M5 = ."5*l IF(M5.GT.HPJC0 TO 37 CALL FETCH(C»L('» ). 0(3) fE.F.Z, 0,5) L(5)=0 CALL ST0RE(CrL(A),L(5),Y,F,Z,3) IF«0(3).LE.0)G0 TO 32 Kb=fb*l Dt3)=«M6 32 IF(CC4).EQ.0)G0 TO 36 0(2)=0 33 N7=0(A) 0{2)=D(2)+1 D(*)=LNKFWO(StM7,3) IF(DWRITE(MI,l01)J0(n,I = l,3) JCC0R£(13)=6 C LINKAGE OUTPUT PART II S't M8=2 35 M3=^"8^l CALL P0PUPlSfM7,M7,0(M8),A,2i3) IF(((H8-6)»(D(2)*-2-Ma) ).NE.O)GO TO 35 0(2)=D(2)-H8*2 WRITElHH,12a)
PAGE 197
185 GO TO 42 ERROR 41 CALL SYSERR
PAGE 198
186 C c>««»«» • • ••»• ••• c C • SECIAO • c ..«»..•••* c C PURPOSE C SECEDE HANDLES THE INPUT AND OUTPUT OF THE DATA ASSOCIATEO C WITH THE SERVICE MOUULE. C . C USAGE C CALL SECIAOlJCSENSiJCCLNO) C C DATA FORMAT . C THE SYMBOLS , AND $ ARE USED TO DELIMIT LOOPS. B C INDICATES A BLANK CARD. THE SYMBOLS *N» 00 NOT APPEAR ON C THE CARDS READ, BUT ARE USED HERE TO INDICATE A CARD TYPE C NUMBER, N, WHICH CORRESPONDS TO THE FOLLOWING DATA FORMATS. C CARD TYPE FORMAT C 1 11,119,120 C 2 4120 C 3 II, 119, SKIP 14, A6 C 4 11,119 C 5 11,119,120,040.28 C 6 11,119,3120 C 7 I1,I19,'2I20 C 8 11,119,0^0.28 C 9 11,119,11,119,120 C 10 15,120,215,120,15,120 C THE DATA ORGANIZATION FOLLOWS, WITH COMMENTS ENCLOSED IN C PARENTHESIS. C (DECISION VARIABLE FILE) c C +1, DECISION VARIABLE CODE NAME, DIMENSIONALITY -l* C C INDICES "HO* IMIN. AND MAX.) c «$ C B C (TORN VARIABLE FILE) C C +1, TORN VARIABLE CODE NAME, DIMENSIONALITY •!• C C + INDICES •10» (MIN. AND MAX.) C $% C B C (OPERATOR NAME FILE) C C I, OPERATOR CODE NAME, OPERATOR ALPHAMERIC MHE •3» CI C B C (METHOD NAME FILE) C C I, METHOD CODE NAME, METHOD ALPHAMERIC NAME 'S* C $ C B C (UNIT CONNECTIONS) C C +1, NUMBER OF COMMON VARIABLES •4» C (COMMON VARIABLE OECl'AKATION FILE) C C I, COMMON VARIABLE CODE NAME, DIMENSIONALITY 'l* C
PAGE 199
187 C MAXIMUM INDICES 'Z* C $$ C +6 C +tCOMM0N VARIABLE VALUE FILE) C C It VARIABLE CODE NAME, DIMENSIONALITY, VALUE 'S* C C INDICES »2» C $$ C *B C XCOMHON VARIABLE NAME FILE) C C «« 1, COMMON VARIABLE CODE NAME, COMMON VARIABLE ALPHAMERIC C NAME •a* C $$ C B C CUNIT REPEAT AS NECESSARY) C C I, NUMBER OF VARIABLES, NUMBER OF ER'S, NUMBER OF C EQUATIONS, NUMBER OF CONSTRAINTS •6» C +(VARIABLE DECLARATION FILE) C C 1, VARIABLE CODE NAME, COMMON VARIABLE CODE NAME, C DIMENSIONALITY s?* C C MAXIMUM INDICES 'Z* C »$ C +8 C (ER DECLARATION FILE) C C 1, ER CODE NAME, DIMENSIONALITY «1* C C MAXIMUM INDICES "Z* C $$ c a C (EQUATION DECLARATION FILE) C C If EQUATION CODE NAME, DIMENSIONALITY •!• C C *** MAXIMUM INDICES 'Z* C $$ C +8 C (CONSTRAINT DECLARATION FILE) C C I, CONSTRAINT CODE NAME, DIMENSIONALITY »l» C C MAXIMUM INDICES *Z» C $$ C +8 C (CONSTANT VALUE FILE) C C 1, CONSTANT CODE NAME, VALUE sS* C » C B C (VARIABLE VALUE FILE) C C 1, VARIABLE CODE NAME, DIMENSIONALITY, VALUE 'S* C C INDICES •2» ' C $$ C +8 C (ER NAME FILE)
PAGE 200
188 C C I, ER CODE NAMEt ER ALPHAMERIC NAME •3» C $ C (VARIABLE NAME FILE) C C It VARIABLE CODE NAME, VARIABLE ALPHAMERIC NAME •S* C $ C +8 C tER FILE) c »•.•• ^ C * 1, ER CODE NAME, NUMBER OF OUTPUTS, DIMENSIONALITY "T* C C INDICES 'lO* (MIN. AND MAX.) C « C C • It CODE NAME, IDENTIFICATION FLAG, COST JOROER OF C OPERATOR), DIMENSIONALITY •S* C C INDICES "lO* C $* C B C « C +8 C (EQUATION FILE) C C I, EQUATION CODE NAME, NUMBER OF OUTPUTS, DIMENSIONALITY C .T* C C * INDICES •lO* (MIN. AND MAX.) C » C C 1, CODE NAME, IDENTIFICATION FLAG, COST (ORDER OF C OPERATOR), DIMENSIONALITY »9» C C * INDICES "lO" C »» C B C * . C B C (CONSTRAINT FILE) C + C I, CONSTRAINT COCE NAME, NUMBER OF OUTPUTS, C DIMENSIONALITY o?* C C INDICES •10» (MIN. AND MAX.) C * c C 1, CODE NAME, IDENTIFICATION FLAG, COST (ORDER OF C + OPERATOR), DIMENSIONALITY •9» C + C + INDICES »10» C *$ C B C » , C B C S C 6 C C DESCRIPTION OF PARAMETERS C JCSENS = -N, OR I AS RESPECTIVELY PUNCHED (AND WRITTEN) C OUTPUT, WRITTEN ONLY OUTPUT OR INPUT IS DESIRED.
PAGE 201
189 C N » THE CARD PUNCH DATA SET REFERENCE NUMBER C JCCLNO » A USER SPECIFIED CALL STATEMENT ID. NUMBER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C THE FUNCTIONS AND CONSTRAINTS MUST BE PROVIDED IN REVERSE C POLISH NOTATION WITH =0 UNDERSTOOD. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C JICONS C JIDECL C JINAME C JIRAFE C JIVALU C NEWCEL C STORE C SYSENT C SYSERR C SYSEXT C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERROR{DATA PROVIDED) C 1 NF NO VARIABLES DECLARED (UNIT NUMBER) C 2 NF NO ER'S, FUNCTIONS OR CONSTRAINTS (UNIT NUMBER) C 3 NF NO UNITS (UNIT NUMBER) C C HETHCC C SELF-EXPLANATORY C c •• ••• c SUBROUTINE SECI A0( JCSENS, JCCLNO) COKfON/ALLOC/JCCOR£« 1) DIMENSION L(7),D{8),F(4),P(4) INTEGER C,F,P,U ENTER CALL SYSENTd, 5, 1,2. JCCLNO) 00 91 1=1,7 91 L(I)=l 00 92 1=1,* F{I)=1 92 P(I)=1 SECBL SET UP IF(JCSENS.LT.1)G0 TO 4 D IS TEMPORARY SPUR IF(JCC0RE{151.GT.0)CALL SYSERR ( 1,JCC0RE( 15 ) ) 0(1)=.0 D(2)=0 0(3)=1 0(4)=60 C(5)=l LOAD BLOCK CALL NEHCEL(D,HB,1) MBA=MB*28 ; SPUR BLOCK Ml=JCCCRE(17) Ml=JCCCR£(Ml) M2»Ml/2*2 D(2)=0 0(4)=M2»5
PAGE 202
190 CALL NEHCELCD,MA,2» INITIALIZE SPUR BLOCK M3'=PA 00 I 1=1. M2 DO 1 J=1.5 JCCCRE(K3)=C(l)»(l/J)*(J/3J*«I-2+Ml»(l/I))««'V/J)»(J/A) 1 H3=K3*l SECBL M1=HA»20 CALL NEWCEL{JCC0RE(MI),M2,3) JCCCRE(15»=M2 M^ = ^^2l JCCCRE=H2 3 H3=NAt5»M4 CALL NewCEHJCC0RE(M3),M2,4) Ml=Hl*l JCCCRE(M1)=M2 MC=INPUT DATA SET HC=JCC0RE{10) GO TO 5 MA=AOCRESS OF SPUR 4 H1=JCC0RE115)*1 MA=JCC0RE(M1) MB=ACCRESS OF LOAD Ml=fl*l HB=JCCCRE(MIJ M8A=MB+28 MC AND MO ARE OUTPUT DATA SETS MC=JCCCREai) HD=IAOS«JCSENS» PREFACE WRITECHClOl) 101 F0R^AT(115HlTHE FOLLOWING TABLE GIVES THE VARIOUS OUTPUT FIELDS WH IICH MAY APPEAR AS OUTPUT. EACH LINE OF OUTPUT BEGINS WITH A) WRITE(MC,102) 102 FORMATdlSH LETTER DESIGNATION. THIS LETTER CORRESPONDS TO ONE OF 1 THE ENTRIES IN THIS TABLE, THUS IDENTIFYING THE VARIOUS FIELDS) WRITE
PAGE 203
191 WRITE(HCil06) 106 FORMAT (30H C WRITE(HC,107) 107 FORMAT (30H C WRITE(WC,108) 108 F0RMAT(62H 6 1 INCEX) HRITE(MC,109) 109 FORMAT (ASH F WRITE(MC,110) 110 FORMATOOH G WRITEtHClIl) 111 FORMAT{83H H CODE NAME, ALPHAMERIC NAME) NUMBER OF COMMON VARIABLES) MAXIMUM INDEX, MAXIMUM INDEX, MAXIMUM INDEX, MAXIMUM VARIABLE CODE NAME, DIMENSIONALITY, VALUE) INDEX, INDEX, INDEX, INDEX) NUMBER OF VARIABLES, NUMBER Of ER'S, NUMBER OF EQUAT IIONS, NUMBER OF CONSTRAINTS) WRITE(HC,112) VARIABLE CODE NAME, COMMON VARIABLE CODE NAME, DIMEN CONSTANT CODE NAME, VALUE) CODE NAME, NUMBER OF OUTPUTS, DIMENSIONALITY) CODE NAME, IDENTIFICATION FLAG, COST (ORDER OF OPERA 112 F0RfAT(65H I ISIGNALITY) WRITE(HC,113) 113 F0RMAT(29H J WRITEJMCllA) llA F0Rf'AT(48H K WRITElHCllS) 115 F0RPAT(76H L ITOR), CIMENSIONALITY) WRITE(fC,ll6) 116 F0R.VAr(7HlSeCE0E) HRITE(NC,ll7) 117 FORI^AT(23H0CECISION VARIABLE FILE) JCCCRE(13)=6 DECISION VARIABLE FILE 5 L(l)=4 F«l)=2 JCCCRe(M8A)=-l CALL JlRAFe(L,l,JCSENS,F,l) IF(JCSENS.LT.0)WRITE(M0,118) 118 FORMAT (IH ) TEAR VARIABLE FILE LC3)=2 L('.) = l IF(JCSENS.EC.l)GO TO 51 WRITE(WC,119) 119 F0RyAT(l9H TEAR VARIABLE FILE) JCCCREtl3)»6 51 CALL J1RAFE(L,1,JCSENS,F,2) IFtJCSENS.LT.0)WRITE(M0,118) OPERATOR NAME FILE L(l)=3 L(2)=2 L(3)«l L(4)=l F(l)=l Ml=JCC0RE(17)+2 F(2)=JCC0RE{M1)+1 JCCCREtMBAl^O IFt JCSENS.EC.DGO TO 52 HRITE(MC,120) 120 FORfAT(l9hOCPERATOR NAME FILE) JCCGRE(13)=6 52 CALL JINAME
PAGE 204
192 IFCJCSENS.EC.DGO TO 53 WRlTE(fC,l2l) 121 FORfAT(l7H0METHOD NAME FILE) JCCCR£{13)=6 5-3 CALL J1NAHE(L,JCSENS|F,2J lFCJCStNS.LT.O)WRITE(H0,118) UNIT CONNECTIONS IF(JCS£NS.EQ.1)G0 TO 54 WRITE(^1C,122J 122 F0RMAT121H0UNIT = CONNECTIONS) JCCCRE(13)»6 NUMBER OF COMMON VARIABLES 54 L(2)=4 L(3J=2 F(l)=4 F(2)=l IFtJCSENS.LT.lJGO TO 6 INPUT REA0{WC,123)H1,H2 123 FORfATCIl, 119, 3120) IF(Ml.EC.OJGO TO 8 CALL STCRE( JCC0RE(MA),L,M2fPfF,JCCORE(MB),l) GO TO 7 OUTPUT 6 Kl*l CALL FETCH! JCCORE
PAGE 205
193 JCCCRE(13J=6 73 CALL JlNAHcCL.JCSENSiFfB) Tt IF(JCSENS.LT.0)WRITe(HD,ll8) C UNIT 8 U=0 9 U«U*l LCl)=4 L<2»=4»U L(3)=l F(l)=8 F<2)=8 F(3»=l P('H=8 JCCCRe(KBA)=-l IFIJCSENS.lt. DGO TO 11 C INPUT DC 10 I=li8 10 0(n=0 REA0(HCil23)Ml,0{2)i0(4),0(6lt0(8) IF(r'l.EC.O)GQ TO 19 CALL STCREl JCC0RE(MA),L,0,P,F,JCC0RE«MB),2) GO TO 12 C OUTPUT 11 Ml=l CALL FETCH( JCC0RElHA),L,DiPtF,JCC0REtHB)iHl,2) IF^^'l.EQ.-^)GO to 20 HRITE(HC,128)U 128 FCRf(AT(8H0UMT = 15) WRITE(MC»129)0(2)tC(4),0(6).0(8) 129 F0RHAT(AH H 4I29J lF(JCSENS.LT.O)WRITE(M0,l23)Ml,D(2)fD(4),O(6J,Dt8) C VARIABLE DECLARATION FILE 12 L(H = 5 F(3»=C(2> IFJJCSENS.EQ.DGO TO 1201 WRITe(MCtl30) 130 F0RNAT{26H VARIABLE DECLARATION FILE) JCCCR£(13)=6 1201 CALL JlDECLtL,JCSENS,F,2) IFIJCSEKS.LT.O)HRITE(MO,118) C ER DECLARATION FILE L(4)=3 LI5)=1 F«3)=C(A) IFCJCSENS.EO.DGO TO 1202 WRITE(I^Cil31) 131 F0RMATI20H ER DECLARATION FILE) JCCCRE(13)=6 1202 CALL JlCECL(LtJCSEhS,F,3) IF IJCSENS.LT.O) WRITE (MDf 118) C EQUATION DECLARATION FILE L(4)=5 L(5)=l F{3)=C(6) IFIJCSENS.EQ.DGO TO 1203 WRITE(MCfl32) 132 F0RHAT126H EQUATION DECLARATION FILE) JCC0RE(13)=6 1203 CALL J1DECL(L,JCSENS.F,A) IF(JCSENS.LT.0)HRITElHCtll8» C CONSTRAINT DECLARATION FILE LU)=»7
PAGE 206
194 L(5)«l F(3)=0(8» IFCJCSENS.EQ.DGO TO 1204 MRITE(MC»133) 133 FOR^'AT(^^H constraint declaration FILE) JCCCRE(l3)-6 1204 CALL JICECL=4 LC4)=1 F{2)=C(4) Ml=Ml*l F(3)=JCC0RE(M1)*1 IFCJCSENS.EC.DGQ TO 1207 WRITE(HC,136) 136 F0RMAT{13H ER NAME FILE) JCCCREa3) = 6 1207 CALL J1NAKE(L,JCSENS,F,4) IF(JCSENS.LT.0)WRITE(MD,118) ; VARIABLE NAME FILE L(3)=5 F{2)=D(2) IFtJCSENS.EQ.DGO TO 1208 HRITE(HC,137J 137 FORf^ATiigH VARIABLE NAME FILE) JCCCR£«13)=6 1208 CALL J1NAME1L,JCSE.NS.F,5) IF(JCSENS.LT.01WRITE(HD,118) : ER FILE L<1)=5 Lt3)=6 LC5)=l F(2)=C(4) F«3)=l JCCCRE(K8AJ=-l IFIJCSENS.EQ.DGO TO 13 HRITE{KC,138) 138 F0RKAT(8H ER FILE)
PAGE 207
195 JCCCRE(13)=6 13 IF((L(*».GT.F12I).AND.(JCSENS.LE.0»»G0 TO 14 CALL JlRAFE(L,2fjCSENSiF.3) IF(JCSENS.LT.0)HRITE(M0,H8) L(4)=iL(4)*l IF(L{4).GT.1)G0 TO 13 14 IFUCSENS.LT.0>HRITE(M0,118) EQUATION FILE L(3)=7 L(4J=l F(2)=C(6) IFUCSENS.EQ.liGO TO 15 WRITEJMC,139) 139 FOR^ATllAH ECUATION FILE) JCCCRE(13>=6 15 IF((H4).GT.F(2)).AND.(JCSENS.LE.0)>G0 TO 16 CALL JIRAFE{L,2,JCSENS,F,4) IF(JCSENS.LT.6lHRITE(MD,118) U«4)=L(4)+1 IFlL(4).GT.l)G0 TO 15 16 IF(JCSENS.LT,0)WRITE(M0,118) CONSTRAINT FILE L(3J=8 L(4)=l F(2)=C(8) IFtJCSENS.EQ.DGO TO 17 WRITE(HC,140) 140 FORMAT (16H CONSTRAINT FILE) JCCCRE«13)=6 17 IFl tLl4).GT.Ft2)).AND.(JCSENS.LE.0))G0 TO 18 CALL JlRAFE{L,2iJCSENStF,5) IF(JCSENS.LT.0)WRITE(MD,118) L(4)=LJ4)*1 IF(L(4).GT.1)G0 TO 17 18 IFtJCSENS.LT.O)HRITE(M0,lie) END OF UNIT L{1)=4 L14)=1 IF(JCSENS.LT.l)GO TO 9 IF(D(2).LE.0)CALL SYSERRUiU) IF((0(4)+D(6)+F(8)).LE.0)CALL SYSERR(2,U) GO TO 9 END OF SECEDE 19 IF«U.LE.1)CALL SYSERR<3,U) 20 IF(JCSEKS.EQ.11G0 TO 21 WRITE(KC,141) 141 FORMAT {14H.0 END OF SECEDE) JCCCREC13)=6 IF{JCSEKS.LT.O)WRITE(MO, 118) EXIT 21 CALL SYSEXT RETURN END
PAGE 208
196 C C«*«>«>* •...«o«. *• •««««•» • ..•»..».»»••••• C • VARIAO • c ••• »• c C PURPOSE C VARIAO HANDLES THE INPUT AND OUTPUT OF VARIABLE VALUES AND C NAMES WHEN INPUT OR OUTPUT OF THIS INFORMATION ONLY IS C DESIRED. C C USAGE C CALL VARlAO(JCLENT,JCHaDE,JCSENS,JCCLNOI C C DATA FORHAT C SEE TEAR AND DECISION VARIABLE FILE INPUT. IN SECIAO. .0 • C DESCRIPTION OF PARAMETERS C JCLENT = THE ADDRESS OF A GROUP. AN AUXILIARY LIST HEADCELL Q OR 0. IF C» THE SOURCE OR DESTINATION OF THE DATA C IS SECEDE. IF JGLENT IS THE ADDRESS OF A LIST C HEACCELL, THE VARIABLES WHOSE VALUES ARE TO BE C WRITTEN ARE SPECIFIED BY THE LIST ENTRIES, IF C . JCLENT IS THE ADDRESS OF A GROUPf THE DECISION AND C TEAR VARIABLE NAMES WILL BE WRITTEN. C JCMOCE = -2, -1, OR N, WHERE N IS A NON-NEGATIVE INTEGER. C IF JCKODc = -1, OUTPUT OF THE VARIABLE NAMES IN C THE DECISION AND TEAR VARIABLE FILES OR LISTS C (DEPENDING ON JCLENT) IS REQUESTED. WHEN JCHODE C IS NON-NEGATIVE THE OUTPUT OR INPUT WILL CONSIST C OF VARIABLE VALUES. THE SOURCE OR DESTINATION CF C THE VALUES IS INDICATED BY JCLENT. THE N IS THE C UNIT NUMBER WHEN JCLENT = 0. IF JCMOOE = -2 i C VARIABLE VALUES FOR EVERY UNIT WILL BE INPUT OR C OUTPUT. C JCSENS = SEE JIDIMS. JCSENS CAN NOT EQUAL -I. C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C THE AUXILIARY LIST. WHEN USED, MUST CONTAIN LIST ENTRIES OF C THE SAME SIZE AND PATTERN OF THE GENDER TEAR AND DECISION C VARIABLE LISTS. C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINESt C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C JCSENS MUST BE IF JCLENT IS POSITIVE OR JCMODE IS C NEGATIVE. C THE FOLLOWING TABLE SHOULD ASSIST IN EXPLAINING THE VARIAO C MOOES OF OPERATION. (A=AUXILIARY LIST HEADCELL, G=GROUP C AND N=NON-NEGATIVE INTEGER) C VARIAO CALL PARAMETERS C RESPCNSE/SOURCE SECEDE GENDER AUX. LIST C NAMESIOUTPUT) I0,-1,0,N) (G,-1,0,N) C VALUES(INPUT) 10. N,l,N) C VALUES(OUTPUT) (0, N,0,N) (A, 0,0, N) C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FRMCEL C JIRAFE C JIRESO C JIVALU C JlVARl
PAGE 209
197 c
PAGE 210
198 Ml=JCKQOE tC2)=Ml*4 M3=JCCCRE(l5)+l M2=JCCCREIH3) M3«^<3l H3=JCC0REJM3) 3 H4=l CALL FETCHlJCC0RE(H2»,LfH5fP,F,JCCCRE(M3),M4,l) 1F(N<».EC.-1>G0 TO 14 IF(JCSENS.GT.O)GO TO 4 M4=JCCCRE{ll» HRITE(H4,104)H1 104 F0RNAT(26H0VARIABLE VALUES FOR UNIT 15) 4 CALL JlVALUlLiJCSENS,F,l), 1F(H1.£<3.JCHQ0E>GQ TO 14 Hl=Ml*l GO TO 3 MODE 5 IF(JCMGCE.NE.-1)G0 TO 7 LIST Ml=JCCCRE(16)+l H2=JCCQRE(l7»+8 Ml=JCCCRE(Ml)+5»JCCaRE(M2»-5 DECISION AND TEAR VAR lABLE LI STS CALL FRMCELIJCCORE(MI),JCLENT,CfV,l) Hl^JCCOREdl) WRITE(M1,105) 105 F0RfATl23H0CEClSI0N VARIABLE LIST) M2=l 6 CALL JlVARIl0,0(H2)f2,0t0il) M2=>2*1 IF(I'2,NE.2)G0 TO 14 HRITE«M1,106) 106 F0RNATI19H0TEAR VARIABLE LIST) GO TO 6 AUXILIARY LIST 7 Ml=JCCCRE(16)+l H2=JCCORe(17)tlO Ml=JCCCRE(Hl)*5»JCC0REJM2)-5 M2=JCC0RE(M2) HS^JCCOREdT)*! Q(4)=JCCCRt(M3) MO=>JCCCRE(ll) HRITE«H0fl07) 107 FORr'ATH6H0VARIABL£ VALUES) M3=JCC0REtl5)+2 M4=JCCCRE(M3) M3=f3-1 M3=JCCCREIM3) M5=Kl+3 M5=JCCCRE(M5) H6=JCC0RE(16)+8 M6=JCC0RE(H6) «7«!JCLENT 8 CALL FRKCELtJCC0RE(H2),H7iC,A,2) IF(C(1).EC.0)G0 TO 10 H3 = f«7*M5 M9 = 4 9 CALL J7ICOM(MlfH8,0,OtOfM9i0(l)t0iMl0,l) 1F(M10.EC.-1)GO TO 13
PAGE 211
199 IF(^f9.EC.-4)G0 TO 11 10 M10'=012)/H2 L(2)=M10*4 L(l»=5-A/L(2l Mll=LCU Ll*)=l LGO TO 13 Mll=M3*D(l)-l WRITE(M0,109»(JCC0RE(I),I=M6,Hll) 109 F0Ri>
PAGE 212
200 c C«»«««<>«*«>*«»* •• ..»»« •••••••••••••••••••••• c •••••••••• C • JIARBS • c C PURPOSE C JIARBS SETS UP THE DIMENSIONED VARIABLE ADDRESS RESOLUTION C BLOCKS (DIVARB'S), PROVIDES SPACE ALLOCATION FOR VARIABLE C VALUE STORAGE AND ESTABLISHES THE ABSOLUTE LINKAGES BETWEEN C THE DECLARATION AND VALUE FILES. C e USAGE C CALL JlAR8S(JCLIST,JCFINEtJCCLN0) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C SEE JIRAFE C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C NEHCEL C STORE C SYSENT C SYSEXT C TOCELL C C ERROR COCES FOR THIS PROGRAM C CODE FATAL ERRORtOATA PROVIDED) C 1 NF COMMON VARIABLE WITHOUT LINKAGE (CODE NUMBER) C C METHOD C SELF-EXPLANATORY C C •••»»••»»• c SUBROUTINE JIARBS( JCLIST, JCFINE, JCCLNO) • COMMCN/ALLOC/JCCOREtl) DIMENSION JCLISTl6),JCFINE(3),L(7),C(6),0(3),W(4),P(4),R(5)fA{7) INTEGER C,0,W>P,R,A DATA L/5,0,l,l,l,l,0/,C/4,4,l,l,l,0/,W/l,l,l,l/,P/l,l,l,l/,R/l,l, I I, l,-l/,A/2, 17,1, 1,18,1,1/ C ENTER CALL SYSENTd, 5,1, A, JCCLNO) JCLIST(5)=1 C HA=AOCRESS OF SPUR Hl=JCC0RE<15)+l HA=JCC0RE(H1) C MB=ADCRESS OF LOAD Ml=Ml*l HB=JCCOREtMl) MC=MB*5 . MD=KB+4 ME=MB*26 MF»M8*20 M6=Ha»30
PAGE 213
201 M2=^'G^•28 JCC0RE(M2>3-1 C L W0=5-A/JCLIST(2) L(l)=MO LC2»=JCLIST(2) L(4)»l C MH=CONTROL PARAMETER MH=l-4/L(2) C W<4) H(A)=2+MH C MJ=NUHBER OF VARIAOLES MJ=JCFINE(2) C MK=AODRESS OF WORKING SPACE FOR INDICES Hl=Ml*l MK=JCCaRE(Ml) C DO LOOP 00 7 1=1, HJ C GET REtATIVE POINTER L
PAGE 214
202 H4=M1 1F«KI.LE.(M3/2))G0 TO 3 M'»=M3/2 + l H5=HA*5»M4*3 JCCCRE(M5)=MI SPUR FOR DIVARB 3 M5=MA+5«M4 GET OIVARS CALL NEWCEL(JCC0RE(M5),HN,l) STORE RANGES JCC0Re(MN»=R(4l M4=MN+l M5 = HK M6=R14) 00 4 J=1,M6 JCC0RE(M4)=JCC0RE(M5) M4=M4*1 4 M5=M5+l . STORE RECORD ADDRESSES M5=M4*l M6 = HN«-Ml-1 JCLIST(6)=D(2) DO 5 J=M5,M6 CALL STORE( JCCORE«MA),JCLlST(5»,0tR(5),JCFINEf JCC0RE(MB»,2) JCLIST(6)=M3/JCLIST«3) . 5 JCCCRE(J)=JCCORE(MC) STORE OFFSET JCC0RE ADDRESS LAST COMPONENT JCLIST<6)=(M2-(M6-M5>»M3+JCC0RE(H4))/JCFINE(3)-l CALL ST0RE(JCCORE(MA),JCLIST(5),D,R(5),JCFINE,JCC0RE(MB),3) STORE ADDRESS OF OIVARS 6 CALL T0CELL(JCCQRE{HAl,MM,MN,Pi2) 7 CONTINUE EXIT CALL SYSEXT RETURN END
PAGE 215
203 C C»***«**«>*««*«»«B«»
PAGE 216
204 C IN OR OUT MF«1 JCLIST(5)=1 JCLIST(6)=l V«4)=JCFINE(3» IFIJCSENS.LT.DGO TO 2 C INPUT 1 REA0«MC,101)MI,M2. VALUE 101 F0ftMAT(H,I19,0<»0.28) IF(Ml.EC.O)GO TO 3 C STORE VALUE CALL ST0RE(JCC0RE«HA),JCLIST(MF),VALUE,V,JCF1NE,JCC0RE(HB»,1) MF=5 GO TO 1 C OUTPUT 2 Ml=l CALL FETCH( JCC0RE(MA),JCLIST(MF),VALUE,V,JCFINE,JCC0Re(M8l ,Ml.l) MF=5 IF(Ml.EQ.-l)GO TO 3 C WRITE OUTPUT WRI TE(HC, 102 )JCCORE JCC0RE{13»=6 IF(JCSENS.LT.O)WRITE(HE,10I)M1,JCCORE(MBA), VALUE . C ITERATE IF(JCCORE(MBA».LT.JCCORE(MBB))GO TO 2 C EXIT 3 CALL SYSEXT RETURN END
PAGE 217
205 C C •.•••• a •• C C • JIDECL • C •• c C PURPOSE C JIDECL HANDLES THE INPUT AND OUTPUT OF VARIABLE, ER, C FUNCTION AND CONSTRAINT DECLARATIONS. c C USAGE C CALL JlDECLCJCLIST,JCSENS,JCFINE,JCCLNO) c C DATA FORMAT C SEE SECEDE C C DESCRIPTION OF PARAMETERS C SEE JIRAFE C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C JIOIMS C STORE C SYSENT C SYSEXT C ,J C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C c SUBROUTINE JIOECL ( JCL 1ST, JCSENS, JCFINE, JCCLNQ) COMMQN/ALLOC/JCCOREd) DIMENSION JCLISTtTJ.JCFINEJAJ.DCtJtm^j.PCS) INTEGER P,0,W DATA W/I,l,l,l/,P/l,l,l,l,-l/,D(l)/l/ C ENTER CALL SYSENT(l,5,l,6,JCCLN0J om=i JCLIST(6)=l C MA=ADDRESS OF SPUR Ml=JCC0RE(l5)*l MA=JCCORE«MU C MB=AOCRESS OF LOAD Ml=Ml*l MB=JCC0RE{M1) ' HH=KB»4 MC=«B*26 • M0=MB«-20 C " ME=INPUT DATA SET ME=JCC0RE«10) C MF AND MG ARE OUTPUT DATA SETS MFxJCCOREIlI) MG=IABS(JCSENS) C W
PAGE 218
206 Ml=4/JCLIST(l) M2=l/JCLIST(^) H«3) = l+fn + ( 1-M1)»M2 W«4)=W(3)+(l-Ml)»M2 M1=H(4)-W(3)*3 C IN OR CUT 1FIJCSENS.lt. DGO TO 2 C INPUT Hl=JCLIST(l)-2 M^=«^fl2 C READ DECLARATION 1 REAOCMEtlODJOCDf l=l,HI) 101 FORMATIU, 119, 2120) IF(D(1).E0.0) GO TO 5 C ACCESS RELATIVE POINTER CALL STCRE(JCC0RE(MA),JCLIST,D,P<5),JCFINE,JCC0RE(Ha),l) C STORE DATA M3=JCC0RE(MHJ JCC0RE{K3)=JCC0RE(MD)-JCC0RE,W,JCFINE,JCCORE(Ma),0,3) D(2)=JCLISTCMl) C WRITE DATA 1F(MI.EQ.^)G0 TO 4 WRlTE(MF,l02»(D(n,I = 2,3) 102 FORHATCiH A 2129) GO TO 5 4 WRITEjHF,l03)(0(n,I = 2,4) 103 F0RMAT(4H I 3129) 5 IF(JCS£NS.LT.0)WRITE(MG,101)(D( I),I=ltMn JCLISTt7)=W(4) JCC0RE(13)=6 IF(D(MI).GT.O)CALL JIDIMS( JCLISTJ 7 ) ,DI MI ) , 1,0, JCSENS,2) C INCREMENT JCLIST(M1)=JCLIST(MI)+1 IF(JCLIST(Ml).LE.JCFINE(M3))G0 TO 3 C EXIT 6 CALL SYSEXr RETURN END
PAGE 219
207 C c* ••..••«.«..» ••••« ••»»• .».«• c •• C • JIOIHS* c "•• c C PURPOSE C JIOIMS HANDLES THE INPUT AND OUTPUT OF INDICES. C C USAGE . C CALL J10IMS(JCP0FP,JC0IMS,JCM00E,JCTYPE,JCSENS,JCCLN0» C C DATA FORMAT C SEE SECEDE C C DESCRIPTION OF PARAMETERS C JCPOFP = THE NUMBER OF WORDS TO ADVANCE TO REACH THE FIRST C INDEX Oft THE ADDRESS OF THE FIRST INDEX (SEE MODE) C JCDIMS = THE DIMENSIONALITY C aCMODE = 1 OR 2 AS RESPECTIVELY THE INDEX STORAGE MEDIUM IS C SECEDE OR GENDER C JCTYPE = Of 1 OR 2 AS RESPECTIVELY THE INDICES ARE WHOLE C WORD, SINGLE SEVEN PART OR D0U9LE SEVEN PART C JCSENS = -N, OR 1 AS RESPECTIVELY PUNCHED (AND WRITTEN) C OUTPUT, WRITTEN ONLY OR INPUT IS DESIRED C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FRMCEL C STORE C SYSENT C • SYSEXT C TOCELL C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C C SUBROUTINE J IDIHSI JCPOFP, JCDIMS, JCMOOE .JCTYPE. JCSENS, JCCLNO) COMf'CN/ALLOC/JCCOREd) DIMENSION L(2),W(4).X(22), 0(7) INTEGER X.D.W ;. .^ DATA L(l)/l/»W/l,l,l,l/,X/7,9,l,l,lO,l,l,ll,l.I,12,l.ltl3,l,l,l4, 1 l,1^15,l,l/ C ENTER CALL SYSENTd, 5, 1,7, JCCLNO) C MA=ADORESS OF SPUR M1=JCCCRE(15)+1 MA=JCCOREIMl) C MB=AOCRESS OF LOAD Ml=Kl+l HB=JCCORE(Hl) LC2)=JCP0FP
PAGE 220
208 HC=INPUT DATA SET MC=JCC0RE(10) MO ANC ME ARE OUTPUT DATA SETS MD=JCCORE(ll) ME=IABS(JCSENS) TYPE OF INDEX IF(JCTYPE.GT.OIGO TO A WHOLE WORD Hl=JCOIHS 1 M2»'» IF(Ml.LT.4)H2»Ml Ml=«l-M2 U(4)=H2 IF(JCSENS.LT.l)GO TO 2 INPUT REA0(MC,10l)«D( !M»1,M2) 101 F0RMAT{4I20» CALL STORE(JCCORE(HA)fLiOfW,L,JCCORE(MB)tl) GO TO 3 OUTPUT 2 CALL FETCH{ JCCORE{MA),L,D,W,Lf JCCORE(HB)fO,U IF{jCSENS.LT.0)WRITE
PAGE 221
209 C c •.«••••«»• C • JIFILE • c C PURPOSE C JIFILE ENTERS THE OCCURRENCE OF A LIST ENTRY ONTO THE C TEMPORARY FILE. C C USAGE ,,, , C CALL J1FILE{JCSPUR,JCLIST,JCSPRG,JCP0FP,JCP0SP,JCSENS, C JCFINE.jCLOAOf JCCLNOI C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPUR = THE SPUR FOR THE FILE C JCUST = THE LISTER VECTOR C JCSPRG = THE ADDRESS OF A GENDER LIST SPUR C JCPOFP = THE ADDRESS OF THE LIST ENTRY C JCPDSP = THE ADDRESS OF THE LIST ENTRY LAST WORD C JCSENS = SEE JIOIKS C JCFINE = THE FINE VECTOR C JCLOAO = THE LOAD VECTOR C JCCLNO = A USER ASSIGNED CALL STATEMENT 10. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCTA MUST. FOR SOME MACHINESt C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C NEWCEL C STORE C SYSENT C SYSEXT C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C Q •••«••••»• C SUBROUTINE JIFILEJ JCSPUR, JCLlST,jCSPRG.JCpOFP,JCPOSP. JCSENS. 1 JCFINE. JCLOAD.JCCLNOJ COKKON/ALLOC/JCCORE( 1) DIMENSION JCSPUR(5),JCLIST(3I,JCFINE(2J,JCLOAO(30),0(2)»F«4) INTEGER D,F DATA D(2)/0/»F/l.l.l,2/ C ENTER CALL SYSENT(l,5.l,8,JCCLNO) C GET LIST ENTRY IFIJCSENS.GT.OCALL NEWCEL I JCCORE( JCSPRG) , JCPOFP, 1 ) Ml=JCSPRG+3 JCPCSP=JCCORE(Ml)+JCPOFP-l C ENTER ON FILE D(l)=JCPOFP CALL STOREl JCSPUR, JCL 1ST, O.F, JCFINE, JCLOAD.l J C EXIT CALL SYSEXT
PAGE 222
210 RETURN END
PAGE 223
211 C c •••• C • JIGMBL • C •••• c C PURPOSE C JIGMBL SETS UP THE GIHBL. C C USAGE C CALL J1GM8L(JCGIMB,JCSPBL,JCMAXB,JCCLN0) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCGIM6 = THE ADDRESS OF THE GIM8L C JCSP8L = THE ADDRESS OF THE SPUR BLOCK C JCMAXB = THE MAXIMUM CORE BLOCK SERVICIBLE WITH THE SPUR C BLOCK C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C . „ C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C NEWCEL C SYSENT C SYSEXT C C ERROR COOES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C c ••««•»•••• c SUBROUTINE JIGMBL (JCGIMB.JCSPBL, JCMAXB, JCCLNO) COMf'ON/ALLOC/JCCOREd) DIMENSION S(5J INTEGER S DATA S/0,0,l,0,2/ C ENTER CALL SYSENTd, 5, 1,9, JCCLNO) c s S(I)=0 S(2)=0 Ml = JCCCRE(l7)+-8 M2=JCCORE(Hl)+2 M1=M1+1 H3=JCC0RE(M1) Ml=Ml*5 M3=M3+JCC0REIM1)»2 * IF(M3.GT.M2)M2=M3 IF(M2.LT.10)M2=10 JCMAXB=M2 S(*)=»5»M2*5 . C SPUR BLOCK CALL NEWCELCS,M2,l) Ml=S(4)/5 JCSPBL=M2*5
PAGE 224
212 DO 1 I=1»H1 00 1 J=l,5 JCC0RE(H2) = S(J) + (J/A)»J'V/J)*C1-S14)-1) 1 H2=K2*l GIM8L Ml=JCSPBLM5 CALL NEWCEL(JCC0RE(M1),JCGIMB,2) JCC0RE(16)=JCGIMB MI=JCGIK3 DO 2 1=1,10 JCC0R6(Ml)=(I/2)»«2/I)»JCSPBL 2 Ml=f
PAGE 225
213 C c »••••«•« • •».».»•.. »••« c •• C JILEOL • C »....»»«•» c C PURPOSE C JILEOL HANDLES THE INPUT AND OUTPUT OF LINK EDITOR LISTS. C C USAGE C CALL JlLEDL(JCSPUR,JCFIRSf JCMTHO.JCSENS.JCERFC.JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPUR = THE SPUR FOR THE TEMPORARY LISTS C JCFIRS = THE ADDRESS OF THE FIRST LIST ENTRY C JCMTHD = THE METHOD TEMPORARY LIST C JCSENS = SEE JIOIMS. JCSENS MAY = +M, WHERE H IS AN ER. C EQUATION OR CONSTRAINT CODE NAME, WITH THE DATA C SOURCE BEING SECEDE. C JCERFC = THE GROUP BODY IDENTIFICATION FLAG C JCCLNO a A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FRMCEL C FSTLNK C JIOIHS C J7C0MV C LNK6HD C NEWCEL C PUSH C STORE C SYSENT C SYSERR C SYSEXT C TOCELL C C ERROR COOES FOR THIS PROGRAM C CODE FATAL ERRORtOATA PROVIDED) C I NF ILLEGAL ENTRY ON LINK EDITOR LIST (ID. FLAG) C C METHOD C SELF-EXPLANATORY C . c •••«.«.».• c SUBROUTINE JlLEOLi JCSPUR, JCFIRS, JCMTHD, JCSENS, JCERFC, JCCLNO) COH^ON/ALLOC/JCCOREd) DOUBLE PRECISION VALUE DIMENSION JCSPURJ5),0ia),Ell6),TI7),P«5),L(9),Ca7),XI4),Vt4) INTEGER D,£,T,P,C,X,V . DATA D(l)/0/,E/5,l,l,li2,l.l,3,l,lf2l,l»l,22,l,l/,T/2,21,l, 1 l,22,I,l/fP/l.l,l,l»-l/,C/2,l,l,l,5,l,l,2,8,l,l,19,l,l,15,l,l/, 2 L/0,0,0,0,0,I,1,1,0/,V/1,23,1,1/ C ENTER
PAGE 226
214 CALL SYSENTClf5il,10,JCCLN0) C M4»VARIABLE SIZE WITHOUT INDICES (LINK ED.) Ml=JCCaRE
PAGE 227
215 ACCESS CONSTITUENT 3 CALL FETCH( jCCORe(MG)fL(6),0(2)tC,LtJCCOREiMH),0i2» Hl=C(2) H3"=2 TYPE 4 H2=0(3)»l GOTO (5r6,8,6,9,82,20,20)tH2 OPERATOR 5 IFCJCSENS.GT.UCALL FETCHC JCCORE(HG) ,H 8) ,0(A) ,C (14) ,L, JCCORE CHH) , 1 , 3 » 0(2)-0(4) *D14)=0(5) D(5)=0 M2=WC LC7)=ME8 E«l)=4 GO TO 10 VARIABLE 6 IF(JCSENS.EQ.l)GO TO 61 CALL FETCH{JCCORE
PAGE 228
216 0(2J=«0 GO TO 10 83 READ(HJ,1010)VALU6 lOlO fORHAT(e40.2aj CALL T0CELLtJCC0RE C TEST FLAG M2=D(3)*1 H3=3 GO TO (15,16^17,16,18,171,20,20),M2 C OPERATOR 15 0(5)*D(4) D(4)=012) M2a4 GO TO 19 VARIABLE 16 M2=»5 GO TO 19
PAGE 229
217 : CONSTANT 17 M2»4 D«5)=0 GO TO 19 : LOCAL CONSTANT 171 0(2»=l CALL FRMCELlJCC0RE(ML)tME.VALUefVt3) WRITE(MF,1020.>VALUE 1C20 FORMAT H5H LOCAL CONSTANT, £40.28) JCCCRE(13»=6 IFCJCSENS.GE.OGO TO 14 HRITE(MG, 101)0(2), C(3I HRITE(MG,1010)VALUE GO TO 14 ; VALUE OF ER, FUNCTION OR CONSTRAINT 18 M2=5 ; WRITE DATA 19 0(2)=1 WRITE(MF,102)(0«I),I=3,M2) 102 FORMAT (4H £ 4129) IF(JCSENS.LT.O)WRITE(MG,101)iO(I),I='2,H2) JCCCRE(13)=6 IF(D(3).EQ.0)G0 TO 14 IF(0(5).GT.0)CALL JIDIHS ( M1,D( 5) , 2, 1, JCSENS,2) GO TO 14 ; ERROR 20 CALL SYSERR(1,(M2-1J) GO TO (1,2,14),H3 ; EXIT 21 CALL SYSEXT RETURN END
PAGE 230
218 c . C«>«»*o><.« C • JINAME » c •••• c C PURPOSE C JINAHE HANDLES THE INPUT AND OUTPUT OF NAHE FILES. C C USAGE C CALL JlKAME(JCLIST,JCSENStJCFIHEtJCCLNO) C C DATA FORMAT C SEE SECEDE C C DESCRIPTION OF PARAMETERS C SEE JIRAFE C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST BE SUPPLIED IN THE C COMMON STATEMENT FOR SOME MACHINES. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C STORE C SYSENT C SYSEXT C C ERROR CODES FOR THIS SUBPROGRAM C NONE C C METHOD C SELF-EXPLANATORY C C ••••••«••• c SUBROUTINE JINAME( JCLIST, JCSENSt JCFINEt JCCLNO) COMf CN/ALLOC/JCCORE( 1 1 OIMENSICN JCLIST(6>tJCFINE(3)fNlA),D{5) INTEGER DATA N/l,l,l,l/fD(l)/l/ C ENTER CALL SYSENT(l,5,lillfJCCLN0) JCLIST(5)=l JCLIST(6)=l MI=JCLISTC1)-1 N14)=JCFINEIM1) C MA=ADCRESS OF SPUR Ml=«JCCCREJ15) + l MA=JCCCRE(Mn C MB=ACCRESS OF LOAD Ml^MlH HB=JCCCRE(Ml) C HC=INPUT DATA SET MC^JCCOREdO) C MO AND ME ARE OUTPUT DATA SETS HD = JCCCRE(n) ME=IABS(JCSENS« C IN OR OUT MG»N(4»-l MH=MG*2
PAGE 231
219 MF=1 1F(JCSENS.LT.I)G0 TO 5 INPUT 1 GO TO (2,3),MG 2 REAC(MC,101)tOt I),I=li4) 101 FCRfAT(Il,n9,I14,A6) GO TO A 3 REA0(MCil02l«0( I), 1 = 1,5) 102 F0Rr'AT(Il,U9,n4,A4,A2l 4 IFIC11).EQ.0)G0 TO 8 D(3)=D(2) CALL STCRE(JCC0RE(MA),JCLIST(MF),0C3),N,JCFINE,JCC0RE{HB),1) MF=5 GO TO 1 OUTPUT 5 Ml«l . CALL FETCH(JCC0RE(MA),JCLISTlMF),0(2),N,JCFlNE,jCC0Re
PAGE 232
,220 C €••• .....««...«.•..« .....••>• •»» Q «• •••0B»»» C • JIRAFE c c PURPcse C JIRAFE HANDLES THE INPUT ANO OUTPUT. OF FILE ENTRIES C CONTAINING RELATIVE POINTERS. C C USAGE C CALL JlRAFE(JCLIST,JCMODE,JCSENStJCFINE,JCCLNO) C C CATA FORHAT C SEE SECEDE C C DESCRIPTION OF PARAMETERS C JCLIST = THE LISTER VECTOR C JCHOOE = I IF THE FILE IS THE TEAR OR DECISION VARIABLE C FILE, 2 IF THE FILE IS A FUNCTION, ER OR C CONSTRAINT FILE, OR 3 IF THE ENTRIES ARE INCIDENCE C FILE ENTRIES C JCSENS = SEE JIDIMS C JCFINE = THE FINE VECTOR C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST BE SUPPLIED IN THE C COMMON STATEMENT FOR SOME MACHINES. C C SUBROUTINE ANO FUNCTIOIJ SUBPROGRAMS REQUIRED C FETCH C JIOIMS C STORE C SYSENT C SYSEXT C C ERROR CODES FOR THIS SUBPROGRAM C NONE C C f.ETHCD C SELF-EXPLANATORY. C C SUBROUTINE JIRAFEI JCLIST, JCMOOE, JCSENS, JCFINE, JCCLNO) C0^'^'CN/ALL0C/JCC0RE(1) DIt'ENSICN JCLIST « 7), C( 4), 0(29), 0(5), JCFINE (4) INTEGER C,0,D DATA C/ 1, 1, 1, 3/, 0/3, 1,1, 1,16, I, 1, 5, 1,1, 16, 2, 2, 5, 1,1, 1, 8, 1, 1, 5, 1,X. 1 7,1,1,19,1,1/ C ENTER CALL SYSENTd, 5, 1,12, JCCLNO) C(l)=l JCLIST{6)=1 C MA=ADCRESS OF SPUR >'l = JCCCRE(15)*l MA=JCCOREtMl) C H8=ADCRESS OF LOAD MI=»Hl + l MB=JCCCREIMI) HG=f
PAGE 233
.221 MC=INPUT DATA SET MC=JCCCRE(10) MO ANC ME ARE OUTPUT DATA SETS MO=JCCCRE(ll) ME=IABS(JCSENS) MODE HF=l IF(JC^'0CE.GT.2)G0 TO 5 IN OR OUT 1F(JCSENS.LT.1»G0 TO 3 INPUT 1 IF(JCLIST(l).EQ.5)G0 TO H REA0{KC,101)(0( I)»I=1>3) 101 FCRNATCIl, 119, 2120) GO TO 12 11 REAC(MC.101)C(l).M2,(0(n, Is2,3) 12 IFtCdJ.GT.OGO TO 2 IF(JCKCCE.GT.1)JCLIST(4)=0 IF(^F.EC.l)GO TO 10 GO TO 9 2 0(1)=3»2»D(3) CALL STCRE( JCC0RE(HA),JCLIST{HF),0,C,JCFlN6tJCC0RE(MB),l) JCLISTI7)=3 M1=JCCCRE(MG) IF(C(3).6T.0)CALL J1DIMS( JCLISTI 7) ,0( 3 ) ,l,2t li 1 ) MF=6 GO TO (1,5),JCM0DE OUTPUT 3 Ml=l CALL FETCH( JCCORE(MA),JCLIST(MF),D,C,JCFINEtJCCORE(MB),Ml,l) IF(C,1.6E.0»60 TO 31 IF(JCH0CE.GT.1)JCLIST(4)=JCFINE(2) GO TO 10 31 M3=C{1) 0(1)=1 IFUCLIST<1).EQ.5)G0 TO 4 WRITe(NC,102)(0(n,I=2,3) 102 FORNAT(AH A 2129) IFtJC5ENS.LT.0)WRITE«ME,10n(D(I),I = l,3) GO TO 41 4 WRIT£(MC»103)JCLIST(4),|D( I),I=2,3) 103 FCRf,(DtI),I=2,3) 41 JCLIST(7)=3 JCCCREJ13)=6 IF{C(3).GT.0)CALL J1DIMS( JCLISTC 7) ,0( 3) , li2, JCSENS,2) IF(r^3.EC.0)G0 TO 10 GO TO (3,5),JCM00E IN OR OUT 5 ff2=JCC0RE(17)+4 MH=JCC0RE(H2) H2=H2-1 HI=JCCaRE(M2)-MH IF(JC$EKS.LT.1)G0 TO 8 INPUT 6 REA0(MC.10A)(0(n.I=l,5) 104 FORHATdl, 119, 11,119,120) IFtC(l).GT.0)GO TO 7 IFJNF.EC.DGO TO 10 GO TO 9 7 H2=l
PAGE 234
222 IF«C(3).EQ.1)M2=14 0(l)=3 IFJC(3}.EQ.03O(l)=4 0U)=MH + lM2/l'»)»tMI*2»D»5) )+0(l)-3 CALL STCRE(JCC0RE(HA),JCLIST(HF),0,0(M2),JCFINE,JCC0RE(M8),2) JCLlST(7)=MH*JH2/14)»Ml+0( l)-3 M1=JCC0RE(MG) IF,lfltlt3) MF=6 GO TO 6 OUTPUT 8 Ml»l CALL FETCHlJCC0RECHA),JCLIST(MFJ,D,0fJCFINE,JCC0RElMB)tMl,2J IF(H1.EC.-1)G0 TO 10 KF = 6 D(l>«l M2=l IF(C13).EQ.1)M2=U 0(l)=3 lF(C(3).EC.0)d(l)=»4 JCLIST17)=0 IF(K2.EC.1^)CALL FETCH( JCCCREC HA J , JCLI ST(6) tO,0! 14) , JCFINE, 1 JCCCRE<«B),0,3) H3=3*2»(«2/1A) HRITEJHC,105)(0{n,I=2fH3) 105 FCRKATCAH L 129, 1 14i 2 129) JCCCRE(13)=6 IF
PAGE 235
223 €••• • »••* •• ..««•.» •».! C •••• C • JIRESO • C ••••a»»««« C PURPOSE C JIRESO PERFORMS VARIABLE VALUE ADDRESS RSOLUTION C C USAGE C JlRESO(JCARBL»JCINOC,JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCARBL » THE ADDRESS OF A DIVARB C JCINDC = THE ADDRESS OF AN INDEX SET C JCCLNO = A USER ASSIGNED CALL STATEMENT 10. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C NONE C C ERROR COOES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY c , c •»•>•••«•• c FUNCTION JIRESOIJCARBL, JCINDC, JCCLNO) COMMON/ALLOC/JCCOREI I) C ENTER CALL SYSENTdfS, 1,13, JCCLNO) C MA=DIMENSIONALITY-l MA=JCCORE( JCARBL )-l C COMPONENT M1=JCARBL*MA M2=JCINCC*MA-1 H3=M2H H3=JCC0RE(M3) IFCKA.LE.OGO TO 2 00 1 1=1, MA M3=M3*JCC0REJM1)»(JCC0RE(M2)-I) Ml=Ml-l 1 M2=)^2-l C MA=A0CRESS OF OFFSET 2 MA=MA+2»JCAR8L C MB=WORDS PER VALUE Hl=jCC0RE(17)tl HB=JCC0RE(Mn C WORD M1=JCC0RE(MA)*MB»(M3-1) C SEGMENT . M2='JCC0RE(17) M3=Ml/H2 H4=HA+M3»1 M4=>JCC0REIM4)
PAGE 236
224 JIRESO J1RES0=M4*MI-M3«M2 EXIT CALL SYSEXT RETURN END
PAGE 237
225 C c««»>*«* ••• • •• ••••»• •• c •••»» C JIVALU » c C PURPOSE C JIVALU HANDLES THE INPUT AND OUTPUT OF VARIABLE VALUE FILES C C USAGE C CALL JlVALU(JCLIST,JCSENSiJCFIN£tJCCLNO) c C DATA FORMAT C SEE SECEDE C C DESCRIPTION OF PARAMETERS C SEE JIRAFE C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FRHCEL C JIARBS • C JIRESO C STORE C SYSENT C SYSERR C SYSEXT C TOCELL C C ERROR COOES FOR THIS PROGRAM C CODE FATAL ERRORtOATA PROVIDED) C IF VARIABLE NOT DECLARED (VARIABLE CODE NAME) C 2 F DIMENSIONALITY MISMATCH (VARIABLE CODE NAME) C C METHOD C SELF-EXPLANATORY C c •..«•••»•• c SUCRQUTINE J1VALU( JCLIST, JCSENS, JCF INE. JCCLNO) COMMON/ ALLOC/JCCORe( I) DIMENSION JCLIST (6), JCF INE (3), 0(6), V( 4), A( 4), L( 7), P (4), R 14) INTEGER C,V,A,P,R DATA L/0,0,l,l,l.ltO/,V/l,l,l,l/,A/l,l,l,3/,P/l,l,l,l/,R/l.lflfl/ DOUBLE PRECISION VALUE C ENTER CALL SYSENTd, 5, 1,14, JCCLNO) C MA=ADCRESS OF SPUR M1=JCC0RE(15)+1 HA=JCC0RE(Ml) C MB^^AOCRESS OF LOAD Hl=Hi+l MB*JCCORE(Ml) C MC«=AOCRESS OF INDEX STORAGE Ml=Ml*l MC=»JCCORE(Ml) C L L(l)=5-4/JCLlST(2) L(2)=JCLIST{2)
PAGE 238
226 L(5J=l C HD»INPUT DATA SET M0=JCC0RE(10) C ME AND HF ARE OUTPUT DATA SETS ME^JCCOREdl) HF=IABS(JCSENS) C V(4) V(4)=JCFINEt3) Ml=H8»21 M2=KB*22 M3=JCCQRE{Ml)*JCC0RE(M2)*l M^=(M3/2J»2 IF(((V(4»-l)»(H3-M4)»JCSENS).GT.0)JCC0R£(MU=JCCORE(Hl)*l M2=MS»28 JCC0RE(H2)=— I C R(41 R(4)=«L(l)-2 MG=>R(4»*3 C IN OR OUT 0(l)=l IFIJCSENS.lt. DGO TO 3 C INPUT CALL JlARBSCJCLIST.JCFINEfl) C READ 1 READtM0,10l)(Dt I). I = 1.3),VALUE • 101 FORHATJI1,I19,I20,C40.28) IF(Dtl).EQ.0)GO TO 10 C INDICES 1F«D(3).EQ.0)G0 TO 2 MI=KC+D13)-1 READ(MD,l02l(JCC0RE(I)tI=MCfHlJ 102 F0RHAT(4I20» C DECLARATION 2 Hl=L(l> L«H1)=0(2) CALL FETCHl JCCORE « MA ) , L , L I 7 ) , P ,L , JCCORE ( MB ) ,0, 1 ) IF(H7).LE.0)CALL SYSERR(1,0« 2 J ) CALL FETCH( JCCORE (HA), L( 6), D('t),R,L, JCCORE 1MB >, 0,2) IF(0(3).NE.D(HG))CALL SVSERR(-2.D( 2) ) C DIMENSIONED IF(D(3).GT.0)D('t) = JlRES01D{A),Meil) C STORE VALUE CALL TOCELL ( JCCORE ( MA ),D( 4), VALUE, V,l) GO TO 1 C OUTPUT C ACCESS DECLARATION 3 Ml»l CALL FETCH( JCC0RE(MA),L,L(7),P,L,JCC0RE(MB),M1,3) IF(M1.EQ.-1>G0 TO 10 IFJL(7).LE.0)GO TO 9 CALL FETCH( JCC0RE(MA),Lt6),D(<»)tR,L,JCC0REIHB),0,4) C D<2) AND 0(3) Ml=L(l) 0(2)=L(H1) 0(3)=D(MG) C DIMENSIONED M1=0 IF(C(3).EQ.0)G0 TO 6 M2=MC*0(3)-l C SET INDICES TO 1 00 4 I=MC,M2
PAGE 239
227. 4 JCC0RE(I)'=1 C ADDRESS OF VALUE 5 0(4)=JlRESO(HltHC,2) C VALUE 6 CALL FRMCELCJCCOREtMAj.DCVlrDlSJtV.l) M3=V(4)t4 IF((O<5)*D(M3)).EQ.0)GO TO 7 CALL FRHCELEC.0)G0 TO 8 JCC0RE(M3)=JCC0RE(M3)*l M6=0 IFIJCC0RE(M3).LE.JCC0RE{H4))G0 TO 8 M6=l JCC0REtM3)=l M3=H3-1 M4=K4-l 8 CONTINUE C ITERATE IF(M6.E0.0)GO to 5 C INCREMENT L(L(l)) 9 MI=L{1) L{H1)=L(M1)*I 1F(L(M1).LE.JCFINE(2))G0 TO 3 C EXIT 10 CALL SYSEXT RETURN END
PAGE 240
228 C C»« ••.••••..•..B«.a»».«.« •»•• Q ••«»•»••>• C • JIVARI » C C PURPOSE . „ C JIVARI HANDLES THE INPUT AND OUTPUT FOR VARIABLE LISTS. C C USAGE C CALL JlVARICJCSPURf JCFIRS,JCHOOEtJCMTHD,JCSENS,JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPUR = THE SPUR FOR TEMPORARY LIST C JCFIRS =' THE ADDRESS OF THE FIRST LIST ENTRY C JCMOOE = 1 FOR AN OUTPUT LIST AND 2 OTHERWISE C JCMTHO = THE METHOD TEMPORARY LIST C JCSENS = SEE JIDIMS C JCCLNO » A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FRMCEL C FSTLNK C JIOIHS C NEWCEL C SYSENT C SYSEXT C TOCELL C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C SUBROUTINE JIVARH JCSPUR, JCFIRS, JCHOOE.JCKTHD, JCSENS, JCCLNO) COMMON/ ALLOC/JCCOREC I) DIMENSION V113),D(4),JCSPUR»5),L(5J,PC4) INTEGER V,D,P . DATA V/4,l,t,l,2l,l,I,2,l,l,3,l,l/,0(l)/0/.P/l.l,l,l/,MH/0/ CENTER CALL SYSENTU,5,l,15,JCCLN0» C MA=SIZE WITHOUT INDICES Hl=JCC0REI17)tl0 MA=JCC0RE(M1I C MB = ADDRES"S OF SPUR Ml«JCC0RE(16)tl MB=JCC0REtMU + 5»(HA-l» c in or out if(jcsens."lt.i)go to 3 C INPUT C MC^TEMPORARY STORAGE HC='0 C MO»INPUT DATA SET H0=*JCC0RE«10)
PAGE 241
229 C ME-AOORESS OF SPUR Ml=«JCC0RE(l5)*l ME=JCC0REIM11 C MF»AOCRESS OF LOAD MF=JCCORE(HlJ C HG=SCALE FOR UNIT NUMDER Ml='JCCQRE{17)+6 MG=JCCORE(Ml) C READ 1 READ(M0,101)Ml,(DU)f 1 = 2,4) 101 FORMAKHf 119,2120) IF(m.EQ.0)GO TO 5 C GET LIST ENTRY Ml=HB*5»D»3)»JCM00E CALL NEHCELIJCC0RE(M1),H2,1) C LINK IF(JCFIRS.EQ.0)JCF!RS=M2 IF(HC.GT.O)CALL FSTLNK( jCCORE(Hl) tHCiM2,l) MC=M2 C STORE DATA CALL T0CELL(JCCaRE(Ml),M2,D,V,l) 1F{0(3).EQ.O)GO TO 2 Ml=H2+HA CALL JXDlMS(MlfD(3),2,JCM00E,l,l) C TEMPORARY LIST 2 IF(D(<^).ME.2)G0 TO I L<2)=D(2)/HG L(3)=l L(<») = 1 Ml=5-l/(L(2)+l) L«I)=M1 L(HI)=D(2)-MG»L(2) L(2)=LI2)+'> CALL F£TCH(JCCORE(ME),L,Ml,P,L,JCCORE{HF),0,l) CALL PUSH(jCSPURiJCMTHDfMl.V(4),l.l) IF(MH.EQ.O)HH=JCMTHD GO TO I C OUTPUT C MC=CURRENT LIST ENTRY 3 MC=JCFIRS C MO AND ME ARE OUTPUT DATA SETS HD=>JCCaRE(ll) HE=IA3S(JCSENS) C GET DATA 4 IF(MC.LE,1) GO TO 6 CALL FRMCeL(JCCORE(Ha),HC,P,V,l) C WRITE DATA M1=MC*HA HC=Otl) D(I)=1 WRITE(MD,102)(0CALL J IDIMS(M1,D( 3 ) » 2, JCMODEi JCSENS,2) GO TO 4 C UPDATE JCMTHO . 5 JCMTHD=HH C EXIT 6 CALL SYSEXT RETURN
PAGE 242
230 ENO
PAGE 243
231 C ...,„.. C »••• ..«»»•••# • ii»..«.o •••• C • ALPAC • C • GENERAL • Q » INFOKMATION • C • c C SPECIAL INSTRUCTIONS/DEBUG .^ C THE FOLLOWING TAOLE GIVES THE PACKAGE AND PROGRAM ID. C NUMBERS FOR ALPAC. ALL ARE ON LEVEL 4. C PROGRAM PKG. IF. /PROG. ID. C HASSAL l/l C J2ACYC 1/2 C J2AQSA 1/3 C J2CNZS 1/4 C J2G0PT 1/5 C J2MARK 1/6 C J2MINC 1/7 C J2N0FZ 1/8 C J2PATH 1/9 C J2SHIT I/IO C J2T0SA l/ll C SPEDUP 2/1 C J2F0UR 2/2 C J2GRUP 2/3 C J2PREC 2/4 C J2R0WP 2/5 C J2TACV 2/6 C BEMAON 3/1 C J2CP0T 3/2 C J2ELEM 3/3 C J2RECU 3/4 C J2SPRe 3/5 C J2T0WY 3/6 C C CURRENT STATUS C OPERATIONAL ADDITIONAL ROUTINES TO BE PROVIDED. C .•«,,•..».». c
PAGE 244
232 C €•••• • • • • •...•...•••••• C C • HASSAL • c c C PURPOSE C HASSAL PERFORMS THE WEIGHTED HUNGARIAN ASSIGNMENT ALGORITHM c • C USAGE C CALL HASSAL(JCGRUPiJC0FLT,JCCLNO) C C CATA FORKAT C N/A C C OESCBIPTICN OF PARAMETERS C JCGRUP = THE ACDRESS OF A GENDER GROUP. IF JCGRUP IS 0, C CUCGEL WILL BE USED TO GENERATE A CROUP. C JCOFLT = IF CALL BY OFAULT AND OTHERWISE C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C CUDGEL C CFAULT C FETCH C FIND C J2ACYC C J2A0SA C J2CNZS C J2HARK C J2MINC C J2N0FZ C J2PATH C J2SWIT C J2T0SA C J7CSUP C SINCIN C SIMGEN C SIMOPT C STORE C SYSENT C SYSERR C SYSEXT C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERROR{DATA PROVIDED) C I NF IMPOSSIBLE TO MAKE COMPLETE ASSIGNMENT (ADDRESS C OF SIM8L) C C f-ETHOO C HASSAL AUTOMATICALLY PROVIDES A GENDER LIST AND/OR AN SIM C IF NECESSARY. C c ••««• c SUBROUTINE HASSAL( JCGRUP, JCDFLT,JCCLN0» COf^CN/ALLOC/JCCOREU) DIMENSION G(A),0(10),C(4),C(4),P(7),N(4),F(A),L(2)
PAGE 245
233 INTEGER G.O.CfOtPtF DATA G/l,8,l,l/,0/3f 12,1,1,13, If It 5, 1,17, C/l, 6 a, l/tO/O, 0,0,0/ 1 I P/2,5,l,l,6,l,l/,N/l,10,l,l/,F/l,5,l,l/,L/l,0/ C ENTER CALL SYSENT«l,A.l,l,JCCLNOJ C ACCESS GROUP AND SIM KA=JCCFLT IF(JCDFLT.eQ.O)CALL DFAULT J JCGR'JP,HA,2, 1 ) C MB=ACCRESS OF SPUR FOR ORDINATE il=HA*2 MB=JCCQREtMl)-5 C MC-ADDRESS OF SPUR FOR ELEMENT MC^KB-5 C MO=ADCRESS OF LOAD FOR ROW MAIN MO='J70SUP(MA,l,0,0,l) C HE=»ADCRESS OF L0AD(8) FOR ROW MAIN ME=fD*7 C HH=ADCRESS OF LOAD FOR COLUMN MAIN MH=J70SUP(MA,1,1,0,3) C MISADDRESS OF L0AD(8) FOR COLUMN MAIN Mis MH^7 C ZERO THE OUTPUT ASSIGNMENT H2) = l-JCC0REtME» 1 Ml = l CALL FETCH! JCC0RE'0PT(MA,JCCCREIHEI,C(2),-I,l) C ITERATE IF(C(1).EO.O)GO TO 1 Kl=JCCCREiMl) .' IFCKl.GT.OJGO TO 2 GO TO I C DUPLICATE MAINS 4 CALL SIMCUPCMA, 1,3,0, 1» CALL SIl'CUPtMA, 1,3,1,2) C SUBTRACTION STEP MI=0 Al M2=f«0 M3=KE M0=0 5 L«2)=1-JCC0RE{M3) . M4=JCC0RE(H4) DO 8 1=1, M4 CALL FETCh«JCC0RE(KB),L,D,P,L,JCC0RE(M2),0,2) IF(C(1).EC.O)GO TO 6 0(l)-0 GO TO 7 6 M5*0 IF(Ml.NE.2)M5=>J2MIKC(MC,D(2),M0,l)
PAGE 246
234 0(11=J2NCFZ{HC,0(21,M5,MO,1» 7 L{2»=0 CALL STGREI JCC0RE(na),LtD,NtLtJCC0RE(M2),l) 8 L(2)-l GO TO (81.41r'})tHl 81 M2=MH H3=fl M0=1 GO TO 5 C ACYCLIC ASSIGNMENT 9 CALL J2ACYC(MA,2tl) C TEST FOR COMPLETE OUTPUT ASSIGNMENT 10 L(2)=l-aCC0Re(MEJ H2=l CALL FIND(JCC0RE(Me),LiD(3),F,L,JCC0RE(MD),Hl,l) IFIMI.EC.OGO TO 16 GO TO (11.12)iH2 C ARBITRARY ASSIGNMENT 11 CALL J2ACSA{MA,H1,1) M2=2 IFtKl.EC.OGO TO 10 CALL J2ACYC(MA,1,2> GO TO 11 C MARK ROWS AND COLUMNS 12 CALL J2MARK{MA,Hl,H3tl) IFIM1.EC.0)G0 TO 13 CALL J2SWIT(MA,M1,M3,1.1) GO TO 10 C SEARCH FOR STEHARO PATH 13 CALL J2PATH
PAGE 247
.235 C C » »»»»O«0#. •••» ••••••••• c C • J2ACYC • C •• c C PURPOSE C J2ACYC IS THE RUDD AND WATSON ACYCLIC ASSIGNMENT ALGORITHM. C C USAGE C CALL J2ACYC(JCSPTR,JCHO0E,JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCKOOE = I FOR COLUMNS ONLY OR 2 FOR BOTH ROWS AND COLUMNS C SEE J2MINC C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUSTt FOR SOME MACHINES. C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FIND C FRMCEL C J70SUP C LOCATE C SIMCIN C SIMFLG C SIHOPT C STORE C SYSENT C SYSERR C SYSEXT C TOCELL C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERROR(DATA PROVIDED) C 1 NF NO ELEMENT WITH ZERO COST (-ROW NUMBER OR C COLUMN NUMBER) C 2 NF ELEMENT SHOULD HAVE POSSESSED NON-ZERO FLAG C (-ROW NUMBER OR COLUMN NUMBER) C C METHOD C SELF-EXPLANATORY C c •»•••••••» c SUBROUTINE J2ACYC( JCSPTR, JCMODE, JCCLNO) COMMON/ALLOC/JCCOREH ) DIMENSION P(2),S(2),Z(7),N(
PAGE 248
i236 HB=J70SUP(JCSPTRilf0f0il) C MC=ADORESS OF LOAD FOR COLUMN MC=J70SUPUCSPTR, 1,1,0,2) C MD=AOCRESS OF L0AD(8) FOR ROW MD»MB*7 C • MEsAODRESS OF L0AD(8) FOR COLUMN HE=HC»7 C MF=ADDRESS OF SPUR FOR ELEMENT HF=HA-5 C INITIALIZATION MPC=MD MS=HC MSC=ME C MG=INCICATOR HG=«1 IF(JCMG0E.EQ.1)G0 TO 5 C HH=NUHBER OF ER ASSIGNMENTS THIS PASS MH=0 C FIND PRIMARY WITH ONE ZERO 1 P(2)=1-JCC0RE(MPC> N(2>=5-MG 2 Hl = 3 CALL FINDJJCC0RE(MA),P,0,Z,P,JCC0RE(MP),H1,1) IFJH1.EQ.0)G0 TO 5 C LOCATE ELEMENT WITH ZERO COST P(2)=0 CALL FETCHl JCC0RE(MA),P,M1,C(4),P,JCC0RE(HP),0,1) 3 CALL LOCATE(JCCORE(MF),Ml,H2,0(2),C,MG,l) IF(M2.EQ.0JGO TO 6 •C GET SECONDARY ENTRY NUMBER " CALL FRMCELIJCC0RE{MF),M2,S(2),N,1» S(2»=S12)-JCC0RE{HSC) C GET SECONDARY FLAG CALL FETCH(JCC0RE(MA),S,Hl,ZI4),S,JCC0RE(MS),0,2) IFIMI.NE.OGO TO 7 C OUTPUT ASSIGNMENT Ml=JCCORE(MD) H2=JCC0RE(ME) CALL SIM0PT(JCSPTR,M1,M2,1,U P(2I=0 . CALL FETCHlJCC0RE(MA),P,M3,0,P,JCC0REtMB),0,3) IF(K3.GT.0)GO TO 4 CALL SIKCIN(JCSPTR,Ml,0,-l,l,D(2),C(4),l) CALL SIMFLG(JCSPTR,M1,0,2,0,I) GO TO 41 . 4 HH=MH+1 41 CALL SIMCIN(JCSPTR,M2,l,-l,l,D(2J,C(4),2) CALL SIMFLG(JCSPTR,M2, 1,2,0,2) C ITERATE P(2)=l GO TO 2 C LAST PASa 5 IF(
PAGE 249
237 GO TO I ABORT PRIMARY M1=JCCCRE«M0)»(-1)»«MG CALL STORE(JCCORE(MA),P,DJ2»,2(A)tPtJCCORE(MB),l) CALL SYSERR(ltHl) P(2»=l GO TO 2 ABORT SECONDARY CALL T0CELL(JCC0RE«MF),M2,HltZ<4),l) Ml=-jCCORE(ME)«(-l»i>»MG CALL SYSERR(2,Ml) Hl»M2 GO TO 3 EXIT CALL SYSEXT RETURN ENO
PAGE 250
23 8 C c«»» •••• •• •••»» • ....».»•. c •«••. C • J2A0SA • C • c C PURPOSE C J2A0SA MAKES AN ARBITRARY OUTPUT ASSIGNMENT C C USAGE C CALL J2A0SA(jCSPTRf JCSORF.JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = THE ADDRESS OF THE SIMBL C JCSORF = I FOR SUCCESS OR FOR FAILURE C JCCLNO = A USER ASSIGNED CALL STATEMENT 10. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FIND C FRHCEU C J70SUP C LNKBWO C LOCATE C SIHCIN C SIMFLG C SIHOPT C STORE C SYSENT C SYSERR C SYSEXT C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERROR(DATA PROVIDED) C 1 NF ELEMENT IN COLUMN WITH ZERO COST AND ZERO FLAG C CANNOT BE FOUND (COLUMN NUMBER) C 2 NF ROW COES NOT HAVE ZERO FLAG (ROW NUMBER) C 3 NF NO ROW WITH ZERO FLAG FOUND (COLUMN NUMBER) C C . METHOD C SELF-EXPLANATORY C c •••••••••• c SUBROUTINE J2A0SA( JCSPTR, JCSORF, JCCLNO) COMKON/Al.LOC/jCCORE{ I). DIMENSION V12),F(4),C(4),E(7),R(4),B(7),D(4),H(2) INTEGER V,F,C,E,R,C,B,H DATA V/U0/,F/l,5,I,l/,C/l,10.l,l/,E/2,5,l,l,6,l,l/,R/l,3,l,l/, I B/2,5,1>1, 10, 1,1/, D/0, 0,0,0/, H/ 1,0/ C ENTER CALL SYSENT(l,'t. 1.3, JCCLNO) C MA*A0CrESS of spur FOR ORDINATE Ml=JCSPTR+2 HA=JCC0RE(Ml)-5
PAGE 251
239 C MB=ADDRESS OF LOAD FOR ROW MB»J70SUPCJCSPTR, 1,0,0,1) C HC=ADDRESS OF LOAD FOR COLUMN MC=J70SUP(JCSPTR, 1,1,0,2) C MO=ADDRESS OF L0AD(8) FOR ROH M0=MB*7 C ME=AOORESS OF L0A0(8) FOR COLUMN ME«HC*7 C HF=AOCRESS OF SPUR FOR ELEMENT HF=MA-5 C MG=MINIHUH COUNT HG=0 C MH=COLUHN NUMBER MHaO C MI=MINIMUM COUNT MI=0 C MJ=ROW NUMBER MJ=0 C FIND A VARIABLE WITH FLAG V(2)=1-JCC0RE«M£) 1 JCSORF^l CALL FIND{JCCOSEIMA),V,0,F,V,JCCORECMC).JCSORF,1) IF«JCSORF.EQ.0)GO TO 2 C UPDATE MINIMUM COUNT V(2)=0 CALL FETCH(JCCORE(MA),V,Ml,C,V,JCCORE(MC),0il) V(2)-l IF((MG»(M1-HG+1)).GT.0)G0 TO 1 MG=M1 MH=JCC0RE(Mc» GO TO I C END OF SEARCH FOR VARIABLE 2 IF(MG.EC.0>GO TO 8 V<2)=MH-JCC0RE{HE) CALL FETCH{JCC0RE(HA),V,M1,E(4),V,JCC0REIMC),0,2) C LOCATE ELEMENT DO <, 1 = 1,MG IF1M1.EG.0)G0 TO A CALL LOCATEtJCCORE(HF),Hl,M2,O.E,2,l) IF(M2.EQ.0)G0 TO 5 CALL FRMCELC JCC0RE(MF),M2,H(2),R,U H(2J=H(2)-JCC0R£{HDJ CALL FETCHIJCC0RE(MA),H,D(3),B,H,JCC0RE(MB),0,3) IFIDt3).NE.0)G0 TO 6 IFC(MI»(D14)-MItl) ).GT.O)GO TO 3 Ml=0(4) MJ=JCCORE(MO) 3 Ml=LNK0WD(JCCORE(HF),M2,l) tf CONTINUE C END OF SEARCH FOR EQUATION IF«MI.EG.0)G0 TO 7 C OUTPUT ASSIGNMENT CALL SIK0PT(JCSPTR,MJ,HH,1,1) CALL SII-CINIJCSPTR,MJ,0,-l»l»0,E(4).l) CALL SIHFLG{JCSPTR,MJ,0,2,0,l) CALL SIHCIN(JCSPTR,MH,1,-1,1,D,E<4),2» CALL SIMFLGIJCSPTR.MH, 1,2,0,2) JCSCRF=l 60 TO 8 5 Ml^-O 0(4)=MG-I*1 ABORT REMAINDER OF COLUMN
PAGE 252
240 0(3)=0 IF(0(4).EQ.MG)0
PAGE 253
241 C . . c»» • •••• •••*•••..» c •••• C • J2CNZS • C ..»o«.»»o» c C PURPOSE C J2CNZS CREATES NEW ZERO COST ELEMENTS FROM THE UNASSIGNEO C BALANCE OF THE SIM. C C USAGE C CALL J2CNZS
PAGE 254
242 MC=M8+7 C H0=AODRESS OF LOAD FOR ROW WORKING HD=J70SUP(JCSPTR,3,0,bt2) '< C HE=ADCRESS OF LOADIB) FOR ROW WORKING ME=KD*7 C HF=ADORESS OF LOAD FOR COLUMN MAIN MF=J70SUP(JCSPTR,l,lf0f3) C MG=ADCRESS OF L0A0I8) FOR COLUMN MAIN MG=KF*7 C MH=ADDRESS OF LOAD FOR COLUMN WORKING HH=J70SUP(JCSPfR,3f IfC't) C MISADDRESS OF L0AD(8) FOR COLUMN WORKING MI=KH*7 C MJ=iAOORESS OF SPUR FOR ELEMENT MJ=MA-5 C INITIALIZATION JCSORF=0 0(1)=0 012)=0 N{2)=4 C ML=MINIMUM COST ML=-l C FIND ROW WITH NO MARK 1 L(2)=.1-JCC0RE(ME) 2 M5=«l , . CALL FINDtJCC0RE(MA),Lf0fHiLtJCC0RE(M0)iM5,l) IFCMS.EQ.OSGO TO 7 C LOCATE UNMARKED ELEMENT LC2)=0 . CALL FETCHt JCCORE(HA),L.M5,CfLtJCCORE(MO)fOtH 3 CALL FRnC£LIJCC0RE(MJ),H5,L(2)iN,1) L(2J=L{2)-JCC0REtHI) CALL FETCHlJCC0RElMA),L.D<3).M,L,JCC0RE(MH),Ot2) 1F<(0(3).£Q.I).CR.(0(*).GT.O))GO TO 4 JCSOftF=l CALL FRMCEL ( JCCOREt MJ ) , H5, M6,C, 2 ) IFt(HL»(M6-ML)).LT.0JML=M6 C ITERATE 4 M5=L«3» IFCMS.GT.OGO TO 3 5 L(2)=l GO TO 2 C SUBTRACT ML FROM ALL UNMARKED ELEMENTS r ADO ML TO ALL DOUBLY MARKED ELEMENTS C LEAVE SINGLY MARKED ELEMENTS UNCHANGED 7 L(2J=1-JCC0RE(MC) N(2)=4 8 Ml=l C MM=NUM8ER OF ZERO'S IN ROW CALL FETCH( JCC0RE(MAJfLtMM,K,L,JCC0R£IHB)tMl,3) IF(Ml.£Q.-l)GO TO 14 C GET ROW FLAG AND MARK L(2)=JCC0RE(NC)-JCC0R£IHE) CALL FiiTCH(jCC0RE(MA),LfD,M,L,JCC0RE(M0),0,4) IF(D
PAGE 255
>43 GET COLUMN MARK AND FLAG LJ2)=0U)-JCC0RE(Mn CALL FETCH(JCC0RE(MA),L,0t3),M,LtJCC0RE(MH),0,6) IF«C(3».E0.1)G0 TO 12 M3-M1 IF{0(4».GT.0)M3=H3*l H4=l IF(M3.EQ.1)G0 TO 12 ADJUST ELEMENT, COST CALL FRMCEL(JCC0REG0 TO 9 L(2)=0 CALL ST0RElJCC0RE(MA),LfMM,K,L,JCCORE(Ha),2) 13 L(2)=l GO TO 8 . EXIT 14 CALL SYSEXT RETURN END
PAGE 256
244 C C**«>>«*«*»>«>»0*>«»«»«« •».... o«* • • ••• C • J2G0PT • C • •••» c C PURPOSE C J260PT ESTABLISHES GROUP BODY OUTPUT VARIABLE LIST ENTRIES C C USAGE C j2G0PT(JCFUNCf JCVARI,JCFLAG,JCMOOE,JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCFUNC = THE FUNCTION AUXILIARY BLOCK OR IF UNOIMENSIONEO C JCVARI= THE VARIABLE AUXILIARY BLOCK OR THE VARIABLE NAME C IF UNDIMENSIONcD C JCFLAG = THE ROW FLAG „ ,, C JCMOCE » IF THE VARIABLE IS UNOIMENSIONEO AND 1 OTHERWISE C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER c . ' C REMARKS . ,, C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C J7C0MV C J7IC0H C NEWCEL C RETURN C SYSENT C SYSEXT C TOCELL c • C ERROR COOES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C C •»...»••• c FUNCTION J2G0PT( JCFUNC, JCVARI, JCFLAG, JCMOOE, JCCLNO) COHKON/ALLOC/JCCORE( 1 ) DIMENSION L(6),D(2),F(7>,N(4),X{4),G110) INTEGER D,F,X,G , , . ^ ., DATA L/5,C,0,0,l,0/,F/2,5,l,l,l,l,I/.N/l,8,l,l/,X/l,l,l,l/,G/2, 1 21, 1«I. 2, 1,1, 21, 1,1/ C ENTER CALL SYSENTd, 4, 1,5, JCCLNO) C HA=DISPLACEMENT FOR OUTPUT M1=JCC0RE(17)*10 MA=JCC0RE(M1) C , MB=A0DRESS OF SPUR FOR OUTPUT H8=JCCCRE(16)*1 MB=JCC0RE(H3)*5»MA-5 C MC=UNIT SCALE Ml=Ml-4 MC=JCC0RE«H1)
PAGE 257
245 C MD«AODRESS OF SPUK FOR SECEDE Ml=JCC0RE(15)*l MO=JCCORE(Ml) C ME=ADDRESS OF LOAD FOR SECEDE 11) Hl=Hl»l ME=JCC0RE(M1) H1=ME*28 JCCCRE(MH = -1 C HF=ADDRESS OF LOAD FOR SECEDE t2) MF=M1*2 C ADJUST CURRENT VALUE POINTER IN GIMBL Hl=JCC0REtl6)*8 KG=JCC0RE(H1) JCC0RE(M1»=JCFUNC*3 C HH=LENGTH OF A SCALAR VARIABLE Ml=JCC0RE(l7)*3 MH=JCC0RE(Hl> C GET J2G0PT Hl=JCVARI+2 Hl=fB*5»JCC0RE(Ml)«JCH00E CALL NEHCEL(JCC0RE(Hl),J2G0PT,l) IF(M1.EQ.MB)G0 TO 71 IFIJCFUNC.EQ.O)GO TO 5 c t Hl=JCFUNCtl L(2)=JCC0RE(M1J/MC H3) = JCFLAG+6 L(A)=JCC0RE(M1)-HC«L(2) C ACCESS FUNCTION CALL FETCHtJCCQRElM0J,L,L(6),F(4),L,JCC0RE(ME),0,l) C ACCESS CONSTITUENT 1 CALL FETCHt JCC0RE(M0»,L15),0,F,L,JCC0RE(HE),0,2> 1FID<1).NE.I)G0 TO 3 C GET NAME L(6>=0 CALL FETCHt JCCORE(MD),LtO,N,Lf JCCORE(HE)f0f3) Dll)=0(l)+HC»L(2I CALL J7COHV{MD,0(l>.MFil) Ml=JCVARI+l IF(C(1).NE.JCC0RE(M1))G0 TO 3 C COMPUTE INDICES Ml=Ml»l CALL J7ICOMtM0fHH,MBf J2G0PT»MA,l,JCC0RE(Hl),ME,M2,l) M2=J2G0PT*HA-l H3=0 M4=JCC0RE(Hl) DO 2 1=1, M4 IFIM3.EG.1)G0 TO 2 H1=M1*1 H2=M2*1 IF(JCC0RE(M1),NE.JCC0REJM2))H3=1 2 CONTINUE IF(M3.E0.0)G0 TO 4 . C ITERATE IFlD{2).GT.0)D(2)=i 3 L(5)=0(2) lF(Ll6).Gt.0)G0 TO 1 C ERROR Ml=JCFUNC*l CALL SYSERR(l,JCCORE{Ml)) Ml=JCVARI+2 Ml«MB*JCC0RE(Ml»»5
PAGE 258
246 CALL R6TURN(JCC0RElHl),J2G0PT,J2G0PT,n J2G0PT»0 GO TO 8 TRANSFER INDICES FROM SECEDE 4 L(&» = l-H
PAGE 259
247 C C><»««>«»*«* »• • » * .». .•••••••! c • C • J2MARK » c •• c C PURPOSE C J2MARK PERFORMS HARKING OF ROWS AND COLUMNS WITHOUT A FULL C OUTPUT ASSIGNMENT. C C USAGE C CALL J2MARK(JCSPTRf JCRNUM.JCCNUM.JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = THE ADDRESS OF THE SIMBL C JCRNUM = OR THE ROW NUMBER OF AN ELEMENT FOUND TO BE C TRIPLY MARKED C JCCNUM = ANALOGOUS TO JCRNUM, BUT FOR THE COLUMN C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C . C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FIND C FRMCEL C JTOSUP C J70TPT C LOCATE C SIMINT C SYSENT C SYSEXT C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C , c .».•••••». c SUBROUTINE J2MARK( JCSPTR, JCRNUM, JCCNUM, JCCLNO) COKf^CN/ALLOC/JCCOREd) DIMENSION Pt2),S(2),FU),C(4J,N(7),D«8),M(lO),L('^) INTEGER P,S,F,C,0 DATA P/l,0/,S/l,0/,F/l,5,I.l/,C/l,6,l,l/,N/2,4,l,l,5,l,l/,0/0,0t 1 0,0,0, 0,0,0/, M/3, II, I, It 12, I, 1,13, 1,1/, L/1, 1,1,1/ C ENTER CALL SYSENfd, 4, 1,6, JCCLNO) C HA=ADCRESS OF SPUR FOR ORDINATE HlsJCSPTR+2 MA=JCC0RErHl)-5 C MB=A0CRESS OF LQAD FOR ROW MAIN HB=J70SUPiJCSPTR,l,0,0,l) i C MC=A0DRESS OF LOAD FOR COLUMN MAIN MC=J7OSUP«JCSPTR,l,l,0,2) j C MD=ADDRESS OF LOAD FOR ROW WORKING
PAGE 260
.248 MD»J70SUP(JCSPTR,3,0,0,3) C ME-AOCRESS OF LOAD FOR COLUMN WORKING ME=J70SUPtJCSPTRt3,ltO,4) C MF=ADCRESS OF L0ADC8) FOR ROW MAIN MF=HB*7 C MG»ADCRESS OF L0A0(8) FOR COLUMN MAIN MG=KC*7 C MH-ADCRESS OF L0AD(8) FOR ROW WORKING HH=MD^7 C MI=ADCRESS OF L0A0(8) FOR COLUMN WORKING HI=HE*7 C MJ-ADDRESS OF SPUR FOR ELEMENT MJ=MA-5 C MK=INDICATOR MK— 1 C INITIALIZATION JCRNUM=0 JCCNUM=0 C FIND PRIMARY WITH ZERO FLAG 1 P<2)=l-JCC0RE(MF) N(2»=5-MK L(2)=MK 2 Ml = I CALL FIND(JCC0RE(MA),P,0,F,P,JCC0RE(M3)tMl,l» IFIMI.EQ.OGO TO 12 C GET POINTER P(2)«0 CALL FETCHCJCCORE(HA)iP,MltCfPf JCCORE(MQ),Oil) C LOCATE ELEMENT WITH ZERO COST 3 CALL L0CATE(JCC0RE(HJ),M1,M2,D,C,MK,1) IF(M2.EQ.0IG0 TO 11 C GET SECONDARY NUMBER AND STATUS FLAG CALL FRMCEL(JCCORE«MJ),M2,D(2»tN,l) IF{D(3).EQ.l)G0 TO 10 C GET SECONDARY MARK S(2) = D(2)-JCCORE(Hn CALL FSTCH(JCC0RE(MA),S,Dl2),M,SiJCC0RE(ME),0f2) IF((0(4)»(MK-1) ).EQ.O)GO TO 8 C GET OUTPUT OF SECONDARY 4 SU) = JCCORE(MI )-JCCORE(MG) CALL FETCH( JCCOR£(MA),StD(5),M,StJCCORElMC»i0i3) IF(D(7).EQ.0)G0 TO 8 IF(0(6).EQ.0)GO TO 6 C ACCESS OUTPUT ASSIGNMENT (AND MARK OF OUTPUT) M1=DI7)*1 5 D(7)=JCC0RE(H1) 6 P(2)=D(7)-JCC0RE{HH) CALL FETCH< JCC0RElHA),PfD(8)fM(7),P,JCCORE(HD)f0.'») IF(0I8).GT.0)G0 TO 7 C ITERATE IF(0(6).EQ.O)GO TO 8 M3=Ml-l M1=JCC0RE(H3) • IF(M1.GT.0)G0 TO 5 CO TO 8 C TRIPLE MARKED 7 JCCNUH=JCOORE(Mn JCRKUM=JCCORE(MH) IFCHK.EC.IIGO TO 8 JCCNUH=JCCORE(MHJ JCRNUM=JCCORE(Mn C MARK SECONDARY
PAGE 261
249 8 IF(D(4).GT.0)G0 TO 9 CALL SIMINT(JCSPTR,l,3,Ml,l» CALL J70TPTlJCSPTR,JCCORe{Mn,Ml,2tJCCORE(HF),l) CALL SIMINT{jCSPTR,l,3tMl,2» ITERATE 9 IF( JCRNUM.GT.O)GO TO 13 10 CALL FRMCELlJCC0RE
PAGE 262
250 C C • .0«0«««B»##,0»«»..« ••• C •• C • J2HINC • C • c C PURPOSE C J2HINC FINDS THE MINIMUM COST ELEMENT OF A ROW OR COLUMN. C C USAGE C J2KINClJCSPURtJCFIRStJCR0RC,JCCLN0) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPUR = THE ADDRESS OF THE SPUR FOR ELEMENTS C JCFIRS = THE ADDRESS OF THE FIRST ELEMENT C JCRORC = FOR ROHt 1 FOR COLUMN C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINESf C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FRMCEL C SYSENT C SYSEXT C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C c ••••«•»••• c FUNCTION J2M INC J JCSPUR, JCF IRS t JCRORC, JCCLNO) COMMON/ ALLOC/JCCOREl IJ DIMENSION C(I0),D(3) INTEGER CD DATA C/3fltltli5,l,l,6,l,I/ C ENTER CALL SYSENTCl,*, 1,7, JCCLNO) C INITIALIZATION J2HINC=-l CC2)=1+JCR0RC M1=JCFIRS C EXAMINE ELEMENT 1 CALL FRMCEL
PAGE 263
251 C c»»» • ..••.».*..»». •< c ••• C • J2N0FZ • c «•«•..».•• c C PURPOSE C J2N0FZ PERFORMS THE SUBTRACTION AND COMPUTES THE NUMBER OF C ZERO'S. C C USAGE C J2N0FZtJCSPUR, JCFIRS.JCMINCJCRORCJCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCMINC = MINIMUM COST FOR ROW OP. COLUMN C SEE J2MINC FOR ALL OTHER PARAMETERS C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME HACHINESt C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FRMCEL C SYSENT C SYSEXT C TOCELL C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C c •••••»««.• c FUNCTION J2N0FZ(JCSPUR,JCFIRS,JCMINC,JCR0RC,JCCLN0) COMMCN/ALLOC/JCCOREd) DIMENSION C(10),D(3I INTEGER CO DATA C/3,l,ltl,5«l,It6,l>l/ C ENTER CALL SYSENTd.'t, 1,8, JCCLNO) C INITIALIZATION J2N0FZ=0 C(2)=1*JCR0RC M1»=JCFIRS C EXAMINE ELEMENT 1 CALL FRMCEL{JCCORE(JCSPUR),Ml,D,C,l» IF(0(i2J.NE.0>G0 TO 2 D(3»=D(3»-JCMINC |FID(3).EQ.0)J2N0FZ=J2N0FZ*l CALL T0CELL(JCC0RE(JCSPUR).Hl,D«3),C(7),l) 2 Ml=0(l) IF(Ml.GT.Q)Ga TO I C ^ EXIT . CALL SYSEXT RETURN END
PAGE 264
2 52 C c»«**«»»*« • • •••• • c •••• C • J2SHIT • C •...» c C PURPOSE C J2SW1T PERFORMS THE OUTPUT ASSIGNMENT ADJUSTMENTS FOR A C STEWARD PATH. C C USAGE C CALL JZSHITtJCSPTRf JCRNUM.JCCNUH.JCMODEtJCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCMOOE = I OR 2 AS RESPECTIVELY THE TRIPLE MARK HAS C DISCOVERED BY J2MARK OR BY. J2PATH C FOR THE OTHER PASSED PARAMETERS SEE J2MARK. C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. c ' C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FIND C J70SUP C J70TPT C LNKFHD C LOCATE C SIMCIN C SIMFLG C SIMINT C SIMOPT C SYSENT C SYSERR C SYSEXT C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERROR(OATA PROVIDED) C I NF NO OUTPUT FOR MARK ( ROW NO. OR COLUMN NO. » C 2 NF NO MARK FOR OUTPUT (+ ROW NO. OR COLUMN NO.) C C METHOD C J2SHIT ELIMINATES THE APPROPRIATE ROW AND COLUMN MARKS. C c ••• c SUBROUTINE J2SWIT( JCSPTR.JCRNUM.JCCNUM, JCMOOE, JCCLNO) COMMON/ALLOC/JCCORE( 1) DIMENSION L<2),H(71iK(4),0{3),R{2),C«2>,E(lO),F(7) INTEGER C,0,R,E,F DATA L/lr0/,M/2,l2,l,l.l3,l,l/.K/l,6,l,l/,D/0,O,0/,E/3,12,l,1.13, 1 1, 1,13, 1,1/, F/2, 2, I, I, 2, 1,1/ C ENTER CALL SYSENTd, 4.1. lOiJCCLNO). C MA=ADCRESS OF SPUR FOR ORDINATE Hl=JCSPTR*2 MA=JCC0RE(Ml)-5 C MB=ADCRESS OF LOAD FOR ROW MAIN
PAGE 265
253 MB=J70SUPCJCSPTR,1,0,0,IJ MC=ADDRESS OF LOAD FOR C3LUHN HAlN MC=J70SUP(JCSPrR,l,l,0,2) MD=AOCReSS OF LOAD FOR ROW WORKING MO=J70SUP{JCSPTR,3iO,0,3) HE=AODR£SS OF LOAD FOR COLUMN WORKING Me=J7CSUPlJCSPTR,3,l,0,4) MF=AOCRESS OF LOA0(8) FOR ROW MAIN MF=HB«-7 MC=MCt7 MH-MO+7 MI=ME*7 MJ=l HK=1 MG^AOORESS OF L0AD{8) FOR COLUMN MAIN MH=ADCRESS OF L0AD(8) FOR ROW WORKING MI=ADORESS OF L0ADJ8) FOR COLUMN WORKING MJ=INOICATOR MK=INDICATOR INITIALIZATION E(l)=JCMODE*l ML=JCRNUM MM=JCCNUM MN=0 F(1)=JCM0DE BREAK OUTPUT ASSIGNMENT 1 CALL SIMFLG(JCSPTR,HL,0,0,1,1) CALL SIKCIN(JCSPTR,ML,0,1,1,D,K,I) CALL SIMFLGJJCSPTR.MM.l.OtliZ) CALL SIMCIN(JCSPTR,MH,l,l, 1,0,K,2) CALL SIMOPT(JCSPTR,ML|MH, -1,1) IF(HK.EQ.3)C0 TO 6 GET MARKS 2 M1=HL M2=MD M3 = MH 3 L12)=MI-JCC0RE(M3) CALL FETCHJ JCCORE(HA),L,D<2),M,L,JCCORE(M2),0,l) IF(D(3).EQ.0)G0 TO 12 IF(D12).EQ.0)G0 TO <» Ml=0(3)+1 0<3)=JCC0RE(H1» 4 C(MJ)=0t3) IFJM2.EC.MD)R(MJ)=C
PAGE 266
254 MN=0t3)*l 0(3»=JCC0RE
PAGE 267
255 IFIK5.EC.0)G0 TO 20 22 CALL J70TPT(JCSPTR,JCC0RE
PAGE 268
"256 C c»«««»» • ••• • • • c • ••• C • J2T0SA • c c C PURPOSE C J2T0SA TRANSFERS AN OUTPUT SET ASSIGNMENT FROM AN SIH TO A C GENDER GROUP. C C USAGE C CALL J2T0SA(JCGRUPtJCSPTRtJCCLN0) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCGRUP = THE ADDRESS OF THE GENDER GROUP C JCSPTR = THE ADDRESS OF THE SIHBL C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FORSOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FIND C FRMCEL C FSTLNK C J2C0PT C J2TA0V C SEARCH C TOCELL C SYSENT C SYSEXT C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERRORIDATA PROVIDED) C 1 NF NOT ENOUGH GROUP BODIES (NUMBER OF ROWS) C 2 NF NO OUTPUT ASSIGNMENT (RUW NUMBER) C 3 NF TOO MANY OUTPUTS (ROW NUMBER) C 4 NF INCOMPLETE OUTPUT ASSIGNMENT (ROW NUMBER) C C METHOD C J2T0SA MUST NOT BE EMPLOYED IF REARRANGEMENT OF THE BODY OF C JCGRUP HAS OCCURRED SINCE SIM GENERATION. C c SUBROUTINE J2T0SA( JCGRUP, JCSPTR, JCCLNO) COMMON/ ALLOC/JCCORE( 1) DIMENSION R(2),C(2),K(4),GJ7),F('i),H(19),Vtl0),P(4),D(ll),SU). I 0(4) INTEGER R,C,G,F,H,V,P,0,S,0 DATA R/l,O/,C/lf0/,K/l,1.1/,P/1. 2 l8,l,l/rS/l,7,2,2/,0/l,20,I^l/ C ENTER CALL SYSENTd, 4, 1,11, JCCLNO) C MA=ADCRESS OF SPUR FOR ORDINATE M1=JCSPTR»2
PAGE 269
257 MA=JCC0RE(Ml)-5 C MB=ADCRESS OF LOAD FOR ROW MB=J70SUP(JCSPTR,l,0.0,l) C R Hl=M8*7 RI2)=l-JCC0RE(Ml) C MC=NUMBER OF ROWS Hl = KUl MC=JCC0RE(H1) C MO«ADCRESS OF LOAD FOR COLUMN ' H0=J70SUP(JCSPTRilf l.OiZ) C ME^AOCRESS OF L0AD{8» FOR COLUMN HE=K0*7 C MF=ADCRESS OF SPUR FOR GROUP BODY M1=JCC0RE(16)+1 K2=JCC0R£(17)*9 MF=JCC0REIMl»+5»JCC0RE(H2»-5 C HG=TRACE KEY CALL FRKCEL{JCCORE(MF),JCGRUP,HG,K,l) C MH=TEMPORARY LIST POINTER MH=0 C HI=LEVEL H1=0 C HJ=LEVEL OF PROTECTED GROUP MJ=»0 C MK=CURRcNT LIST ENTRY MK=JCGRUP C ML=OVER-RIDE INDICATOR HL=0 C DO LOOP 00 10 1=1, MC IFIHL.EQ.DGO TO 3 C LIST ADVANCE 1 Ml=f«K M2=-l D(l)=l DI2)=2 CALL SEARCH(JCC0REI16),M1,MK,D,G,MG,M2.H1.HH,1) 1F{H2.EC.0)G0 TO 11 2 1F((MJ»(HJ-MI)).LT.O)GO TO I MJ=0 IF(M2.E0.2)G0 TO 3 C GROUP CALL FRMCEL(JCC0RE(MF),MK,M1,F,2) IF(Ml.E0.1)MJ=MI GO TO I C GROUP BODY C SIM ACVANCE 3 CALL FETCH1JCC0RE(«A),R,D13),H,R,JCC0RE(MB),0,1» IF(0(6).GT.0)CALL SYSERR( 't, JCCORE( HE ) ) C PREPARE FOR J2G0PT CALL ML=0 M2=0 IFC0(4).LT.3)G0 TO 4 ML=1 GO TO 10 4 M1=0 IF(D(3).GT-0)M1=D(5) CALL FRMCEL(JCC0RE(MF),MK,016),0,3) C«2)=Dt8) IF(D(7).EQ.0JG0 TO 6 5 M3=D«8)*1
PAGE 270
258 C(2)=JCC0REJM3» 6 IF«C(2).E0.O)GO TO 12 C(2)=C12)-JCC0RE(ME) b(6)=D{6)-l C ACCESS OUTPUT CALL FETCH(JCCORE(MA),C,0(9),V,CtJCCQRE(HO»f0i2» C CALL J2G0PT H3=H2 M2=J2G0PT(H1,D« 11 ) ,D( A) ,D( 10) , I ) C LINK . IFCM3.GT.0)G0 TO 7 M3=M2 CALL TOCELL( JCC0RE(HF),HK,M3fPtl) GO TO 8 7 CALL FSTLNKUCC0RE(MF),M3,H2,l» C ASSIGNMENT FLAG M3=0 IF(D19).E0.1)H3=1 CALL T0CELL(JCC0RE(HF),H2,M3,G«4),2) C ITERATE 8 IF(0(7».EQ.O)GO TO 9 H3=0(8) D(8)=JCC0RE(M3) IF(0(8).GT.0)GO TO 5 C END OF LOOP 9 IF(0(6).NE.0)G0 TO 13 10 R(2)=l C(2)=l-JCCaRE(ME) 0(l)=0 MH=0 101 Ml=l CALL FIN0(JCC0RE(MA),C,D,Hn6),C,JCCORE(HO)fHl,l) IF(M1.EQ.0)G0 TO 102 C12)=0 CALL FETCH(JCCORE«MA),C,0(2),V,C,JCCORE(HD),0,3) Ml=J2TACV(0{4)tO(2),0(3)il) CALL FSTLNK{JCC0RE(MF»,M1,MM,2) MM=H1 CI2)=1 GO TO 101 C EXIT 102 M1 = JCC0REU7)*8 M2=JCC0RE5»(M2-Ml» CALL T0CELL(JCC0RE(Ml),JCGRUPtMM,S,3) CALL SYSEXT RETURN C NOT ENOUGH GROUP BODIES 11 CALL SYSERR(ltMC) GO TO 10 C NO OUTPUT ASSIGNMENT 12 CALL SYSERR<2,I) . GO TO 8 ^ C MISMATCH OF NUMBER OF OUTPUTS 13 CALL SYSERR(3,JCC0RE(HE)) GO TO 10 • END
PAGE 271
259 c c»»» •«•»«• •••• •«..».» ••••••••««••• c ••» C • SPEDUP » c C PURPOSE C SPEOUP PERFORMS THE SARGENT AND HESTERBERG SPEED-UP 1 C ALGORITHM. C C USAGE C CALL SPEOUPCJCGRUPf JCMODEiJCCLNO) C C DATA FORMAT C N/A C C USAGE C JCMODE =» OR 1 AS RESPECTIVELY THE SIM IS OR IS NOT TO BE C RELEASED AT THE CONCLUSION OF SPEDUP C SEE HASSAL FOR ALL OTHER PASSED PARAMETERS. c C REMARKS C THE NUM3ER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C SPEOUP UTILIZES CUDGEL, SIMGEN AND HASSAL TO AUTOMATICALLY C PROVIDE ANY LIST STRUCTURE OR FEATURE REC3UIRED FOR THE C SPEED-UP 1 ALGORITHM. c C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C BSTLNK C CORN C OFAULT C FETCH C FIND C FRHCEL C FSTLNK C J2F0UR C J2GRUP C J2PREC C J2R0HP C J70SUP C LNKOHD C LHKFWD C LOCATE C POPUP C PUSH C RETURN C SETLNK C STORE C SYSENT C SYSEXT C TOCELL C C ERROR CODES FOR THIS PROGRAM C NONE ' C C METHOD C SELF-EXPLANATORY C c ..»»• c SUBROUTINE SPEOUP! JCGRUP, JCMODE, JCCLNO)
PAGE 272
260 COH^•ON/ALLOC/JCCORE^1) „... DIMENSION S(4),T(5),R(2),F<4),P<4),E(10».C(*»,V(10),0(4),G17),BC1I 1 .L(<>)tZ(l)tO(3) INTEGER S,T,RfF,Pf EfC,V,0,G,B,Z,0 DATA S/l,8,l,l/,T/0,0,l,C,2/,R/ltO/,F/l,l2,l,l/,P/lf6,l,l/,E/3,?, 1 l,l,21,l,1.22,l,l/,C/l.O/,V/3,4,l.l,5,i,l,3,ltl/tO/1.13,lil/.G/2, 2 3.1»lf3,ltl/iB/0/,L/l,l,ltl/tZ/-l/ C ENTER CALL SYSENT(li<»f 2,1, JCCLNO) C DEFAULT CALL 0FAULT(JCGRUP,MB,3,l) C MC=AODRESS OF SPUR FOR ORDINATE H1=M8*2 HC=JCC0REtHl)-5 C MO=ADDRESS OF SPUR FOR ELEMENT HD«HC-5 C M£=ADCRESS OF LOAD FOR ROM HE=J70SUPlMB,l,0,0,l) MF=HE*7 MC=NF*1 MG=JCCORE(MG) C HH=ADORESS OF LOAD FOR COLUMN MH=J70SUP{MB,1,1,0,2) H1=HH*7 C T , . T(l)=0 T(2)=0 M2=JCCOREtl7)*ll T(4)=JCC0R6(H2) C REPLACE OUTPUT WITH POINTER (ROUS ONLYI HAA=0 CALL J2R0WP(JCGRUP.MC,ME,T,HAA,l) C MJ=LIST 'I HEAOCELL HJ=0 C MK=LIST 3 HEADCELL MK=0 C ML=LIST 3 TAILCELL HL»0 C MM=GROUPING LIST HEADCELL MM»0 C START 00 99 1=1, MG C STEP n R(2)=I-JCC0RE(HF) C STEP III CALL FETCHC JCCORElMC)fR,Ml,F,R,JCCORE(HE»fO,l) C B IFtMl.EQ.DGO TO 99 C c CALL J2F0UR(T,MJ,MCf0,HE,l,l) C A CALL J2GRUP(T,MM,MJ,U C STEP IV A IFlMJ,EC.O)GO TO 99 CALL FRKCEL(T,HJ,0,E,2J C STEP V 5 IF(C(l».EQ.l)GO TO 4 C STEP VI . 6 MN=KJ IF(0(I).EQ.O)GO TO 62 HN=D(3» «0*MJ
PAGE 273
2 61 61 CALL FRHr.EL(T,MN,0(3),EI7)t3) 62 IFID(3).GT.0)G0 TO 63 IF(C(1).E0.0)G0 TO 9 MN=LNKFHOtTtHNil» CALL T0CELL(T,MG,MN,E(7),2) IFIMN.GT.OGO TO 61 GO TO 9 ' 63 MP=0(3) D(3)=LNKFWDIJCCORE(MO),HP,2) CALL TCCELL(T,HN,0(3),E(7»,3» C STEP VII 7 CALL FRHCELlJCC0RE(MD)»MP,C(2)fV,4) 1F(C<3).GE.3)GQ TO 62 C(2)=C«2)-JCC0RE(HI) CALL FETCHlJCCORE(MC),CiRl2)tO,C,JCCORECMH),0,2) C A IF(R(2».GT.0JG0 TO 71 C12)*0 CALL FETCH! JCCOREJ MO.Cf Ml, F,C,JCCORE(MH), 0,21) IFIMl.GT.OGO TO 62 Ml = l CALL STCRE(JCC0RE«MC),C,M1,F,C,JCC0RE(MH),10) CALL J2F0UR(T,MJ,0,0,HH,3,2) GO TO 62 C B C 2 71 IF(Rt2).EQ.ClA))G0 TO 4 R(2)=R(2)-JCC0RE(MF) CALL FETCH( JCC0RE(MC),R,M1,F,R,JCC0RE«HE),0,3) IFIMl.EQ.DGO TO 62 C I R(2)=0 CALL J2F0UR(T,M1,MC,R(2),ME,2,3) CALL J2GRUP(T,MM,M1,2) C 3 E(l)=2 CALL FR^'CEL(T,M1,D,E,5) CALL L0CATE(T,HJ,M2,D,E,l,l) E(l)=3 C B IFtH2.GT.0)GO TO 8 C A CALL SETLNK(T,M1,HJ,1) MJ=M1 GO TO 4 C STEP VIII C A 8 HQ=MJ MJ=LNKFwD(T,H2,3) CALL FSTLNKtT,M2,0,lJ HR=Ml C B Dll)=l 0{2)=2 m=po > 81 H2=-l CALL L0CATE{T,M1,M3,D,G,M2,2) IF(H3.EC.0)G0 TO 8A «l=LNKFKD(T,M3,4) IFG0 TO 82 CALL SETLNK(T,H3,HJ,2) MJ=H3
PAGE 274
262 M2=LNKBWDtTtMJ,l» CALL S6TLNK(T,M2,Ml,3l GO TO 81 82 CALL FRMCEL(T,M3,M2fE(4)i6) H4=LNKBWD(TfH3,2) CALL SETLNK(T,M4,M2,3) CALL RETURN(T,M3,M3,l) CALL LCCATE(T,M2,M«fB,L,lt3) CALL ScTLNK(T,M4,Ml,4) CALL L0CATE(T,MH,M2,M3,E<4),lt4» IF(M2.EQ.0)G0 TO 33 IF{M2.EQ.MH)MH=LNKFWD(T,HMf5) CALL P0PUP(TrM2,M2,M4,ZtliH 83 IF(Hl,GT.O)Ga TO 81 84 CALL SETLNK(T,MR,MJ,5) HJ=«R CALL PUSH(TtMM»MJ,E(4),l,l) C D(l)=2 0C2)=MQ D(3)=MQ CALL TOCELL(T,MJ,D,e,A) E GO TO 4 STEP IX 9 CALL FRHCEL(TfMJ,D,e,7) IF(Dtl».EQ.l)GO TO 93 IF(0(l).EQ.O)Ga TO 92 A 91 Ml=0(2) CALL FRMCEL(T,M1,0(2),E{4),8) 92 R|2)=D{2)-JCCORE(HF) D(2)=l CALL STOREt JCC0RE(HC),R,0{2J,F,R,JCCORE(ME)il» lF(D(l).Ne.2)G0 TO 93 D(2)=LNKFW0«T,M1,6) lFJDt2).GT.0)G0 TO 91 B 93 CALL SETLNK(T,ML,MJ,6) IF(MK.EQ.O)HK=HJ NL=MJ MJ=LNKFWD(T,MJ,7J CALL FSTLNK(T,ML^0,2) IF(WJ.GT.O)CALL BSTLNK
PAGE 275
263 EXIT CALL SYSEXT RETURN END
PAGE 276
264 C c*>>*«**** • »..•.. ••..». • c •••«...»•• C • J2F0UR • C •••* • c C PURPOSE C J2F0UR ACQUIRES LIST ENTRIES FOR LIST FOUR. C C USAGE C CALL J2FOUR(JCSPUR,JCHDCL,JCSPTR,JCOISP,JCLOAO,JCMODE, C JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPUR = THE SPUR VECTOR FOR LIST FOUR C JCHDCL = THE ADDRESS OF THE HEAOCELL FOR LIST FOUR C JCSPTR = THE ADDRESS UF THE SPUR VECTOR FOR ROW ORDINATE C JCOISP = THE DISPLACEHE^4T TO BE APPLIED TO THE LOAD VECTOR C TO REACH THE DESIRED ROW C JCLOAO = THE ADDRESS OF THE LOAD VECTOR FOR ROW ORDINATE IF C JCMODE = I OR 2. OR FOR COLUMN ORDINATE IF JCHOOE C 33 C JCMODE = AN INTEGER VALUED AT 1, 2 OR 3. IF EQUAL TO 1 OR r 2 THE NEW LIST ENTRY REPRESENTS AN SIM ROW WHICH r IS OR IS NOT THREADED ONTO LIST FOUR RESPECTIVELY. C IF EQUAL TO 3. THE NEW LIST ENTRY REPRESENTS AN C SIM COLUMN AND IS THREADED ONTO LIST FOUR. THE C PASSED PARAMETERS JCSPTR AND JCDISP ARE IGNORED IF C JCMODE = 3. C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUM3ER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C • REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C NEWCEL C SETLNK C SYSENT C SYSEXT C TOCELL C C ERROR COOES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C SUBROUTINE J2F0UR( JCSPUR, JCHDCL, JCSPTR ,JCOI SP, JCLOAO, JCMODE, 1 JCCLNO) COMMON/ ALLOC/JCCOREd) DIMENSION JCSPURl5»,D(3J,L(iq),RI2),P('») INTEGER C,R,P DATA L/3,3,l,l,21,l,1.22,l,l/,R/l,0/,P/l,6,l,l/ C ENTER CALL SYSENT(1,4,2,2,JCCLN0J
PAGE 277
265 C D(1)=FLAG 0(H=JCMO0E/3 C 0(3)=«P0INTER TO TYPE 2 LIST 0(3)=0 IF(JCH0DE.GT.2)GO TO I R(2J=JCDISP . ,. CALL FETCH(JCC0RE(JCSPTR),R,0(3)iPtRf JCCOREUCLOAO.Ofl) C DC2)=C0DE NUMBER 1 Ml^JCLOAO*? 0(2)=JCC0RE(H1) C GET NEW LIST ENTRY CALL NEHCELlJCSPUR.Ml.l) CALL TCCeLL(JCSPURiMl,0,LtU 1F(JCM0DE.EQ.2)G0 TO 2 C THREAD ONTO LIST 4 CALL SETLNKt JCSPUR.Ml, JChOCL.l) C SET JCHOCL 2 JCHDCL=Ml C EXIT CALL SYSEXT RETURN END
PAGE 278
•266 C c • •• ••••••• c • C • J2GRUP • C c . C PURPOSE C J2GRUP REPLACES A LIST FOUR ENTRY BY A GROUPING IF POSSIBLE C C USAGE C CALL J2GRUP(JCSPUR.JC6RUPf JCFOURiJCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPUR = THE SPUR FOR THE TEMPORARY LISTS C JCGRUP = THE ADDRESS OF THE GROUPING LIST HEAOCELL C JCFOUR = THE ADDRESS OF THE LIST FOUR ENTRY C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COHMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C COPY C FRMCEL C LNKFWD C LOCATE C SYSENT C SYSEXT C C ERROR COOES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C r •«••••••«• C SUBROUTINE J2GRUP( JCSPUR, JCGRUP, JCFOUR, JCCLNO) COHHON/ALLOC/JCCORE< l» DIMENSION JCSPUR{5),TtlO) INTEGER T DATA T/3^3, 1,1,21,1,1,22, 1,1/ C ENTER CALL SYSENTI1,*,2,3,JCCLN0» C GET DATA IF(JCGRUP.EQ.O)GO TO 3 CALL FRMCEL(JCSPUR, JCFOUR, MA, T(A),1) C SEARCH ' MB=JCGRUP 1 CALL FRMCEL(JCSPUR,MB,MC,T(A),2) CALL FRMCEL( JCSPUR, MC,MD,Tl<»), 3) CALL LCCATt( JCSPUR.MO,Ml,HA,T(A),l,l) IFtHl.GT.OIGO TO 2 MB= LHKFWDi JCSPUR, MB, H IF(KB.GT.O)GO TO 1 * GO TO 3 C GROUPING FOUND 2 CALL COPY(JCSPUR, HC, JCFOUR, T, I)
PAGE 279
C EXIT 3 CALL SYSeXT RETURN END 267
PAGE 280
268 C ....... C****»»»*» * • •«.•»• c C • J2PREC • c ••• c C PURPOSE C J2PREC REARRANGES A GROUP BODY ACCORDING TO THE PRECEDENCE X ORDER INDICATED BY LIST THREE. C CALL J2PREC(JCGRUPiJCSPUR,JCL0DR.JCL0DC,JCTSPRf JCTHREt C JCTEMP.JCCLNO) C C.; DATA FORMAT C N/A C DESCRIPTION OF PARAMETERS C JCLOOR = THE ADDRESS OF THE LOAD FOR ROWS C JCLODC = THE ADDRESS OF THE LOAD FOR COLUMNS C JCTHRE = THE ADDRESS OF THE LIST THREE HEADCELL C FOR ALL OTHER PASSED PARAMETERS SEE J2R0HP. C f RPMARK^ C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C BREAK C COUPLE C FETCH C FRMCEL C FSTLNK C J2TACV C LOCATE C NEWCEL C POPUP C • PUSH C RETURN C SYSENT C SYSEXT C TCCELL C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C SUBROUTINE J2PREC(JCGRUP.JCSPUR. JCLOOR, JCLODC, JCTSPR, JCTHRE* 1 JCTEMP.JCCLNO) COHr'CN/ALLOC/JCC0RE( I) , . ^.,. DIHENSICN JCTSPR(5»,D(5),G(7),R(2),A{*),C(4),T{7),LI10),B('.),FC7), I V(2),P(10) INTEGER 0,G,R,A,C,T,B,F,V,P ,, . , DATA G/2,3,ia,21,l.l/.R/l,0/,A/l,13,l,l/.C/l,5.1,2/,T/2,21,l,l, 1 22,l,l/,L/3»3,l,l,8,4,4,7,2,2/,B/l,7,l,l/,F/2,3,l.l.3,l,l/,V/l,0/ 2 ,P/3, 9, 1,1, 5, I, 1,7, 1,1/ C ENTER CALL SYSENTll,4,2,A,JCCLN0) C MA=ADDR£SS OF SPUR FOR GENDER GROUP
PAGE 281
269 M1=JCC0RE(16)*1 H2=JCCCR6(17)*e MA=JCC0RE(Ml)+5»JCC0RE«H2)-5 C MB=CURRENT GROUP MB=JCGRUP C HC^GRCUP BODY HEAOCELL MC=0 C HD'-PREVIOUS GROUP BODY ENTRY M0=0 C HE=CURRENT GROUP BODY ENTRY C MF=CURRENT LIST THREE ENTRY MF=JCTHRE C HG=GROUP LIST HEAOCELL HG«0 C MH=DECISION VARIABLE LIST MH«0 C NEXT ENTRY ON LIST THREE 1 1F C BREAK LINKS CALL FRMCEL(JCC0RE(MA),ME,D,C,1) M1=0(1) IFtKl.EC.OGO TO 4 DO 3 1=1, Ml 3 CALL 8REAK( JCC0RE(16),HE,0,1,0,1) 4 Ml=0(2) IFJUl.eC.OGO TO 6 DO 5 1=1, Ml 5 CALL BREAKIJCC0RE(16),0,ME,1,0,2) C SET LINKS 6 IFIMD.GT.OGO TO 7 HC=ME CALL tOCELL(JCCORE(MA),MB,HC,B,l) CO TO 8 7 CALL CCUPLEJJCC0RE(16),M0,ME,O,0,O,l) 8 MD=ME IF(M1.GE.0)G0 TO 1 MB=-M1 HC=0 «0=0 MF»=D(2» GO TO 1 C GROUPING 9 DC3)=H8 0<4)=KF CALL PUSH(JCTSPR,MG,0(3»,T,l,l) CALLNEWCEL(JCC0RE(MAI,M1,1» M3=Ml*JCC0Re(M2)-l D(3)=l 0U)=1 0(5)=MH CALL T0CELL(JCC0RE(MA),M1,0(3),L,2) HE=M1 Hl>=-Hl HH=0
PAGE 282
270 GO TO 6 END OF GROUPING 11 IF(KG.EQ.O)GO TO 13 HD=HB CALL P0PUP(JCTSPR»HG,HG,0(3)iT»1.2) MB=0(3) MF=D(Al GO TO 1 DECISION VARIABLE 12 IF(NF.EQ.0)GO TO 11 Hl=-1 0(3)=b 0C4)=2 CALL LOCATE (JCTSPR,HF,M3,0( 3»,F, Ml, 1) IF(H3.EC.0)G0 TO 11 IFIHl.EC.DGO TO 1 Ml=JCL0CC+7 V(2)=0C2)-JCC0RE(M1) CALL FETCH( JCCOREJ JCsPUR),V,D{3),P,V,jCCbRE(JCL00C),0t2» Fl=J2TA0V(D(3),DJ4),Ot5),l) CALL FSTLNK«JCC0RE(HA),M1,HH,1) MH=M1 GO TO 1 RELEASE GROUPS ON TEMPORARY LIST 13 IFUCTEMP.EC.OGO TO 14 • CALL POPUPJ JCTSPR, JCTEMP,JCTEMP,M1,G»'»),1,3) CALL RETURN(JCC0RE(MA),M1,M1,1I 60 TO 13 EXIT 14 CALL SYSEXT RETURN END
PAGE 283
271 C c »••.•• ••• •••• ••••>••••••>» •••••I c ••• • C • J2R0WP • c •••••••••• c C PURPOSE C J2R0WP REPLACES THE ROW OUTPUT WITH A POINTER TO A GROUP C BODY, ENTRY. C C USAGE C CALL J2R0WP(JCGRUPtJCSPUR,JCL0AD,JCTSPR,JCTEHPfJCCLN0) C C DATA FORMAT C N/A C • C DESCRIPTION OF PARAMETERS C JCGRUP = THE ADDRESS OF A GENDER GROUP C JCSPUR = THE ADDRESS OF THE SPUR FOR SIM OROINATES C JCLOAO = THE ADDRESS OF THE LOAD FOR ROWS C JCTSPR = THE TEMPORARY LIST SPUR C JCTEMP = A LIST REFERRING TO INNER UNPROTECTED GROUPS C JCCLNO » A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUSTi FOR SOME MACHINESi C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FRMCEL C NEXT C PUSH C STORE C SYSENT C SYSERR C SYSEXT C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERROR(DATA PROVIDED) C I NF END OF GROUP BODY (CURRENT ROW NUMBER! C C METHOD C SELF-EXPLANATORY c SUBROUTINE J2R0WP( JCGRUP, JCSPURt JCLOAO, JCTSPRt JCTEMP, JCCLNO) COHKCN/AULOC/JCCOREJ 1) DIMENSION R(2),K(<»),0(2),F{4),GIA),A(7),JCTSPR(5) INTEGER R,0,F,G,A DATA R/ 1, 0/, K/ 1, 4, I, 1/, F/ 1,3, If 2/, G/ 1,21, 1,1/, A/2. 13, 1,1, 12, 1,1/ C ENTER CALL SYSENTtl, ',2,5, JCCLNO) C MA=AODRESS OF SPUR FOR GENDER (GROUP) M1=JCC0RE(16)*1 H2=JCC0REtl7)+a MA=JCC0REIHl)*5*JCC0RE(M2)-5 C MB=KEY CALL FRMCEL(JCCORE(HA),JCGRUP,Ma,K,l) C MC=LEVEL HC=0 C MD=INCICATOR
PAGE 284
272 c
PAGE 285
273 C •,•••, C*»«>«i>«*»««» ••• c • C • J2TADV » C .•«....••• c C PURPOSE C J2TA0V PREPARES A TEAR OR DECISION VARIABLE LIST ENTRY FOR C A GROUP. C C USAGE C J2TA0V(JCVARI,JCFLAG,JCMO0E,JCCLN0) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS .„„„>.,, or .m ctM C JCVARI = A VARIABLE CODE NAME OR THE ADDRESS OF AN SIH r AUXILIARY DATA BLOCK IF JCHODE=l C JCFLAG = FOR ALGORITHMIC SELECTION AND I FOR PRECHOSEN r JCHODE = FOR UN0IM6NS I0N60 AND 1 OTHERWISE C JCCLNO = A USER ASSIGNED CALL STATEMENT 10. PARAMETER C C "^^"^THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C NEWCEL C SYSENT C SYSEXT C TOCELL C C ERROR COOES FOR THIS PROGRAM C NONE C C METHOD C " SELF-EXPLANATORY C c • FUNCTION J2TADV(JCVARI,JCFLAGfJCM00E, JCCLNO) COHMON/ALLOC/jCCOREd) DIMENSION D(3).V(10) INTEGER 0,V DATA V/3,2,1,1,3,1,1,21,1,1/ C ENTER CALL SYSENT(1.'»,2.6,JCCLNQ) C HA=OISPLACEMENT FOR OUTPUT M1=JCC0RE(17)+I0 MA=JCC0RE(M1J Q MB=ADCRESS OF SPUR FOR OUTPUT MB=JCC0RE(16)*I M8=JCC0RE(MB)*5«MA-5 IF(JCM0DE.EQ.0)G0 TO 1 Ml=JCVARl*l MB=MB+5«JCC0RE(M1» C GET LIST ENTRY I CALL NEWCEL{JCCQRE(M0),J2TADV,l) C STORE DATA Dll)=0 D(2)=JCFLAG
PAGE 286
274 0C3)=JCVARI IF(JCM0D(:.E0.0)GO TO 3 D«U = JCC0REIM1) 0(3)=JCC0RE
PAGE 287
275 C C« •• • o....» •.••»>«ei C o.».. C * BEMOAN • C c C PURPOSE C BEMOAN PERFORMS THE BARKLEY AND HOTARO MINIMUM TEAR C ALGORITHM. C C USAGE C CALL BEMOAN(JCGRUPiJCMODE,JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C SEE SPEDUP c C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C HEMOAN EMPLOYS OFAULT AT OPTION LEVEL THREE. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C OFAULT C FETCH C FRMCEL C FSTLNK C J2CP0T C J2SPRE C J2TACV C J2T0WY C J70SUP C RETURN C SIKRTV C SPEDUP C STORE C SYSENT C SYSEXT C TOCELL C C ERROR CODES FOR THIS PROGRAM C NONE c. C METHOa C SELF-EXPLANATORY C C SUBROUTINE BEMOAN( JCGRUP, JCMODE, JCCLNO) COMMON/ ALLOC/JCCORE( U DIMENSION L(A),D(3),F(2),Z(10),G(4),T(7),N(7) INTEGER D,F,Z,G,T DATA L/3,5,l,l/,F/l,0/,Z/3,l't,l,l,3,l,l,4,l,l/,G/l,7,3,3/, I T/2,.l,l»li2,ltl/.N/2,7,l,l,9,l,l/ C ENTER CALL SYSENTJ If 'ff3i I, JCCLNO) C MA=AODRESS OF SPUR FOR GROUP M1 = JCC0RE«16)H H1=JCC0REIH1J H2=JCC0RE(17)*8
PAGE 288
276 MA*Hl*5«JCCORE(M2>-5 C MB=AODRESS OF SPUR FOR TEAR VARIABLE M2>H2»2 MB=Hl»5»JCC0REtH2)-5 C MC=AOCReSS OF SIMBL CALL DFAULTCJCGRUP.HCfOf 3t 1) C MD=ADORESS OF SPUR FOR ORDINATE m=>HC*2 MD=JCCCRE(Kl)-5 C ME=AOCRESS OF LOAD FOR COLUMN WORKING , ME»J70SUP(MC>5f 1.0,1) MF=ME»7 C ESTABLISH WORKING ORDINATE MG=J70SUP(MC^l. It0i2) MH=MG*7 Ml=HG+a DO I 1=1,3 1 01I)=0 H2=JCC0RE(M1) Ml = m+13 FI2>=JCC0RE(M1) DO 2 1=1, H2 . CALL STORE(JCCORE(H0),L(Ml),D,Z,F,JCCORElHE),l) 2 Ml»3 . L{1)=1 C RELEASE CURRENT TEAR VARIABLES CALL FRMCEL(JCCORE(MA»,JCGRUP,Ml,G,l) IF(Ml.EQ.O)GO TO 4 3 CALL FRMCEL
PAGE 289
277 C LARGEST NUMBER OF INTERVALS H2=J2CP0T(MCtMEtU IF(M2.GT.0)G0 TO 7 C UPDATE JCGRUP CALL T0CELLCJCC0REIHA»,JCGRUPfMI,G,2) C ADJUST SIM CALL S I MRTV( JCGRUP, H C PRECEDENCE ORDER CALL SPEOUPC JCGRUP, JCMOOE.JCCLNO) C EXIT CALL SYSEXT RETURN END
PAGE 290
278 C €«•••••• •• ••••• * C ••• C • J2CP0T • C •••• c C PURPOSE C J2CP0T FINDS THE INTERVAL APPEARING IN THE MAXIMUM NUMBER C OF OTHER INTERVALS. C C USAGE C J2CP0T(JCSPTRtJCL0DW,JCCLN0) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C SEE J2RE0U C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C CORN C FETCH C FIND C FRHCEL C J2RECU C J70SUP C LNKBWO C LNKFWO C LOCATE C POPUP C PUSH C SYSENT C SYSEXT C C ERROR COOES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C c FUNCTION J2CP0T(JCSPTR,JCL0DW,JCCLN0J COHMON/ALLOC/JCCOREdl DIMENSION L(2),F('f),D(3),P(7),R(^),C(4»,0(4),T(5),NU) INTEGER F,0,P,R,C,0,T DATA L/l,0/,F/lf l'f,l.l/,D( l)/0/,P/2, 13, 1,1 ,6,1 , l/,R/l ,3,1 , 1/,C/1 , I 4,l,l/,0/l,13,l,l/,T/0,0,l,3,3i/,N/l,l,3,3/ C ENTER CALL SYSENT{1,4,3,2,JCCLN0) C MA=ADCRESS OF LOADIB) FOR COLUMN WORKING MA=JCL00W*7 C MB=AOCRESS OF LOAD FOR COLUMN MAIN MB=J70SUPlJCSPTR,l,l,0,l> MC=MB*/ C M0=>A0DRESS OF LOAD FOR ROM MAIN MD=J70SUP(JCSPTR, 1,0,0,2) i HE=HD*7
PAGE 291
279 C MF^AODRESS OF SPUR FOR ELEMENT Hl=JCSPTR*2 JCSPR0=JCC0RE
PAGE 292
GO TO I a CALL CORN(Ttl) EXIT CALL SYSEXT RETURN END 2 80
PAGE 293
2 81 C *...... C*««»*>««*«>**«*««*« •••••• ..•...*.«••».••. c •••• C • J2ELEH » r ••'•o»»»i»»C C PURPOSE C J2ELEM USES THE OUTPUT OF A COLUMN TO FIND A PRECURSOR TO C THE COLUMN. C C USAGE C J2ELEM(JCSPTR,JCL0DWtJCN0RA,JCH00E,JCR0WN,JCCLN0) c C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C. JCSPTR = THE POINTER TO THE SIHBL C JCNORA = A COLUMN NUMBER IF JCMODE « 0, OR THE ADDRESS OF r AN ELEMENT IF JCMODE = I C JCMODE = TO ACCESS THE FIRST ROW ELEMENT AND 1 TO ACCESS C THE NEXT ROW ELEMENT GIVEN THAT A ROW HAS ALREADY C BEEN ACCESSED C JCROWN = THE ROW NUMBER C FOR ALL OTHER PASSED PARAMETERS SEE J2REDU C C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT, c C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FRMCEL C J2RE0U C J70SUP C LNKFWD C • SYSENT C SYSEXT C C ERROR COOES FOR THIS PROGRAM C NONE C " . C METHOD .,,..c:u C JCMODE IS AUTOMATICALLY CHANGED FROM TO 1J2ELEM C RETURNED AS INDICATES FAILURE. C c •••• c FUNCTION J2ELEM( JCSPTR, JCLODW, JCNORA, JCMODE, JCROWN, JCCLNO) COMMON/ ALLOC/ JCCORE ID DIMENSION L(2), 0(4), P(4),E(*) INTEGER 0,P,E DATA L/l,0/,0/I,l3,l,l/,P/l,6,l,l/,E/l,4,l,l/ C ENTER CALL SYSENT(1,4,3,3,JCCLN0) C MA=ADCRESS OF LOAD FOR COLUMN MAIN HA=J70SUP(JCSPTR, 1,1,0,1) MB=HA*7 . C MC=ADCRESS OF LOAD FOR ROW MAIN MC=J70SUP« JCSPTR, 1,0,0,2) MD=MC*7 C INITIALIZATION OF J2ELEM
PAGE 294
282 J2EtEM=>0 C HE=AOCRESS OF SPUR FOR ELEMENT Hl»JCSPTR*2 JCSPR0=JCC0RE(MlI-5 M£»JCSPR0-5 C MODE 1F(JCN0RA.EQ.0)G0 TO A IF(JCH0DE.EQ.lJGO TO 2 Q GET OUTPUT OF COLUMN H2J=JCNCRA-JCC0REIMB) CALL FETCH( JCCOREC JCSPRO)fLtHliO.Lf JCCORE(HA»,0,1) IFCMl.ee.OGO TO 4 C ACCESS ROW L(2)=Ml-JCCaRE(H0) ,. „ ,. CALL FETCm JCCORE{JCSPR0)iLfJCN0RA,PfL,JCCORE(MC) t0f2) C ACCESS ELEMENT 1 IFCJCNORA.EQ.OOO TO 4 CALL FRMCEL(JCC0R£(ME),JCN0RA,M2,E,1) C REDUCE M2 M3=J2RECU(JCSPROiJCLODW,M2tl) JCHOOE=l 1FIM3.GT.O)GO TO 3 C ADVANCE 2 JCNORA=LNKFHDCJCCORE(ME)iJCNORA,l) GO TO I C SUCCESS 3 JCROWN=JCCORE
PAGE 295
283 C C»«»«»t •••.«•• .•••• ...«•«•.«•• «..»« c •••• C • J2PATH • C •• ••• c C PURPOSE C J2PATH DEVELOPS STEWARD PATHS. C C USAGE C CALL J2PATHIJCSPTR,JCRNUM,JCCNUM,JCCLN0) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C SEE J2HARK C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C SEE J2MARK C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C c • •• c SUBROUTINE J2PATM( JCSPTR, JCRNUM, JCCNUM, JCCLNO) COMMON/ALLOC/JCCOREJ I) OIMENSICN F(7), 0(71, R«A),C12),ZC'»),N(10),L(4), 0(4) INTEGER F,0,R,C,Z,C DATA F/2.l2,l,l,5, l,l/,0/2,12,l,l.l3,l,l/tR/l,0,0/,C/l,0/,Z/l,6,l, 1 l/,N/3,3,l.l,4,l,l,3.1f l/.L/l,l.l,l/ C ENTER CALL SYSENTd.-^, 1,9, JCCLNO) C MA=AOORESS OF SPUR FOR ORDINATE MI=JCSPTR*2 HA=JCC0RE(Ml)-5 C M8=ADCRESS OF LOAD FOR ROM MAIN MB=J70SUP(JCSPTR,l,0,0,l) C . MC=AODRESS OF LOAD FOR COLUMN MAIN MC=J70SUP( JCSPTR, 1,1, 0,2 I C HD=A0CRESS OF LOAD FOR ROW WORKING MD=J70SUP(JCSPTR,3,0,0,3) C ME=ADDRESS OF LOAD FOR COLUMN WORKING ME" J70SUP( JCSPTR, 3, 1,0,4) C MFsAOCRESS OF L0AD(8) FOR ROW MAIN MF=M8*7 C MG=AOOR£SS OF L0A0(8) FOR COLUMN MAIN MG«HC*7 C . MH=ADORESS OF L0AD(8) FOR ROW WORKING MH=M0*7 C MI«ADDftESS OF L0AD(8) FOR COLUMN WORKING MIaME*7 C MJ^MARK MJ»0
PAGE 296
2 84 C INITIALIZATION JCRNUM=0 JCCNUM=0 C MK^INCICATOR MK=0 C ML=INDICATOR HL=«0 c hm=aooress of spur for element C ' " FIND ROW WITH OUTPUT ASSIGNMENT 0«l)=l 0(2)=2 R12)=1-JCC0RE(MF) 1 Ml=~l CALL FIND(JCCORE(MA),R,D,F,R,JCCORE(MB),Ml,l) IF(Hl.EQ.O)GO TO I'i C GET ROW MARK MO=JCCORE{HF) R«2)=JCC0RE(MF)-JCC0RE
PAGE 297
285 5 CALL FETCH(JCC0RE(MA)fC.H9>ZiCtJCC0RE(M2)t0tA} 6 H2»=KK CALL L0CATE«JCC0REtHM),H9,Hll,D,ZVMK,l) IF(MH.EQ.O)GO TO 7 CHECK OUTPUT CALL FRMCEL(JCC0R£(HM),M11,R<2),N,1) CC2)=RI3)-JCC0RE(MG) CALL FETCH( JCCORE(MA),C,H12iO«A),Cf JCC0RE(MC)f0,41) IF(M12.EG.R(4))G0 TO 61 CHECK MARKING R<2>»=RC2)-JCC0RE(H7I CALL FETCH( JCCORE(MA),R,M12tO(4),Rf JCC0RE(M3),0f5) IF(M12.EQ.0JG0 TO 8 61 CALL FRMCEL(JCC0RE(MH),M11,M9,L,2) IF CALL FETCH( JCC0REJHA),R,D(3),0,R,JCC0RE(Ml),0i6) 1F(0J4).EQ.0160 TO II M10=0 IF(0(3).EQ.0)G0 TO 10 MlO'OCt) 9 Mll=MlO+l HlO=JCCaRE(M10) D{4)=JCC0RE(Nll) MARKS 10 C(2)=Di4)-JCC0REIM8) CALL FETCHt JCC0RE(MA),C,Ml2,O(4),C,JCC0RE(M4),Ot7) IF«M12.GT.0)G0 TO 13 ITERATE IF«M10.GT.O)GO TO 9 11 IF(HL.EQ.O)GO TO 12 MN=ML GO TO 2 12 R«2)=M0-JCC0RE{HF)tl 60 TO 1 TRIPLE HARK 13 JCRNUH=JCC0RE(M5I JCCNUM=JCC0RE(M8) IF{MK,eq.2)G0 TO 14 JCRNUH^JCCNUM JCCNUM=JCC0RE«H5) EXIT 14 CALL SYSEXT RETURN '^ END
PAGE 298
286 C c»<»»»»« •••• •••••» c ••••• C • J2RE0U • c •..«•..... c C PURPOSE C J2RE0U REDUCES A PRECURSOR TO AN INTERVAL. C C USAGE C J2R£0U(JCSPRO,JCLO0W,JCCNUM,JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPRO = THE ADDRESS OF THE SPUR FOR ORDINATE C JCLODW = THE ADDRESS OF THE LOAD FOR THE WORKING ORDINATE C JCCNUM = THE COLUMN NUMBER OF THE VARIABLE OF INTEREST C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C fiPMARK^ C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C SYSENT C SYSEXT C C ERROR CODES FOR THIS PROGRAM C NONE -.x C METHOD C SELF-EXPLANATORY C C ..•«»o»«.» FUNCTION J2REDU(JCSPR0,JCL0DW,JCCNUM, JCCLNO) COKfON/ALLOC/JCCOREl I) DIMENSION L12>.P«7),D(2) INTEGER P,D DATA L/l,0/iP/2fl*tl,lf 3f Itl/ C ENTER CALL SYSENT«l,^i3»A, JCCLNO) C MA^ADCRESS OF L0ADI8) MA=JCL0DW+7 ' ' . C L L(2)=»JCCNUM C INITIALIZE J2RE0U J2REDU=JCCNUH C ACCESS FILE ENTRY 1 L(2)=L(2)-JCC0RE
PAGE 299
2 87 C»» • .»..•••.•..•••...» • ..— C • J2SPRE • C "• c C PURPOSE C J2SPRE FINDS AN INTERVAL WITH A SINGLE PRECURSOR. C C USAGE C CALL J2SPRE(JCSPTRtJCLOCW,JCINTE,JCPREC,JCCNUM,JCCLNOI C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = THE POINTER TO THE SIMBL C JCINTE = THE INTERVAL C JCPREC = THE SINGLE PRECURSOR OF JCINTE C JCCNUM = THE COLUMN NUMBER AT WHICH THE SEARCH IS TO C COMMENCE C SEE J2RE0U FOR ALL OTHER PASSED PARAMETERS C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME HACHlNESt C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FIND C FRMCEL C J2ELEM C SYSENT C SYSEXT C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C J2SPRE WILL PERFORM A SECOND SEARCH FROM THE BEGINNING OF C THE ORDINATE IF ON THE INITIAL PASS THE SEARCH FAILS. IF C THE SECOND SEARCH ALSO FAILS, J2SPRE IS RETURNED AS ZERO. C
PAGE 300
c •••••••••• c SUBROUTINE J2SPRE( JCSPTR, JCLODW, JCINTEt JCPRECi JCCNUM, JCCLNO) COK>^CN/ALLOC/JCCORE(l) OIKENSICN L(2),F(4),Dll),0«4),CU) INTEGER F.OiO.C DATA L/lrO/,F/l,l4,ltl/tO/0/tO/l,l3,l,l/tC/l,4,l,l/ C ENTER CALL SYSENT(1,4,3,5,JCCLN0) C MA=AOORESS OF LOAD! 8) FOR COLUMN WORKING MA«JCLO0M*7 C L L(2)=JCCNUM-JCC0REIHA) C MB^CURRENT COLUMN MB=0 C MC» INDICATOR NC=0 C MD-COUNTER M0=0 C ME=PRECURSOR ME=0 C MF=AODRESS OF LOAD FOR COLUMN MAIN HF=J70SUPiJCSPTR,l,l,0tl) HG=HF*7 C JCSPRO Ml=jCSPTR+2 JCSPR0=JCC0RElMl)-5 C JCSPRS JCSPRS=JCSPR0-5 C INITIALIZATION JCINTE=0 JCPREC=0 C FIND COLUMN WITH ZERO FLAG 1 Hl»=l CALL FINoCJCCORE(JCSPRO).L,D,F,L,JCCORE(JCLODW),Ml,l) IF(M1.EC.0)60 TO 5 C • J2ELEM HB=JCC0RE«MA) H1 = MB M2=0 2 H3=J2ELEM(JCSPTR,JCL0DW,Hl,H2,M4,l) IF(M3.GT.0)GO TO 4 GO TO 6 C ITERATE 3 L(2)=He*l-JCC0RE{MA» M0=0 ME=0 GO TO I C TEST
PAGE 301
289 C TEST FOR LEGITIMATE SELF-LOOP 51 CALL FRHCEL(JCC0RE(JCSPRS)tMl,M5,C,l) IF(HB.EC.H5)G0 TO 2 ME=MB C SUCCESS 6 JCINTE=H8 JCPREC^iHE C EXIT 7 CALL SYSEXT RETURN END
PAGE 302
290 C €••••• •...•«o.»«#. ...»••...• •»••• C • C • J2T0WY • C •••..».».« c C PURPOSE C J2T0HY ENUMERATES TWO WAY EDGES AND SELECTS THE MAXIMUM. C C USAGE C J2T0WY(JCSPTR,JCL00W,JCCLN0> C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C SEE J2SPRE C C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FIND C J2ELEH C STORE C SYSENT C SYSEXT C C ERROR CODES FOR THIS PROGRAM C NONE .€ • C METHOD C SELF-EXPLANATORY C c • ••• 'C FUNCTION J2T0WY(JCSPTR,JCL0DW,JCCLN0) COMyON/ALLOC/JCCoREd) DIMENSION L(2),C(A)fD(l),F(4) INTEGER C,D,F DATA L/ 1,0/, C/l, 4,1,1/, D/0/,F/l, 14, 1,1/ C ENTER CALL SYSENTd, 4,3,6, JCCLNOS C JCSPRO Ml=JCSPTR*2 jCSPR0=JCC0RE(Ml)-5 C MA=AO0RESS OF L0A0{8) FOR COLUMN WORKING HA»JCL0CW*7 C MB«=NUMBER OF COLUMNS MB=MA»l MB=JCCOREtMB) C ZERO COUNTS L(2)=1-JCC0RE(MA) DO 1 1=1, KB CALL STORE(JCCORE(JCSPRO»,L,D,C,L,JCCORE(JCLODW),1) I H2I=0 C MC=PRIMARY MC=0 C MD=SECONOARY M0»0
PAGE 303
2 91 C L LC2)»l-JCC0RE(MA) C ME^CURRENT MAXIMUM COUNT ME»«0 C INITIALIZE J2T0WY J2T0HY=0 C FIND COLUMN WITH ZERO FLAG 2 Ml = l CALL FINO(JCCORE(JCSPRO)iLtD.F,LtJCCORE(JCLOOH)tHlil) IFJMl.EC.OJGO TO 6 C PRIMARY MC=JCCORE(MA) LC2)=0 CALL FETCH(JCCORE(JCSPRO)tL,MF,C,L,JCC0RE(JCLOOH),0,l) IF(JCC0RECMA).EQ.MB)G0 TO 5 M1=MC H2=0 3 M3=J2ELEH(JCSPTR,JCL0DW,Ml,M2.MA,l) IF(M3.EQ.0)G0 TO 5 IF(M3.LE.«C)G0 TO 3 C SECONDARY M0=M3 M5=0 4 M6=J2ELEM(JCSPTR,JCLO0W,M3,M5iM7,2) IF(M6.EQ.0)G0 TO 3 IF(M6,NE.MC)C0 TO A C INCREMENT SECONDARY L(2)=MD-JCC0REIMA) CALL FETCH( JCC0REL.M8,CtL>JCC0RE(JCL00W).2) C INCREMENT PRIMARY HF=MF*1 GO TO 3 C END PRIMARY 5 L(2)=MC-JCC0RE(MA)*1 IFIMF.LE.MEJGO TO 2 ME = MF J2TCMY=MC 60 TO 2 C EXIT 6 CALL SYSEXT RETURN END
PAGE 304
192 C ^ c»»**»«« ••• • • ••.«..» ..».»•• c C • SUPPAC C • GENERAL • C • INFORMATION • C ••.#*.•• •• c C SPECIAL INSTRUCTIONS/LIST TYPE C ALL LIST TYPES EMPLOYED WITH SUPPAC MUST BE FORMARDC BACKWARD. SIHPAC USES LIST TYPES (A REMOTE APPLICATION) C AND A. GALAP USES LIST TYPE 6. NETPAC MAY BE USED WITH C ANY LIST TYPE. c C SPECIAL INSTRUCTIOnS/LENO C THE FOLLOWING DATA STRUCTURES MUST BE PERMITTED BY THE C LENDS. C SIHPAC LIST TYPE 3 C SEE LEND REQUIREMENTS FOR REMOTE. r (5 STATUS FLAGt 6 POINTER, 7 DIMENSION FLAG, 8 C TYPE FLAG, 9 CODE NAME, 10 INCIDENCE COUNT, C 11 NUMBER OF OUTPUTS, 12 MULTIPLE OUTPUT FLAG, C 13 OUTPUT) C SIHPAC LIST TYPE A C (1 HORIZONTAL LINK, 2 VERTICAL LINK, 3 ROW C NUMBER, 4 COLUMN NUMBER, 5 STATUS FLAG, 6 C ASSIGNMENT COST, 7 SENSITIVITY) C NETPAC C (I LINK, 2 LINK, 3 ID. FLAG, 4 KEY, U KEY, C 5 PATH COUNT, 5 PATH COUNT, 5 WORKING COUNT) C GALAP „^„ r SEE LENC REQUIREMENTS FOR NETPAC INNER KEY NOT REQ. C (1, 2, 3, 4, 5, 5, 5, 6 WORKING LEND, 7 NIO CODE, C 8 VALUE OF CONSTANT, 9 VARIABLE OF INTEREST C FLAG, 9 TYPE FLAG) C ^ C SPECIAL INSTRUCTIONS/DEBUG C THE FOLLOWING TABLE GIVES THE PACKAGE AND PROGRAM ID. C NUMBERS FOR SUPPAC. ALL ARE ON LEVEL 3. C PROGRAM PKG. 10. /PROG. ID. C CUDGEL l/l C SIMPAC C SIMCIN 2/1 C SIMCPY 2/2 C SIMOUP 2/3" C SIMEIN 2/'i C SIHFLG 2/5 C SIMGEN 2/6 C SIMINT 2/7 C SIMOPT 2/8 C . SIKRTV 2/9 C J7B00Y 2/10 C J7C0HV .2/11 C . J7IC0M 2/12 C J7L0DV 2/13 C J70SUP 2/lA C J7QTPT 2/15 C J7VARI 2/16, C NETPAC C BREAK 3/1 C COUPLE 3/2 C LNKBNT 3/3
PAGE 305
2 93 LNKFNT
PAGE 306
294 C c «•..••< • •••• • ,.•..••••.•«. c •• C • CUDGEL • C C PURPOSE C CUDGEL IS THE CRUDE GENDER LIST GENERATOR. c C USAGE C CALL CUOGELUCUNIT.JCGRLIP.JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCUNIT = UNIT NUMBER OR FOR ALL UNITS IN SECEDE C JCGRUP = ADDRESS OF NEH GROUP IF JCUNIT = 0, OR THE C CONTENTS OF JCC0RE(16) OTHtRWISE. C JCCLNO = A USER ASSIGNED CALL STATEMENT 10. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST BE SUPPLIED IN THE C COMMON STATEMENT FOR SOME MACHINES. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FSTLNK C J7IC0M C LNKFMO C NEWCEL C SETLNK C STORE C SYSENT C SYSERR C SYSEXT C TOCELL C C ERROR CODES FOR THIS SUBPROGRAM C CODE FATAL ERRQR(OATA PROVIDED) C 1 NF JCC0R£(16) NOT EMPTY (JCC0RE(16)) C 2 F NO UNIT (JCONIT) C 3 F NO GROUP BODY J ADDRESS OF GROUP) C C METHOD C CUDGEL GENERATES A GENDER LIST WITHOUT PARALLELISM. EACH C UNIT OF SECEDE IS INCORPORATED INTO THE GENDER LIST. C c •*• c SUBROUTINE CUOGEL( JCUNIT, JCGRUP, JCCLNO) CO^^'CN/ALLOC/JCCORE( I) DIHENSICN P14),S(4),N(A),T« 10),F{'V),V(',),B(4),G(l6),0t7),L(9) INTEGER P,S,T,F,V,C,G,D DATA P/l,l,l,l/,S/l,l,2,3/,N/l,l,
PAGE 307
2 95 HAA=JCCCRE(M1) Ml^t'l + l HAB=JCCCRE(Ml) «l=KA8*28 JCCCRe(m)=-l JCGRUP=0 ML=0 KA=l M0=JCC0RE(16) IF(MD.EC.O)GO TO 1 KE=JCC0RE(M1) IF(JCUNiT.EQ.O)CALL SYSERR(l.MO) JCGRUP=MC GO TO 2 1 CALL JIGHBL(M0.ME.MX,1) JCGRUP=0 2 Hl=JCCCRE(17)+8 HB=I'E+5»(JCC0RE(H1)*1) Ml=l'l + 1 HC=fE*5»(JCC0RE(Hl)-l» HCC=JCCCRE(Ml) IF(JCUNIT.GT.0)HA»JCUNIT GROUP 3 CALL NEWCEL(JCC0RE(M8),MF,X) CALL TCCELL(JCCCRE(MB),MF,P,T(7),l» IF(JCUNIT.EC.O)JCGRUP=MF jeCCRE(HO)=MF ACCESS RECORD I L(6)=l Hl=JCCCR£(l7)+6 MG=1 MH=JCC0RE(M1) HK=JCCCRE117)*10 MK=JCCORE(MK) ACCESS DECISION VARIABLE FILE MJ*0 5 L(n=4 L(2»=l LI3)=l L(4)=l HI = l St3)=l INSPECT DECISION VARIABLE 51 CALL FETCH( JCCORElMAA),L(MI),0,S,L,JCCORE(MAB),HG,lJ IFJKG.EG.-DGO TO 8 Ml=C(2»/MH IFnMl.NE.O).AND.«Ml.NE.MA))GO TO 71 ADO DECISION VARIABLE TO LIST HI^fK+asDO) M2 = ^^E5•(m-l» CALL NEKCELIJCC0REIM2),M3,2J CALL TCCELL(JCC0RE(M2l,M3tD(2»,T,2> IF(C{3).EC.0»GO TO 52 N(4)=3+CI3) M1=K3*HK CALL"FETCH(JCC0RE(MAA),Lt6),JCC0RE(Ml),N,L,JCC0RECMA8),0,2) SET LINKS 52 IFIFJ.NE.OGO TO 6 CALL TCCELL(JCCCRE(MB),MF,H3,V,3)
PAGE 308
296 GO TO 7 6 CALL FSTLNK(JCC0RE(M2)tMJ,M3fll 7 MJ«»'3 71 HI=6 L(7)=«C<1I IFIL(7).GT.0)G0 TO 51 C ACCESS UNIT 8 L(5)=>1 S(3)=2 0(4)=2 0(6)=1 L(3)=5 L(7)=0 H2J=HA+4 L(l)=3 Kl=l CALL FETCH(JCCaRE(MAA),L,0,PtL,JCCORE{MAB)fMl,3) 1F(MI.EC.-1)G0 TO 17 9 L<3)=L«3)*1 0(5)=L(3)-6+(L(3)/7>+(L(3)/8)»2 L(A)=1 Hll=4 Ml=l CALL FETCHt JCCORE(MAA),LfO,P,Lf JCC0RE{MAB),H1,A» IF(«1,EC.-1)G0 TO 16 C ACCESS ER, FUNCTION OR CONSTRAINT 10 L«l»=5 Mt=l CALL FETCH(JCCORE(HAA),L,0,S,L,JCCORE{HAB),H1,5» IF(H1.EC.-1)GG TO 16 0<3)=MAoMH+L{4) C ACQUIRE BROUP BODY ENTRY 11 M2=fL ML=1 CALL .J7IC0M(HAA,3fMEtMLtMCCi3fD<2),HAB,M5,l) IF(K5.EC.-UG0 TO 15 C SET LINKS 12 1F«M2.GT.0)G0 TO 13 0(7»=0 CALL TCCELLlJCC0RE«MB),MFfMLfB,4) GO TO 14 13 0(7)=1 CALL SETLNK(JCCaRE(MC)iM2,ML,l) C STORE CATA 14 CALL TCCELL(JCC0RE(MC).ML,CtGt5) IF(C(2».EQ.0)G0 TO 15 MR=— 3 GO TO 11 C NEXT ERf FUNCTION OR CONSTRAINT 15 LC4)=L(4)+1 GO TO 10 C ADVANCE TO NEXT FILE 16 IFIL(3».LT.8)G0 TO 9 C ADVANCE XO NEXT UNIT IFJPA.EQ.JCUNIT)GO TO 18 HA=FA-H IFIKG.GT.OGO TO 5 GO TO 8 . C LAST UNIT 17 IFIfA.EC.JCUNITlCALL SYSERR1-2,MAI 18 B(2)=5 0(U=0
PAGE 309
2 97 1F«ML.EC.0)CALL SYSERR(-3,MF ) IF(HL.GT.O»CALL TOCELL( JCCORE( HC) f HL.O.Bf 81 EXIT CALL SYSEXT RETURN END
PAGE 310
2 98 C C»i c c c c c c c c c c c c c c c c c c c c c c c c c c c c • c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c • SIMCIN • PURPOSE SIMCIN ADJUSTS THE COUNT OROINATES TO REFLECT THE REMOVAL OR REINSTATEMENT OF A ROW OR COLUMN. USAGE CALL SIMCIN (JCSPTR.JCENUH.JCRORCtJC SENS, JCMODE, LION, LOCALf JCCLNO) OATA FORMAT N/A DESCRIPTION JCSPTR JCENUM JCRORC JCSENS JCHOCE LION LOCAL JCCLNO OF PARAMETERS = THE ADDRESS OF THE SIM3L = THE ORDINATE ENTRY NUM3ER OF THE SUBJECT ROW OR COLUMN = FOR ROW AND 1 FOR COLUMN = +1 FOR REINSTATEMENT OR -I FOR REMOVAL = 0, 1 OR -1. WHEN EQUAL TO 0, SIMCIN OPERATES ON ELEMENTS WITH A STATUS FLAG OF 0. WHEN NOT EQUAL TO 0, SIMCIN OPERATES ON ELEMENTS WITH STATUS FLAG AND OATA ITEMS WHICH HATCH THOSE IN LION. WHEN POSITIVE, JCMOOE REQUIRES ALL DATA ITEMS TO MATCH LION. WHEN NEGATIVE, JCMOOE REQUIRES ONLY ONE OATA TYPE TO MATCH. = A VECTOR OF DATA ITEM VALUES = SEE COPY = A USER ASSIGNED CALL STATEMENT ID. PARAMETER REMARKS THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, REPLACE THE 1 IN THE NAMED COMMON STATEMENT. SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED FETCH FRMCEL J5C0MP J70SUP STORE SYSENT SYSERR SYSEXT ERROR CODES FOR THIS PROGRAM CODE FATAL ERROR(OATA PROVIDED) 1 NF COUNT ALREADY ZERO (ENTRY NUMBER) 2 NF NEGATIVE COUNT FOR JCENUM (JCENUM) HETHCD SIMCIN BREAKS NOR SETS ANY LINKS. REINSTATEMENT AND REMOVAL ARE ONLY APPARENT. SIMCIN OPERATES ONLY ON ELEMENTS WITH A STATUS FLAG OF 0. SUBROUTINE SIMCIN! JCSPTR, JCENUM, JCRORC , JCSENS, JCMOOE , LION, LOCAL, 1 JCCLNO)
PAGE 311
299 CO^^'CN/ALLOC/JCCORE ( 1 ) DIMENSION H2),Ot3),PU0),C(4),LION(l»,LOCALm INTEGER D.P.C DATA U/ 1,0/, P/ 3 f 5, I, 1,6, 1,1 f 0,1,1/ iC/1, 10, 1,1/ ENTER CALL SYSENT(l,3,2,l,JCCLN0) P(5)=6 P(8»=10 MA=JCSPTR*2 MA=JCC0RE{MA)-5 . MB=KA-5 MC=J70SUP(JCSPTR, l.JCRORCCl) M2=KC*7 L(2I=JCENUH-JCC0RE(M2) RETRIEVE POINTER AND STATUS FLAG CALL FEtCH( JCCORE(MA),L,D,P,L,JCCORElMC),0,l) 1F10(1).NE.0)G0 TO < TRACE CHAIN H1=1-JCR0RC HF=J70SUP(JCSPTR,l,Ml,0,2) «D=C{3J HE=MF+7 P(l)=3 Pl5)=JCR0RC*l PC8)=.^-JCR0RC EXAMINE ELEMENT 1 IFID(2).EQ.0)G0 TO 3 H3=D(2) CALL FRKCEL(JCC0RE(HB),M3,D,P,1) IF«D(1).NE.0)G0 TO 1 IF(JCHGOE.EQ.O)GO TO 11 Hl=JCMOCE CALL J5C0HP(JCCGRE(MB),M3, LION, LOCAL, HI, M2,l) IF(M2.EQ.0)G0 TO 1 11 M0=H0+JCSENS L(2)=D{3)-JCCORE(M£) 0J1)=0 CALL FETCHUCC0RE(MA),L,0,C,L,JCC0REIMF),0,2) 0(l) = Da)+JCSENS L(2)=0 IF(0(1).GE.0)G0 TO 2 0(l)=0 CALL SYSERRa,D(3») 2 CALL ST0RE(JCC0RE(KA),L,D,C,L,JCC0RE(HF),1) GO TO 1 SET CHAIN COUNT 3 IF(PD.GE.O>GO TO 31 H0=0 CALL SYSERR(2,JCENUM) 31 L(2)=0 ,. ,. CALL ST0RE(JCC0REtMA),L,MD,C,L,JCC0RE(MC),2) EXIT 4 CALL SYSEXT RETURN END
PAGE 312
.300 c c • C • SIMCPY • c ••"• c C PURPOSE C SIMCPY TRANSFERS DATA FROM ONE ORDINATE TO ANOTHER PARALLEL C ORDINATE. C C CALL SIHCPY(JCSPTR,JCSNUM,JCRNUM,JCRORC,LOCALSiLOCALR, C JCFINE.JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = THE ADDRESS OF THE SIMBL C JCSNUM = THE NUMBER OF THE SOURCE ORDINATE C JCRNUM = THE .NUMBER OF THE RECEIVER ORDINATE C JCRORC = FOR ROW, 1 FOR COLUMN AND 2 FOR BOTH ROW AND C COLUMN C LOCALS = THE LOCAL VECTOR FOR THE SOURCE C LOCALR = THE LOCAL VECTOR FOR THE RECEIVER C JCFINE = THE FINE VECTOR FOR THE RECEIVER C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C SIMCPY CAN TRANSFER UP TO 15 DATA ITEMS AT A TIME. THE C LOCAL VECTORS SHOULD NOT SPECIFY MORE THAN 15 DATA ITEMS. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C J70SUP C STORE C SYSENT C SYSEXT C C ERROR COOES FOR THIS PROGRAM C NONE C C KETHOO C SELF-EXPLANATORY C c «••••••••• SUBROUTINE S IMCPYI JCSPTR, JCSNUM, JCRNUM, JCRORC, LOCALS, LOCALR , 1 JCFINE.JCCLNO) COKKON/ALLOC/jCCOREdJ ,^,.^.,. DIMENSION S(2),R(4).Da5),L0CALS(l),L0CALR(l),JCFINEa) INTEGER S,R,0 DATA S/1^0/,R/3, 0,1,0/ C ENTER CALL SYSENT<1,3.2,2,JCCLN0J C MAxADCRESS OF SPUR FOR ORDINATE Ml=JCSPTR+2 MA=JCC0RE{Ml)-5 C HB^ROW/COLUMN INDICATOR HB=iJCRGRC-2 •( JCRORC/ 2 t
PAGE 313
'3 01 C HC'ADCRESS OF LOAC FOR SOURCE 1 MC=J70SUP(JCSPTR,JCSNUM,MB,0,l) c s M1»^'C7 S«2)*l-JCC0RE(H1) C MD=ADORESS OF LOAD FOR RECEIVER M0=J70SUPIJCSPTR,JCRNUM,MB,0,2) C R IF(JCC0RE(M1J.NE.-1)G0 TO 2 ME«1 RI2t=jCRNUM GO TO 3 2 ME=3 Ml=H0*7 Rt4)=l-JCC0RE(M1) C MF=LIMIT 3 Ml=KC*8 MF=JCCCREJMl) C DATA TRANSFER 00 4 I^l.HF CALL FeTCH(JCCORE(MA),StD, LOCALS, S,JCCORE(MC)fOfl) CALL STGRElJCCORE(MA),R
PAGE 314
3 02 C €•••• •.»».» •••••••••«••»•• • »• C •.».» C • SIMDUP • c •••• c C PURPOSE C SIMDUP DUPLICATES THE CONTEfJTS OF ONE ORDINATE IN A SECOND C PARALLEL ORDINATE. C C USAGE C CALL SIHOUP(JCSPTRf JCMSTRtJCDUPLf JCRORCtJCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = THE ADDRESS OF THE SIHBL C JCMSTR = CATALOGUE ENTRY NUMBER OF THE MASTER ORDINATE C JCOUPL = CATALOGUE ENTRY NUMBER OF THE ORDINATE TO RECEIVE C THE CONTENTS OF THE MASTER C JCRORC = FOR VERTICAL AND 1 FOR HORIZONTAL OROINATES C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C J70SUP C NEWCEL C RETURN C STORE C SYSENT C SYSEXT C TOCELL C C ERROR COOES FOR THIS PROGRAM C NONE C C METHOD C SIMDUP DUPLICATES THE CONTENTS OF EACH MASTER ORDINATE C SEGMENT IN THE CORRESPONDING DUPLICATE ORDINATE SEGMENT. C DATA TRANSFER IS WORD FUR WORD. C Q •••••»«!>»» c SUBROUTINE SIMDUPC JCSPTR, JCMSTR, JCDUPL tJCRORCf JCCLNO) COHMCN/ALLOC/JCCORE( 1) 01 MENS I ON . H 1 4 ) , F ( 4 I , L ( 4 ) INTEGER W,F ' DATA H/l.l,l,l/,L/3. 0/1,1/ C ENTER CALL SYSENTM,3,2,3,JCCLNO) C SETTING UP PARAMETERS HA=JCSPTR*2 MA=JCC0RE(MA)-5 M8=J70SUPtJCSPTR,JCMSTR,JCR0RC.0,l) MC"J70SUPI JCSPTR, JCDUPL, JCRORC.O, 2) C ACCESS MASTER ORDINATE LI2I=JCMSTR
PAGE 315
303 CALL FETCH(JCCaRE{KA»,LfMl,W,W,JCCORE, JCCORE (Ml), F» 2) t JCCORE (M2)f2) RE-SET PRE-FILE PARAMETERS IN LOAD VECTORS JCC0RE{MD»=F<1) jCCCREJME)='Ft2) JCC0REIMF)=F(1) JCCCRE(MG)=F(2) JCCCREtMHJ^O JCC0RE{MI1=0 W(A)=l CALL FETCHC JCCORE t MA ),L,M I, W,F, JCCORE! MC), 0,3) L(2)=JC^STR CALL FETCHC JCCORE (MA), L, Ml. WfF, JCCORE (MB), 0,4) RETURN TEMPORARY STORAGE CALL RETURN! JCC0RE(MA),HJ,NJ,1) EXIT CALL SYSEXT
PAGE 316
3 04 RETURN END
PAGE 317
3 05 C .........o.. C«»B**>* ..»•. ••««.»..«»• • • c .*••• C • SIMEIN » C ..»•»••«»• c C PURPOSE C SIMEIN SETS ALL NON-UNITY ROW, COLUMN AND ELEMENT STATUS C FLAGS TO ZERO. C C USAGE C CALL SIMEIN(JCSPTR,JCCLNO» 'C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = ADCRESS OF THE SIMBL C JCCLNO = A USER ASSIGNED CALL STATEMENT 10. PARAMETER C i^ ftPM A RKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FRMCEL C STORE C SYSENT C SYSEXT C TOCELL C C ERROR CODES FOR THIS PROGRAM C NONE C . f METHOD r SIMEIN REINITIALIZES THE ROW AND COLUMN STATUS FLAGS FIRST. C EACH ROW IS TRACED. ALL ELEMENTS ENCOUNTERED Wl TH A STATUS C FLAG GREATER THAN UNITY ARE FITTED WITH ZERO FLAGS. C c SUBROUTINE SIME IN{ JCSPTR, JCCLNOJ COMMON/ALLOC/JCCORE( 1 J DIMENSION P(7),E(7),D(2),L{AJ INTEGER P,E,D „ , . „. DATA P/2, 6, 1,1, 5,1,1/, E/2, lilt l,5t I, l/,L/3, 1,1,0/ C ENTER CALL SYSENTdf 3t2f ^tJCCLNO) C SETTING UP PARAMETERS MA=JCSPTR*2 MA=JCC0REJHA)-5 MB=MA-5 Ml=l MC=J70SUP( JCSPTR, 1,1. 0,1) H2=HC*7 , H3=MC»8 L(4I=0 C RESET COLUMN STATUS FLAGS 1 CALL FETCH(JCC0RE(MA),HMU,0,P14),L,JCC0RE(HC),0,1) IF(Otl).GT.l)CALL ST0RE(JCC0RE(MA),L(3),LIA),P(4),L,JCC0RE(MC>,1» Ml=2
PAGE 318
3 06 IF(JCCaRE(M2).LT.JCCORE(H3))GO TO 1 C RESET PARAMETERS Hl=l HC=J70SUP{JCSPTR,l,0,0,2) M2=fC*7 M3=»HC*8 C RESET ROW STATUS FLAG 2 Call FETCH( JCC0RE(MA),L(Ml)tD,P,L,JCCORE(MCl,Ot2J 1F(DI2).GT.1)CALL STORE ( JCCORE (HA » ,L ( 3 ) ,L (4) ,P(4) ,L, JCCORE (MO ,2) Ml=2 C RESET ROW ELEMENT STATUS FLAG 3 IF(D(l».EQ.O)GO TO 4 M'V=D(1) CALL FRMC£L(JCCORE(MBJ,M'nO,Eil) IF(D(2).GT.1)CALL TOCELL( JCCORE(MB ) ,H4.L{4) ,E(4) ,1 ) GO TO 3 C LAST BOW * IFIJCC0RE(M2).LT.JCC0RE(H3))G0 TO 2 C EXIT CALL SYSEXT RETURN END
PAGE 319
307 C ...,o»« c •.»•.««.«««••••• • • c • C • SIHFUG • C • • C PURPOSE C SIHFLG SETS THE ORDINATE AND ELEMENT STATUS FLAGS TO A C SPECIFIED VALUE FOR A ROW OR A COLUMN. C C " CALL SlMFLG(JCSPTR,JCENUM,JCRORC,JCFLAG,JCMODE,JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = THE POINTER TO THE SIM8L C JCENUM = THE ORDINATE ENTRY NUMBER C JCRORC = FOR ROW AND I FOR COLUMN C JCFLAG = THE NEW FLAG VALUE C JCMODE = OR 1 AS RESPECTIVELY AN ELEMENT STATUS FLAG IS r ALWAYS RESET OR ONLY RESET IF THE STATUS FLAG C ORTHOGONAL TO JCRORC IS UNEQUAL TO THE CURRENT C ELEMENT STATUS FLAG C JCCLNO » A USER ASSIGNED CALL STATEMENT 10. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FRHCEL C J70SUP C STORE C SVSENT C SYSERR C SYSEXT C TOCELL C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERROR! DATA PROVIDED) C I NF ENTRY STATUS FLAG IS UNITY (ENTRY NUMBER) C C METHOD C NO UNITY STATUS FLAG IS ALTERED. C . c •• ^ SUBROUTINE S1MFLG( JCSPTRrJCENUM, JCRORC , JCFLAG, JCMOOE, JCCLNO) COHKGN/ALLOC/JCCORE( U DIMENSION L(2),D(3),P(10) INTEGER D,P DATA L/ 1,0/, P/ 2. 5, 1,1, 5, It 1,3, 1.1/ C ENTER CALL SYSENT(1,3,2,5,JCCLN0) C INITIALIiE SPUR POINTER HA=JCSPTR»2 MA=JCC0R£(MA)-5 C INITIALIZE L VECTOR MB=J70SUP< JCSPTR, 1,JCR0RC, 0,1) M2»M8»7
PAGE 320
308 L(2)=JCeNUM-JCC0RE«M2» M2=1-JCR0RC HC=J70SUP(JCSPTR,1,H2,0,2) M0=HC*7 HE=MA-5 SET ORDINATE ENTRY FLAG P(l)=2 P(2>=6 CALL FETCHC JCCORE(HA),LtO.PiLtJCCORE(HB),0,l) L(2)=0 IF(D(2).NE.1)G0 TO 1 CALL SYSERR(l.JCENUM) GO TO 2 1 CALL STORE( JCC0RE(HA),L,JCFLAG,P«4)iLtJCC0RE(MB)il) 2 1F(DII).GT.0)G0 TQ 3 GO TO 5 SET ELEMENT STATUS FLAGS 3 Pt2)=JCR0RC*l P(l)=2*JCHO0e P(a)=A-JCRORC 4 M1=0(1) CALL FRHCEL(JCCORECME),Ml,0,Ptl) IF(jCMaCE.EQ.O)GD TO 41 L(2)=0{3)-JCCORE(MC) CALL FETCHt jCC0RE(MA),L,M2,P(4),L,JCC0RE«HC)f0t2> IFlH2.EQ.0(2))D(2)=l , , 41 IF(C(2>.NE.l)CALL TOCELLC JCCORE(ME ) ,M1 , JCFLAG,P(4) , l> IF{C(1).GT.0)G0 TO 4 EXIT 5 CALL SYSEXT RETURN END
PAGE 321
309 C ,,, c •««.«••«»•••• ••» Q • SIHGEN • c C PURPOSE C SIMGEN GENERATES AN SIM FOR A SPECIFIED GENDER GROUP. C C USAGE C CALL SIMGENJJCGRUP.JCSPTRf JCCLNO) c C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS Q JCGRUP = THE ADDRESS OF THE GENDER GROUP C JCSPTR = THE ADDRESS OF THE SIHSL C JCCLNO = A USER SPECIFIED CALL STATEMENT ID. NUMBER c C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FRMCEL C J7B0CY C J7ICCM C J70SUP C J7VARI C NEWCEL C NEXT C POPUP C TOCELL C SYSENT C SYSERR C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERROS{OATA PROVIDED) r 1 F NO GROUP BODY NOT PROTECTED (ADDRESS OF GROUP) r 2 NF NO GROUP BODY PROTECTED (ADDRESS OF GROUP) C 3 NF JCGRUP NOT FOUND BY POST SET-UP TRACE (JCGRUP) c C F£THCO f SIMGEN INCLUDES IN THE SIM EACH ER, FUNCTION, CONSTRAINT C AND PROTECTED GROUP ENCOUNTERED IN THE GROUP BODY OF C JCGRUP. ALL GROUP BODY INSERTS ARE IGNORED, BUT OTHERWISE C THERE IS A CNE TO ONE CORRESPONDENCE OF SIM ROWS TO GROUP C BODY ENTRIES. DIMENSIONED ENTRIES ARE PLACED IN THE SIM r WITH INDICES VALUED AT THEIR MINIMUMS. GROUP BODY ENTRIES C WITH PROTECTED GROUPS ARE INSPECTED OVER THE ENTIRE INDEX C . RANGE DURING SIM CONSTRUCTION. ALL ENTRIES ARE INSPECTED C OVER THE ENTIRE INDEX RANGE DURING THE POST SET-UP TRACE. C c c SUBROUTINE S IMGEN( JCGRUP, JCSPTR, JCCLNO ) COMfCN/ ALLOC/ JCCORE ( I ) DIfEKSICN G(10),F(AI,S(A),T(4),D(8),L(5),0(2),RC7) INTEGER G,F,S,T,D,0,R ^ .. ,„ ^ « „. DATA G/3,3,2,2,7,l,A,A,l,l/,F/l,3,l,l/,S/l,8,l,l/,T/l,6,0,0/, 1 D/0,0,l,0,3,0,0,0/,L/5,0,0,Of l/,0/l,0/,R/2,7,l,l,9,l,l/
PAGE 322
310 ENTER CALL SYSENTtl,3i2,6,JCCLNO) PARAMETERS Kl*JCCCRE(l6)*l >'l=JCCCRE(Ml) M2=JCCCRE(17) R('») = JCCCRE'3-1 ME=ADCRESS OF SPUR FOR GROUP BODY M2=>'2+1 M3=^2+5 M3=JCCCRE(M3) ME=fl»5»CJCC0REJM2)+M3-l) TEST JCPOFP FOR SIM CALL FR^CEL(JCCCRE(HC)iJCGRUP.JCSPTR.S,l) IFIJCSPTR.GT.OGO TO 36 SET UP SPUR BLOCK IF(t^3.EC.b)M3=l Kl=K3+5 0C4)=Hl«5 CALL NEWCEL(C,M5,1) MF=AOCRESS OF SPUR BLOCK HF=K5*15 HG=t'F-5 MG = ACDRESS OF SPUR FOR ORDINATE INITIALIZE SPUR BLOCK H2=K5 M5=f4*2 00 I I=l»Hl JCCCRE(H2)=C«1) M2=f'2*l DC I J=2i5 JCCGREJI'2)=J2/J)»t I/Ml)»D(2)*(3/J)«(J/3) + (4/J)«(J/4)«(I+(l/n»32t 1 (2/I)»(I/2)»(JCC0RE(M5)+l)+t3/n»(I/3)»JCC0RE(M4)-3)+(J/5»»(3+ 2 (2/n«(I/2)) 1 M2=r'2+l C SET UP SIMBL M1=HF»10 CALL NEWCEL(JCC0RElMl),JCSPTRf2) CALL TCCELL
PAGE 323
311 HK-JCGRUP HL=0 MM=0 MJ=OEPTH MK»AOCRESS OF CURRENT LIST ENTRY HL=OVER-RICE INDICATOR MH»TEHPORARY LIST HEADCELL C GROUP 3 CALL FRHCELIJCC0RE(MC).MK,C,G,2» IF(«0(l)+CJ2)+ML).EQ.0)CALL SYSGRR (-1 t MK) IF{10(1)*HL).GT.D(2)»CALL SYSERR<2,MK) IF(f'L.GT.O)KL=MLtl IF{C(5).GT.0)MJ=D«5) IF«(ML.GT.O).OR.(«ML^D<1)).EC1.0))GO TO 4 C PROTECTED GROUP C MN=ROH NUMBER CALL J7BCDYlMCiPK,JCSPTRiHN.ltl) GO TO 6 C NOT PROTECTED GROUP OR AN INNER PROTECTED GROUP 4 IF(C(5).EC.0)G0 TO 6 Hl=5 5 M2=MK+HD CALL J7IC0M(MC,K2,f*Ff0t0,Ml,HJ,DtH3tl) 1F(»*3.EC.-UG0 TO 8 C NEXT LIST ENTRY 6 «I=MK D(l)=KJ 0(2)=MK MK=NEXr«JCC0REll6),Ml,D(6),l,MI,MM,D,4,l) IF(HI.GE.H2)G0 TO 10 C COMPLETE CURRENT GROUP MI=MJ-DH» HJ=C(1) M2=l 7 K3=5-K2 1F(C«M3).GT.0)CALL J7VARI ( MEtO(H3 J t JCSPTRi KN,H2,D,0,1) M2=K2*1 IF(t'2.EC.2)G0 TO 7 1F(CML»H1»MJ).EC.0)G0 TO 9 MK=CC2) GO TO 5 8 HK=K4 9 IF(t'L.GT.O)HL^HL-l lF(f I.EC.OGO TO H IFCCK.EC.OJGO TO 6 C TEST CROUP BODY LIST ENTRY FLAG 10 CALL FRKCEL{JCC0REtHE),MK,MI,F,3) IF(Hl.EC.l)GO TO 3 IF(f'l.NE.2)G0 TO 6 C FUNCTIONt ER OR CONSTRAINT Hl'2 IF(fL.GT.0)Hl=3 CALL J7eODY(ME,l'K,JCSPTRfMN,MIt2) GO TO 6 C PHASE 11 ELEMENTS C BEGIN WITH LAST ENTRY ON VERTICAL ORDINATEC MO=ACCRESS OF LOAD VECTOR FOR ROW ORDINATE 11 MC»J70SUP(JCSPTRf IfOfOf I)
PAGE 324
312 KEY=0{6) Hl=f0*7 0(2»=MN-JCC0RE(M1J GC6)=« C ACCESS ROW ORCINATE ENTRY 12 CALL FETCH(JCCORE(KG),0fHl,S,F,JCCORE(MO),0,l) 0«2)=0 1F(M1.GT.2)G0 TO 13 C FUNCTION, ER OR CONSTRAINT CALL J7eODY(MC,0,JCSPTR,HN,5,3) GO TO 22 C GROUP ON SIM 13 CALL FETCH( JCCORE(KG),I,D,R,F,JCCOREtMOI,C,2l KK=C(2J HJ=0 C PREPARE FOR TRACE 14 IF'I.G£.H2)G0 TO 21 C DECREASE IN LEVEL M1=PJ-C(1J MJ=Cll) IF((NJ«f
PAGE 325
313 ACCESS GENDER GROUP M1=JCCCRE(16» HK=JCCCRE(Hl) M1=K1*2 MJ=«0 G(6)=2 D(8)=JCC0RE(M1)*1 IF(KEY.E(3.0(8))C<8) = 018)*1 DESTROY REMNANTS OF TEMPORARY LIST KB=KB-10 23 IFtfM.EC.OJGO TO 2A . CALL P0PUP(JCCORE«MB),MH,MM,Ml,T,l,2) IFIMl.GT.OCALL RETURN( JCCORE( MA ),MlfOt 2) GO TO 23 NEXT LIST ENTRY 24 Hl=PK M2=MI 0(A)=HJ 0(7)=MK MK=NEXT(JCC0RE116),H1,0(8),1,HI,MM,D(A),4,3) IF(NI.GE.M2)G0 TO 29 DECREASE IN LEVEL 25 Ml=f«J-0(4) MJ=D(4) H2=6 26 IF(C(M2J.GT.0)CALL J7VARI{ME,D(H3) , JCSPTR,0,6,D,0t2 J M2=N2-l IF(K:2.EC.5)G0 to 26 IFCfl.EC.OJGO TO 28 Ml=-5 H4=MK MK=CC7) GO TO 31 27 HK=K4 28 IFJfL.GT.OGO TO 33 IF((MK+yM).EQ.O)GO TO 34 TEST FLAG 29 CALL FR^CEHJCC0RE(WE),MK,M1,F,61 IFiMl.EC.UGO TO 30 IF(F1.NE.2)G0 TO 24 FUNCTION, ER OR CONSTRAINT CALL J7B0DY(ME,MK,JCSPTR,0,6,5I GO TO 24 GROUP 30 IFlfK.EC.JCGRUPlGO TO 32 . CALL FRfCEL(JCCCRE(HC),MK,D(5),G(4),7) IFJC17).EC.0)G0 TO 24 INDICES MJ=D17J Ml = 5 31 M2=KK*MD CALL J7ICOMIMC,H2,MF,0,0,M1,HJ,0,H3,3) 1FJK3.EQ.-1)G0 TO 27 IFJML.GT.OGO TO 25 JCPOFP FOUND 32 MB=KB*10 T(4)=T(4)+6 HL=1 REMOVE HEAOCELL 33 IF(^M.EC.OIGO TO 35 CALL PCPUP(JCC0RE(HB),MM,MM,0,T,1,3» H1=0
PAGE 326
314 IF(CCl).GT.O)CALL RETURN! JCCORE (MA J ,0( I) ,Ml ,3) 60 TO 25 C ERROR 34 CALL SVSERROf JCGRUP) C SET KEY 35 H1=JCCCREH6)>2 JCCCRE(M1)=C(3) C EXIT 36 CALL SYSEXT RETURN END
PAGE 327
.315 C c C • SIHINT • f ••••»»»»•• C C PURPOSE C SIMINT INTERCHANGES TWO PARAtLEL ORDINATE VECTORS. C C CALL SIMINT(JCSPTR,JC0NOO,JCaNOT,JCRORCtJCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = THE POINTER TO THE SIM3L C JCONOO = THE NUMBER OF ONE ON THE ORDINATES C JCONOT = THE NUMBER OF THE OTHER ORDINATE C JCRORC = FOR ROW OR 1 FOR COLUMN C JCCLNO = A USER ASSIGNED CALL STATEMENT 10. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME HACHINESt C REPLACE THE 1 IN ThE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C J70SUP C SYSENT C SYSEXT C C ERROR COOES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C c .«.•••».« c SUBROUTINE SIMINT ( JCSPTR, JCONOO, JCONOT, JCRORC, JCCLNO) COMKON/ALLOC/JCCORE(l» C ENTER CALL SYSENT(l,3,2,7,JCCLNO) C OBTAIN ADDRESSES MZ = 1 MY=»1 00 I 1=1,2 Ml=jCCNC0+I-2 HA=J70SUP( JCSPTR, Ml, JCRORC, MZ, n Ml=JC0N0T+I-2 M2=I+2 MB= J70SUP( JCSPTR, Ml, JCRORC, MY, M2) C PERFORM INTERCHANGE JCCORE(MZ)=MB I JCCORE(MY)=MA C EXIT CALL SYSEXT RETURN END
PAGE 328
316 C .,.,„•.. €•«•••• • • ' ••• C ••••• C • SIMOPT • c •• •• c C PURPOSE C SIHOPT RECORDS OR ERASES AN OUTPUT ASSIGNMENT IN BOTH THE C HORIZONTAL AND VERTICAL OROINATES. C C USAGE C CALL SIMOPTtJCSPTRf JCRNUM.JCCNUM.JCSENStJCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = THE POINTER TO THE SIMBL C JCRNUH = THE ROW NUMBER C JCCNUM = THE COLUMN NUMBER C JCSENS = +N TO ASSIGN OUTPUT OR -I TO ERASE OUTPUT. N = I C OR 2 AS COUNT INITIALIZATION IS OR I S NOT DESIRED, C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C RFMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C J70TPT C SYSENT C SYSEXT C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C c • • SUBROUTINE SIHOPTI JCSPTR, JCRNUM, JCCNUM, JCSENS, JCCLNO) C ENTER CALL SYSENTd, 3,2,8, JCCLNO) C SERVICE ROW IFCJCRNUM.GT.OICALL J70TPT ( JCSPTR, JCRNUM,0, JCSENS, JCCNUM, 1 ) C SERVICE COLUMN IF(JCCNUM.GT.O)CALL J70TPT ( JCSPTR, JCCNUM, 1 .JCSENS, JCRNUM, 2) C EXIT CALL SYSEXT RETURN END
PAGE 329
317 C r »«««•»•••» C • SIMRTV • c • "••• c C PURPOSE C SIHRTV SETS THE ELEMENT STATUS FLAGS OF TEAR VARIABLES TO C THREE. C C USAGE C CALL SIMRTV(JCGRUP,JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCGRUP = ABSOLUTE ADDRESS OF GENDER GROUP C JCCLNO = A USER ASSIGNED CALL STATEMENT 10. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C FIND C FRMCEL C J7L0CV C STORE C SYSENT C SYSERR C SYSEXT C TCCELL C C ERROR COCES FOR THIS PROGRAM C CODE FATAL ERROR(DATA PROVIDED) C 1 NF NO SIM IJCGRUP) C 2 NF NO TEAR VARIABLES (JCGRUP) C 3 NF TEAR VARIABLE NOT FOUND (VARIABLE CODE NAME) C C SIMRTV TRACES THE TEAR VARIABLE LIST OF JCGRUP. EXCEPT FOR C THE ELEMENT REPRESENTING A TEAR VARIABLE AS AN OUTPUT, ALL C TEAR VARIABLE ELEMENTS ARE FITTED WITH STATUS FLAGS OF 3. C C ••.».«.«•• c SUBROUTINE SlMRTV( JCGRUP, JCCLNO) COKf'CN/ALLOC/JCC0Re( I) DIKENSICN 0{3),V(3),G(17),P(4).N(7),E(10),L(3),0(4) INTEGER C,V,G,PfE,0 . , ,. .,,-, -, i , o DATA G/3,l,Ul,2,l,l,2l,l,l,2,7,3,3,8,l,l/,P/l,6,l,l/,N/2,7,I,l,9, I l,l/,£/3,2,I,l,5,l,l,3,l,l/,L/l,l,0/,0/l,l3,l,l/ C ENTER CALL SYSENT(1,3,2,9,JCCLN0) Q SETTING UP REQUIRED PARAMETERS MA=JCCCRE(l6)+l Ml=JCCCREri7)t8 HA=JCC0RE(MA) + 5«(JCC0RE{M1)-Ir) C ACCESS GROUP CALL FRMCEL (JCCORE( MA), JCGRUP, V,G( 11), I) Ml = l
PAGE 330
318 lF(Vt2).EQ.0)G0 TO 9 m=2 IF(VC1).BO.O)GO TO 9 GC15)=1 GC16JS3 ; ACCESS SIM8L Hl=Vt2)*2 HB=JCCCRE(Ml)-5 HC=KB-5 MC=V«2) HE=J70SUPlMC»l,li0il) M2=2 C ""^''E*^ SECURE WORKING AREA FOR INDEX CALCULATIONS M5=JCCCRE(17)+14 KL=0 IFUCC0RE(M5).EC.O)GO TO 1 MK=»H8*5«JCC0RE( M5) +10 CALL NEWCEL(JCC0REIHK),ML,1) HH=»'L*l C WN=f'L+2 RETRIEVE DATA FROM TEAR VARIABLE LIST ENTRY 1 M<»=V(l) CALL FRKCEL(JCC0RE(MA),MA,V,6,2» IFCV(2».NE.0)GO TO 8 C SCALAR VARIABLE CALL FIND»JCC0RECMB),L(M2),V(2),N,N,JCC0RE»ME),M5,1) 2 H2=l IF(P5.NE.0)G0 TO ^ 3 CALL SYSERR{3.V(3)I GO TO 7 C ACCESS OUTPUT 4 V(2)=?0 CALL%ETCH(JCCORElJ'B),Ll2)tVt2),0,L,JCCORE{ME),0,H H3'4 r TRACE ELEMENTS IN COLUMN CALL FETCH(JCC0RE(M8),L(2).0,PtL,JCC0RElHE),0t2) 6 lF(Ca).EG.0)GO TO 7 C EXTRACT DATA FROM ELEMENT M5=C(1) . CALL FRKCEL{JCC0RE(HC)iM5,D,E,3) IF{c!3)!NE*.V(2)icALL TOCELLUCCQRE -l . ., .. CALL FRHCEL(JCCCRE(fK),M4,JCC0RE(MN),G(14),A) JLOCATE DIH£NSI0NED VARIABLE CALL J7LCCV(MD,L(H2).MK,M5,MF,1) GO TO 2
PAGE 331
319 C NO SIH OR OUTPUT LIST 9 CALL SYSERR(M1,JCGRUP) C EXIT 10 CALL SYSEXT RETURN END
PAGE 332
320 C c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c c J7B00Y • PURPOSE J7BO0Y HANDLES ER'Sf FUNCTIONS AND CONSTRAINTS WITH RESPECT TO SIH GENERATION. USAGE CALL J7B0DYJJCSPRG,JCP0FP,JCSPTR,JCR0WN,JCM00E,JCCLN0> CATA FORMAT N/A JCPOFP JCSPTR JCROWN JCHODE ETC.) DESCRIPTION OF PARAMETERS JCSPRG = THE ADDRESS OF THE SPUR FOR GENDER THE ADDRESS OF THE ENTRY
PAGE 333
321 CALL SYSENT(lt3t2,lO,JCCLNO) 0U)=0 DC2)=JCP0FP 0(3)«3 D(4l=0 0(5)«=0 D(&}»1 PARAMETERS FOR SECEDE Ml=JCC0RE(l5)*l HAA=JCCORE(Mll Ml=Pl*l MAB=JCCGRE(M1) m = HABt28 JCCORE(Ml)=-l MA=AODRESS OF SPUR BLOCK Ml=JCSPTR+2 MA=JCCORE(Ml) MB=ADCRESS OF SPUR FOR ORDINATE MS=MA-5 HC=0 IF((JCMODE.GT.2).AND.(JCM0DE.NE.5))GO TO I MO=AODRESS OF LOAD VECTOR FOR ORDINATE HC»l MD=J70SUP(JCSPTR,l,Of0.l) H2=K0+7 IF(JCM00E.EQ.5)G0 TO 31 HE=3 MI=HD*1A IF(JCCORE(Hl).EQ.-l)ME=l M1=K0*8 L(4)=JCC0RE(Ml)-JCC0RE(M2)»l Ml = JCCCRE(l7)H8 F12)=JCC0RE(MI) MODE FOR J7VARI CALL 1 MH=JCMOCEtl DATA MI=5-4»«1/JCH0DE) CALL FRMCELIJCC0REJJCSPRG),JCP0FP,D,G»M1),I) DIMENSION CHECK IF(D<1).GT.O)GO TO 2 GO TO (5»5,8,6,6l,8>f JCMODE INDICES 2 Ml=JCCOREll7)+9-(l/JCMO0E) HI=JCPOFP+JCCORE(Ml) M2=A+1/JCM0CE 3 CALL J7ICOM(JCSPRG,HI,HA,MC,2tH2,D(l)tL,Hl,l) IF(Ml,NE.l)GO TO 9 GO TO K,4,8,6,61,e)iJCM00E ACCESS ROW ORDINATE 31 MH=5 L(4)=JCR0WN-JCC0RE«M2> CALL FETCH(JCC0REtMB)iL«3),D,R.F,JCC0REtMD),0tl) Hl=0 IF(0(1).EQ.O)GO TO 61 MZ=l M1=D(2) 012)=JCCORE(M1) M2=JCC0RE(l6)+8 M3=JCCORE(M2) JCC0REtM2)=Ml*2 GO TO 61 ADD TO ORDINATE
PAGE 334
322 4 IF(JCH0DE.eQ.l)D(2)=JCP0FP JCC0RE«KC)=0(2» Ml=HC*l JCCORE(Ml)=0(l) 0(1)=1 0(2»=MC 5 D(3)=(U<3)+2)/3+2»(2-JCMODE» IF(C(4).EQ.1)D(6)=0 M1=D(5) D(5J=l/JCMaDE . CALL STORE( JCCORE(MB),LlME),0,R,F,JCCOREtMD).l) JCR0WN=JCC0RE(H2) IF(JCM0DE.EQ.1)G0 TO 9 IF«C(1>.EQ.1)0(2)=JCC0RE(MC) 0(5)=Ml GO TO a ACCESS FUNCTION IN SECEDE 6 IF(M2.LT.0)G0 TO 7 61 HI==JCC0RE«l7)*6 MI=JCCaR6(Ml) S(2)=D(2)/M1 S«4)=0(2)-S(2)»M1 HS=S(2) S<2)=S(2)t4 S(3)=D(3)+6 7 CALL FETCH{JCC0RE(MAA),S,0(5),P,F,JCC0RE(MA8),0,2) J7VARI CALL IF(b(5).EQ.0)G0 TO 9 CALL J7VARI(«AA,0(5),JCSPTR,JCROWN,HH,MAB,MS,l) 1F((JCM0DE«MZ).EQ.5)JCC0RE(M2)=M3 MZ=0 GO TO 9 8 IF{Ot5).EQ.0)GO TO 9 CALL J7VAR1(JCSPRG,D(5),JCSPTR,JCR0WN,MH,MAB,HS,2) IF{JCMCDE.LE.2)G0 TO 9 ITERATE H2=-^IF(0(1).GT.0)G0 TO 3 EXIT 9 CALL SYSEXT RETURN END
PAGE 335
323 C c>«««**»« • • ...»•».• .»••••.•«».•...• c ••» C • J7C0MV • c C PURPOSE C J7C0MV CHECKS A VARIABLE FOR POSSESSING A COMMON VARIABLE C CECLARATION. C C USAGE C CALL J7C0MV«JCSPURiJCVNAM,JCL0A0,JCCLN0) c C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPUR = THE ADDRESS OF THE SPUR FOR SECEDE C JCVNAM = THE VARIABLE NAME. IF THE VARIABLE IS FOUND TO BE C COMMONt UPON RETURN JCVNAM WILL CONTAIN THE NAME C OF THE COMMON VARIABLE. C JCLOAD = THE ADDRESS OF THE LOAD FOR SECEDE C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINESt C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C SYSENT C SYSEXT C C ERROR CODES FOR THIS PROGRAM C NONE C c Mrrnco ^ C SELF-EXPLANATORY c c SUBROUTINE J7C0MV( JCSPUR, JCVNAM, JCLOAD, JCCLNOl COMMCN/ALLOC/JCCORE( 1 ) DIMENSION PCtJ.VC^J.LIS) INTEGER P,V,D DATA P/l,l,l,l/,V/l,l,2,2/,L/5,0,l,l,0/ C ENTER CALL SYSENT(l,3,2,ll,JCCLNO) C SETTING UP LISTER VECTOR Hl=JCL0AD+28 JCC0RE(M1)=-1 M1=JCC0RE(17)*6 HI=JCCCRE(HI) . L(2»=JCVNAM/Ml IF(L(2).EQ.0)G0 TO 104 LC5»=JCVNAM-Ml»L(2) LC2)'=L(2)*4 C RETRIEVE NAME Of^ COMMON VARIABLE CALL FETCHIJCCOREJ JCSPUR), L,M2,P,L,JCC0RE(JCL0AD), 0,1) " H5)=M2 CALL FETCH(JCCORE( JCSPUR), L(4),M2,V,L,JCC0RE(JCL0AD), 0,2) IFJM2.GT.0)JCVNAM=M2
PAGE 336
C EXIT 104 CALL SYSEXt RETURN END 324
PAGE 337
325 • J7IC0M » PURPOSE J7IC0M PERFORMS INDEX COMPUTATIONS. USAGE CALL J7IC0H(JCSPURiJCP0FP,JCSPBL,JCPOSP,JCSKIP,JCMOOE, JCDIMSiJCLOAD.JCSORF.JCCLNO) DATA FORMAT N/A DESCRIPTION JCSPUR = JCPOFP = JCSPBL JCPOSP JCSKIP JCHOOE JCOIHS JCLOAO JCSORF JCCLNO OF PARAMETERS THE ADDRESS OF THE SPUR FOR SECEDE IF JCPOFP = N, OR FOR GENDER LIST OTHERWISE THE NUMBER OF WORDS TO PROGRESS IF DIMENSIONED ENTITY IS IN SECEDEf OR JCPOFP IS THE POINTER TO A GENDER LIST COMPONENT INDICES THE ADOKESS OF THE SPUR BLOCK THE ADDRESS OF THE STORAGE LOCATION FOR THE INDICES. IF JCPOSP IS PASSED AS I, STORAGE WILL BE AUTOMATICALLY PROVIDED. IF JCPOSP IS PASSED AS 0, THE OPTION OF JCPOSP POINTING TO INDEX STORAGE IS WAIVED. THE NUMBER OF WORDS OF JCPOSP TO SKIP BEFORE COMMENCING INDEX STORAGE AN INTEGER EQUAL IN MAGNITUDE OF 1 THROUGH 5 AS RESPECTIVELY THE INDICES TO BE COMPUTED REFER TO A VARIABLE (REMOTE). A VARIABLE (LIST), A FUNCTION (REMOTE), A FUNCTION (LIST) OR A GROUP. IF JCMODE IS NEGATIVE, INCREMENTING THE CURRENT INDEX SET BY 1 IS INDICATED. IF POSITIVE, JCMODE INDICATES THE COMPUTATION OF THE MINIMUM, CURRENT (ECiUAL TO THE MINIMUM) AND MAXIMUM OF EACH INDEX IS DESIRED. THE DIMENSIONALITY OF A VARIABLE OR FUNCTION, OR THE DEPTH (SEE REMARKS) OF A GKOUP THE ADDRESS OF THE LOAD VECTOR FOR SECEDE REFERENCING THE INDICES 1 OR -1 AS RESPECTIVELY THE FIRST INDEX IS WITHIN ITS MAXIMUM LIMIT A USER ASSIGNED CALL STATEMENT ID. PARAMETER REMARKS THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, REPLACE THE 1 IN THE NAMED COMMON STATEMENT. THE DEPTH OF A GROUP DIFFERS FROM ITS LEVEL IN THAT PARENT CROUPS NOT INDEXED CO NOT ENTER INTO DETERMINING A GROUP'S DEPTH. USE THE FUNCTION MODE FOR VARIABLES POSSESSING MINIMUM AND MAXIMUM LIMITS (AS SELF-MAPPING IS ALLOWED). SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED FETCH FRHCEL NEWCEL RETURN SYSENT SYSEXT
PAGE 338
326 C C ERROR COOES FOR THIS PROGRAM C NONE C C HETHCO C J7IC0M EMPLOYS THE INDEX STORAGE VECTORS PROVIDED BY CUDGEL C FOR THE GENDER LIST. JCLQAO MUST REFER TO THE BEGINNING OF C THE FILE-STORED INDICES. J7IC0H EMPLOYS A LISTER OF (l.N) C INITIALLY AND (1,1) THEREAFTER. C r •••»•»»•»• SUBROUTINE J7IC0M( JCSPUR, JCPOFP, JCSPBL, JCPOSPt JCSKIP, JCMOOE . 1 JCOIMSf JCLOADt JCSORF.JCCLNO) COMMON/ALLOC/JCCOREI I > DIMENSION D(7),G(22),L(2),P(3,A) INTEGER OtGtP DATA G/7,9,l,l,10,l,l,llf Itlfl2,ltlfl3,l,l,14,l,l,15,l,l/.L/1,0/ C ENTER CALL SYSENT(1.3,2,12,JCCLNO) C PARAMETERS Ml=JCCQREll6)+2 00 I I=lr2 H2=5-I DO 1 J=lt.M2 M1=MI*1 1 P{I,J)=JCCORElMl) Ml=P(lf4)*JC0IMS-I IF(JCM0CE.EQ.5)JCC0RE(M1)=JCP0FP MA=1 H8=0 L(2)=JCP0FP C MODE MC=JCCIMS MD=IA8S(JCMO0E) IFtHD.E0.5)MC=l MC=JCSPBL+5*tMC*JCSKIP-l) ME=JCPOSP ^r.. . IFl(JCPOSP.EQ.n.OR.l(MD.LE.2).AND.«JCPOSP.LE.0)))CALL NEWCELI 1 JCC0RE«MC),ME,1) IF( JCOIMS.EC.OGO TO 11 P(3t2)=ME*JCSKlP MF = 3 IFIND.LE.2JG0 TO 2 MF=2 IF(M0.EC.5)MF=l IF(JCMODE.GT.0)GO TO 2 C INCREMENT JCSORF=-l DO 101 I=lt JCOIMS IFtJCSORF.EO.DGO TO 101 M1=JCDIMS-I M2=P(MF,2)*Ml M1=P(MF,3)+Ml JCS0RF=1 JCC0R£IM2)=JCC0RE(M2)+1 IF(JCCCRE{H2).LE.JCC0RE(M1))G0 TO 101 JCS0RF=-1 MA=I MB=l 101 CONTINUE C MODE
PAGE 339
327 IF(MB.EC.O)GO TO 11 IF(JCSORF.GT.O)GO TO 2 RETURN ME 1F((JCPOSP.E0.1).OR.IIMO.LE.2».AND.(JCPOSP.LE.O)))CALL RETURN( 1 JCCORE(MC)tME,Me,l) GO TO 13 MIN, CURRENT AND MAX 2 DO 10 I=MAi JCDIMS Hl = 2 3 GO TO (4,5,4»5,7),M0 REMOTE * CALL FETCH(JCCORE(JCSPUR)fLiDtG,L,JCCORE«JCLOAD)tO,l) L(2)=l 60 TO 8 LIST 5 M2=JCP0FP*2*I-l+Ml/3 6 CALL FRKCEL(JCCQRE{JCSPURt,M2,D,G,l) GO TO 3 GROUP 7 H2=P(l,A)*I-l M2=JCCORE(H2)*Ml/3 GO TO 6 CURRENT OR MAX B IF(D(1).EQ.0)G0 TO 9 H2=C(1)+(0(1)/3)»(HF-D{1)) ,, ,, Ol7)=((-l)*»D('t))»(P
PAGE 340
328 C c»«»» • • ..•«...».».•. C • J7L00V • Q »»•••««•»• C C PURPOSE C J7L0DV SEARCHES AN ORDINATE FOR A DIMENSIONED VARIABLE. C C USAGE C CALL J7L0DVIJCSPTR, LISTER, MASTER, INDICJCORON.JCCLNo) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = THE ADDRESS OF THE SIMBL C LISTER = SEE C4ADRS DOCUMENTATION. RESTRICTED TO LISTERJl) C E«UAL TO I. C MASTER ' ADDRESS OF THE BLOCK OF WORDS CONTAINING VARIABLE C NAME, DIMENSION AND INDICES. C INDIC = 1 FOR SUCCESS AND FOR FAILURE OF THE SEARCH C JCORCN = THE ADDRESS OF THE ORDINATE LOAD VECTOR C JCCLNO = A USER ASSIGNED CALL STATEMENT lOi PARAMETER C C REMARKS C . THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C ' FETCH C FIND C SYSENT C SYSEXT C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C SUBROUTINE J7L0DV( JCSPTR, L I STER, MASTER , INDIC, JCORDN.JCCLNOJ COMMON/ALLOC/jCCOREd) DIMENSION L1STER(2»,L(7) DATA L/l»7,Ul,9,l,l/ ENTER CALL SYSENTtl,3,2,13,JCCLNO) HA=JCSPTR*2 MA=JCC0RE(MA)-5 INDIC=0 MB=0 Hl=JC0RDN*7 M2=JCC0RE(MU FIND A DIMENSIONED VARIABLE 1 HB=MBtl 2 CALL FIND(JCC0REJMA),LISTER,LjL,L,JCC0RE(JC0RDN),M8,l) IF(KB.NE.O)GO TO 3 LISTER(2)=M2-JCCORE(Hl»-l IFiMB.EC.DGO TO 1 GO TO 5
PAGE 341
329 COMPARE INDICES LISTER(2»=0 CALL FETCHiJCCOREIMAJ.LISTER.Ma.LCHfL.JCCOREtJCORONI.O.l) LISTER(2)=3-2»MB IF(H3.LE.0>G0 TO 2 M<»=HASTER*l M'r = JCC0RE(H4) H5=0 H6=MASTER 00 ^ 1 = 1, M'r IF{M.5.GT.0)G0 TO 4 IFCJCC0RE{M3).NE.JCC0REtM6)»M5'=l H3=M3tl M5=H6»l CONTINUE IF(M5.GT.0)G0 TO 2 EXIT IN0IC=1 CALL SYSEXT RETURN END
PAGE 342
330 C c • • • ..•••• .••••••» c C • J70SUP • c ••• c C PURPOSE C J70SUP ESTABLISHES THE LOAD VECTOR FOR AN ORDINATE. C C USAGE C J70SUP(JCSPTR,JC0NUMf JCRORC,JCAOCE,JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = THE PUNTER TO THE SIHBL C JCONUM = THE ORDINATE NUMBER C JCRQRC = FOR ROW OR 1 FOR COLUMN C JCAOCE = THE ADDRESS OF THE CATALOGUE ENTRY OR IF THIS C VALUE IS NOT DESIRED C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST. FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C C4A0RS C NEWCEL C RETURN C SYSENT C SYSEXT C C ERROR COOES FOR THIS PROGRAM C NONE c C METHOD C THE ADDRESS OF THE LOAD VECTOR IS STORED IN THE CATALOGUE C WORD IMMEDIATELY FOLLOWING THE WORD APPROPRIATE TU ORDINATE C NUMBER JCONUM. J70SUP INITIALIZES THE X5TH AND 30TH WORDS C OF THE LOAD VECTOR. C r ••«»•••«•• C FUNCTION J70SUP(JCSPTR, JCONUM, JCRORC, JCAOCE, JCCLNO) COMMON/ ALLOC/JCCORE( 1 ) DIMENSION L(2),K(A) C ENTER CALL SYSENT(l,3,2,l't,JCCLNO) C ACQUIRE SPACE FOR LOAD VECTOR MA=JCSPTR*2 MA=JCC0RE(MA)-15 CALL NEWCEL{JCC0RE(MA),MB,1) C INITIALIZE LOAD VECTOR FOR CAADRS CALL HI=MB+29 JCCCR£(Ml)=JCSPTR-JCRORC*l M1=MB+I3 JCCORE(Ml)=l H1=MB*14 JCCCRE(M1)=1 C ACCESS LOAD VECTOR POINTER
PAGE 343
331 L(U = 2 tJ2)=JC0NUM»l MC=MA+10 CALL CAORSiJCCOREtHO.LiK.K.K.K.K.JCCOREtMBJ.O.l) H2=JCC0R£CHBJ 1F(JCA0CE.NE.0)JCA0CE=M2 IF(JCC0R£CM2).GT.0)G0 TO I C INSTALL JCCORE(MB) AS LOAD VECTOR JCC0RE(M2)=MB J7CSUP=HB JCCCRE
PAGE 344
332 C ,^..^ C»i>*****«>* ..«»• • ••».......»•.. •••» C • J70TPT • C ••• c C PURPOSE C J70TPT RECORDS OR ERASES AN OUTPUT ASSIGNMENT, C C USAGE C CALL J70TPT(JCSPTR,JCENUM,JCRORC,JCSENS,JCOTPT,JCCLNO» C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPTR = THE POINTER TO THE SIHBL C JCENUM = THE ORDINATE ENTRY NUMBER C JCRORC = FOR ROW OR 1 FOR COLUMN C JCSEnS = SEE SIMOPT C JCOTPT = OUTPUT ENTRY NUMBER C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED QY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FETCH C J70SUP C NEWCEL C RETURN C STORE C SYSENT C SYSERR C SYSEXT C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERRORtOATA PROVIDED) C I NF NEGATIVE NUMBER OF UNASSICNED OUTPUTS (ENT. NO) C 2 NF UNASSIGNEO OUTPUT COUNT GREATER THAN UNITY C (ENTRY NUMBER) r 3 NF OUTPUT DOES NOT MATCH JCOTPT I ENTRY NUMBER) C 4 NF JCOTPT NOT FOUND ON OUTPUT LIST (ENTRY NUMBER) C C METHOD C . SELF-EXPLANATORY C C ••»..•.»•• c SUBROUTINE J70TPT( JCSPTR, JCENUM, JCRORC, JCSENS, JCOTPT, JCCLNO) COMMON/ ALLOC/JCCOREI 1 ) DIMENSION C(4),0(7),0(.2),L<2) INTEGER CO.D DATA C/l»H,l,l/.0/2,I2,l,l,13,l,l/,L/l,0/ C ENTER CALL SYSENTd, 3,2, 15, JCCLNO) C INITIALIZE SPUR. POINTERS Ml=JCSPTR+2 Ml=JCCORE{Ml) HA=Ml-5 M8=Kl*5
PAGE 345
333 C INITIALIZE LOAD VECTOR POINTERS HC=J70SUP«JCSPTRfl,JCR0RC,C,l) HE=2 C INITIALIZE L VECTOR H1=WC*7 L 1 2 ) =» JCENUH-JCCORE ( HI ) M2=0 C SERVICE COUNT ORDINATE 1 IF(IABS(JCSENS).EQ.2)G0 TO A CALL FETCH(JCCORE(MA),LiMl.C.LiJCCORE'1 H1=M1-JCSENS/IABS(JCSENS) IF(Ml.GE.O)Ga TO 2 CALL SYSERRdf JCENUM) Hl=0 GO TO 3 2 IF((Ml»JCRORC).LE.JCR0RC)GO TO 3 CALL SYSERRI2,JCENUM) Hl=l 3 CALL ST0RE=JC0TPT IFIJCSENS.GT.OGO TO 5 IF(Hl.N£.U(2))CALL SYSERR( 3, JCENUH ) 6 CALl'sT0RE(JCC0R£«MA),L,D«2),0(A),L,JCC0RE(MC),ME) GO TO 11 C MULTIPLE OUTPUT 7 D(1J=1 M1=C(2) H2=0 IF(JCSENS.LT.O)GO TO 9 C ASSIGN OUTPUT CALL NEHCELUCC0REIMB»,012),1> CALL ST0RE(JCC0RE(MA)tLiDf0,L,JCC0RE(MC),3J M2=0(2) JCCCRE(M2J=MI H2=^'2+l JCCGRE(M2)=JC0TPT GO TO 11 C ERASE OUTPUT 8 H2=M1 M1=D(2) 9 1F(HI.GT.0)G0 TO 10 CALL SYSERR(4,JCENUM) GO TO 11 10 D(2)=JCC0RE(Ml) M3=Ml*l IF(JCC0REtM3).NE.JC0TPT)G0 TO 8 CALL RETURN t JCCORE( MB), Ml, M 1,1) HE^'V IFIM2.EQ.0)G0 TO 6 _ JCC0RE(H2)=C(2) C EXIT 11 CALL SYSEXT RETURN
PAGE 346
334 END
PAGE 347
335 C c«»« • • • ••• ••* •••••• » C • J7VARI • C ••• c C PURPOSE C J7VAR1 HANDLES VARIABLES WITH RESPECT TO SIH GENERATION. C C USAGE C CALL J7VARI(JCSPURiJCP0FP.JCSPTRtJCR0WN,JCH00EiJCL0A0i C JCUNIT,JCCLNO» C C CATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCSPUR = THE ADDRESS OF THE SPUR FOR SECEDE IF JCMODE = 5f C OR FOR GENDER OTHERWISE C JCPOFP = THE DISPLACEMENT TO THE FILE ENTRY IF JCMODE = 5t C OR THE ADDRESS OF A LIST ENTRY C JCSPTR = THE ADDRESS OF THE SIMBL C JCROWN = THE ROW NUH8ER C JCMODE = A POSITIVE INTEGER HAVING THE FOLLOWING STATES. C 1 = TEAR VARIABLEf ROW ORDINATE SET UP C 2 = DECISION VARIABLEt ROW ORDINATE SET UP C 3 = OUTPUT VARIAOLEi NOT PROTECTED GROUPi ROW C ORDINATE SET UP C 4 = OUTPUT VARIABLE, PROTECTED GROUP, ROW ORDINATE C SET UP C 5 » INCIDENCE VARIABLE C 6 = DECISION VARIABLE, POST SET UP INITIALIZATION C 7 » OUTPUT VARIABLE, POST SET UP INITIALIZATION C JCLOAO * THE ADDRESS OF THE LOAD VECTOR FOR SECEDE C JCUNIT ' THE UNIT NUMBER C JCCLNO » A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE 1 IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C 8STLNK C FETCH C FIND C FRHCEL C FSTLNK C J7C0MV C J7IC0M C J7L0DV C J70SUP C J70TPT C LNKBWD C LNKFWD • C NEKCEL V C RETURN C SIHCIN C SIMT=LG C SIMOPT C STORE C SYSENT C SYSEXT
PAGE 348
336 C TOCELL C C ERRCR CODES FOR THIS PROGRAM C NONE C C METHCC C SELF-EXPLANATORY C c SUBROUTINE JTVARK JCSPUR, JCPOFP, JCSPTR, JCR01.N, JCHODE , JCLOAD, 1 JCUNITf JCCLNO) COMt'CN/ALLOC/JCCOREll) ,, „,^, ^,^, „, ., OIMENSICN L(5),F(3),G(7),S{16I,E(13),N(7),C(7),P(4».0(6),0(4) INTEGER F,G,S,E,C,P,C,a , „ , , „ , , -, i DATA L/3,l.Ul.0/,Ftn/l/,G/2,2,l.l,21,l,l/,S/5,l9,l,l,8,l,l,7,l. 1 I,5,l,l.l.l»l/.E/A,6,l,l,5.l,lt3,l,l,4,l,l/.N/2,7,l,l,9,I,l/.C/l, 2 lO.l.l.llf l»l/iP/lf6ilfl/.0/l,l3il,l/ C ENTER CALL SYSENT(1,3,2.16,JCCLN0> r PARAMETERS C MA»ACCRESS OF SPUR'S FOR SIM Ml=JCSPTR*2 >'A=JCCCRE(M1) C MB=ADCRESS OF SPUR FOR ORDINATE MB»MA-5 C HC«ADCRESS OF SPUR FOR ELEMENT t»e=KA-10 C ORDINATE M0=J7CSUPlJCSPTR,lf ItOtl) HE=1 Ml=fD*l4 IF(JCCORE(Hl).NE.-l)HE=* HF=K0+7 MG=MD+8 M1=JCCCRE(17)*18 F(21=JCC0RE(Hl» MAA=0 C MH=NUMBER OF VARIABLES HH=0 C MS=ADORESS OF LOAO-II FOR SECEOE MS=JCLCAD+30 M1=HS*28 JCCCRE(Hl)=-l C HU^UNIT SCALE MU=JCCCRE(l7)+6 MU=JCCORE«MU) C DATA IF(JCH0DE.EC.5)GO TO 1 99 CALL FRMCEHJCCCRE(JCSPUR),JCPOFP, 0,6,1) K1=JCCCRE(17)*10 H2=JCPCFP GO TO 2 1 L(3)~JCPCFP CALL FETCH{JCCORE(JCSPUR),L(2).0,S,F,JCCORE(JCLOA0),O,U JCPCFP=C(5) Lt3)=l IFCCCfl.NE.UGO TO 31 M1=JCCCRE<17)*3 M2=0 C COMMON CHECK DJ2)=«0(2)+JCUNIT»MU
PAGE 349
337 CALL J7C0MVIJCSPURtD«2»,MS,l» C DIMENSION CHECK C MI»INCICATOR 2 I1I«0 IF(D(1J.EQ.0)G0 TO 11 C DIMENSIONED C MI=MOCE FOR J7IC0M CALL C HJ=JCPGSP FOR J7IC0M CALL MI=«V HJ=1 MN=M2*JCCCRE«Hl) GO TO 17,7,6,6,3,5,4),JCM00E C MOOE'^l 3 HI=»1 GO TO 7 C HaCE=2 4 Ml»2 C GET SPACE (HJ) 5 H2=JCCCRE«17)*14 M2=KA*5»{JCC0Re(H2)tl) CALL NEHCEL«JCC0RE(M2),MJ,1) GO TO 7 C H0CE=2 6 MI=2 C COMPUTE INDICES 7 CALL J71C0M( JCSPURfMN,MA,MJ,2,MI,D(l)tJCL0A0,M2tl) IF(K2.EC.-1)G0 TO 95 GO TO (8,14f l'».lAf 8t8,8)fJCMODE C SEARCH 8 H2=0 IF(fE.EC.l)GO TO 9 JCCCRE(KJ)=C(2) M2=MJ*1 JCCCRE(M2)=C(1) CALL J7LCDV(JCSPTR,L(4),HJ,M2,MDtl) 9 M2=JCM0CE*7«M2 GO TO (14,l4,l*,14,l=JCCCRE(HG)-JCC0R6(HF)tl CALL STCRElJCC0RE(MB),L(ME),DIM3).NfF,JCC0RE(H0)tl) H5)=0 HE=4 1F(JCM0CE.EC.4)G0 TO 16 C NUMBER OF OUTPUTS = 1
PAGE 350
338 CALL STCRE(JCCQRE(MB)fL(A).FiC(4),FtJCC0RE(H0)t2) GO TO (151.16,18,16,22t20>20)>JCM00E 151 F(l)=4 C COLUMN STATUS FLAG = 1 16 CALL STCRE,3) F(n=i GO TO (17,32,18,18,22, 32, 95),JCM0DE C OUTPUT ASSIGNMENT COLUMN ONLY 17 CALL J7CTPT(JCSPTR,JCC0R£(NF),l,2,JCROWN,l) GO TO 32 C OUTPUT ASSIGNMENT BOTH ROW AND COLUMN 18 Kl=2 19 CALL SII'CPT(JCSPTR,JCROWN,JCCORE(MF),Ml,l) IF(JCM0CE.EQ.5IG0 TO 21 GO TO 95 C GET CURRENT STATUS FLAG 20 CALL FETCH( JCC0RE(M8),Lt4),Ml,E(*),Ff JCC0RE(M0),0,2> 1F(JCMCCE.EC.5)G0 TO 23 C TEST FLAG IFIKl.NE.DGO TO 21 CALL SYSERR(l,JCCbRE{MF)) GO TO 32 C REMOVE COLUMN 21 CALL SIMCIN(JCSPTR,JCCORE(MF), 1,-1,0, F,F,1) CALL SIMFLG(JCSPTR,JCCOREtMF),l,F,0,l) 1F(JCM0CE.EQ.5)G0 TO 30 GO TO 16 C ACQ ELEMENT TO SIM 22 0U)»0 0(5)=JCR0HN D(6)=JCCCRE(MF) C GET SPACE (MK) CALL NEUCELUCC0RE,H1-,P,F,JCC0REIML),0,5) L(5)=«0 M2=0 M3=0
PAGE 351
339 1F(K1.GT.0>G0 TO 27 C FIRST ELEMENT IN ROW 25 CALL STORE(JCCORE«.M8J,L(A),HK,P,F,JCeoRE(ML)t51 C LINK FK TO NEXT ELEMENT 26 CALL FSTLNK(JCC0REi0,7) IF(M2.GT.0)G0 TO 31 CALL SIfCINtJCSPTR,JCR0HN,Ct-lf0tF,F,2) CALL SIKFLG(JCSPTRiJCROWNi0iF,0t2) F(3)=l C NEXT CONSTITUENT 31 IF(JCPGFP.EC.O)GO To 35 IF((D(l».GT.0».AND.lD(4).ECl.l))JCPOFP = l GO TO I 95 JCPCFP=LNKFWDt JCCORE«JCSPUR)f JCP0FP,2) IF(JCP0FP.EC.0)G0 TO 34 GO TO 99 C ITERATE 32 IF(D(1).EQ.0)G0 TO 95 33 MI=-IAeS{MI) GO TO 7 C RETURN MJ 34 1F(JCM0CE.LT.6)G0 TO 35 M2=JCCCRE117)+14 H2=KA+5»(JCC0RE(M2)+1) CALL RETURN(JCC0RE(M2)fHJ,MJ,2) C EXIT 35 CALL SYSEXT RETURN ENO
PAGE 352
340 C ...... C*«*>*«»«*« ••<...#»..o..«»»....»»o»»»» ••• c "*** Q • BREAK » C •».•...••• c C PURPOSE C BREAK DESTROYS THE LINKAGE BETWEEN TWO SPECIFIED NODES. C C CALL BREAK(JCNTWK,JCP0FPtJCP0SP.JCP0SN,JCA08N,JCCLN0) C , C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCNTWK = THE ADDRESS OF THE NETWORK INFORMATION BLOCK C JCPOFP = OR THE ADDRESS OF THE FIRST NODE C JCPOSP = OR THE ADDRESS OF THE SECOND NODE C JCPOSN = SIMILAR TO JCPOSF OF COUPLE, EXCEPT THAT JCPOSN C REFERS TO WHICHEVER NODE (IF ANY) IS ASSIGNED A Q JCPO P OF 0. IF NEITHER JCPOFP OR JCPOSP ARE Ot C JCPOSN SHOULD BE ASSIGNED A VALUE OF -I. C JCAOBN = SEE COUPLE • ,^„ C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C REMARKS C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FRMCEL C FSTLNK C RETURN C SYSENT C SYSERR C SYSEXT C TOCELL C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERROR(OATA PROVIDED) r 1 NF NODES ARE NOT LINKED (ADDRESS OF NODE) Q 2 NF NODE ON DIVERGER (IDENTIFICATION FLAG OF NODE) C C EITHER ERROR CAUSES BREAK TO ABORT. POSSIBLE MODES OF C OPERATION ARE ( A, A,-l) , ( A.O.M) OR (O.A.H) FOR (JCPOFP, C JCPOSP, JCPOSN), WHERE A IS AN ADDRESS AND M IS -1,0 OR A C POSITIVE INTEGER. C SUBROUTINE BREAK( JCNTWK, JCPOFP, JCPOSP, JCPOSN, JCADBN, JCCLNO) COKKON/ALLOC/JCCOREd) DIMENSION P(7),G(10),0(3) INTEGER P,G,0 DATA P/2,ltl»l.5.1,l/,G/3,l,l,lf2,l,l,3,l,l/ C ENTER CALL SYSENT(l,3,3,l,JCCLNO) C SPUR Hl=JCNTWK+l Ml=JCCORE(Ml)
PAGE 353
341 H2=Kl't'4 M2=JCC0RE(l7)t7*U»/5»-2«lJCC0RE(H2»/6) MA=Pl*5»lJCC0RE{H2J-l) H2=M2+l MAA=Ml*5»(JCC0RE(M2)-l) ; MODE MB=JCPOFP MC=JCPOSP IFCJCPCSN.EQ.0»JCP0SN=1 KD=JCPOSN MH=0 IF((M8.GT.0).ANO.(MC.GT.0))HO»-l IF(MD.EQ.-l)MH=l PCl)=2 P(2)=l P16)=-1 PJ7)«1 IF{MB.GT.O)GO TO 2 C REVERSE 1 Ml=»HB HB=PC MC=H1 P{1)=2 P(2)=3-P«2) P«6)=P(2) P(7)=P12) , C EXAMINE LINK FROM NODE 2 ME=0 MF»0 MG=1 CALL FRHCEL(JCC0RE(MAA),H8,D,Pil) HI=D«2)-1 P(l)=l IFCDID.EQ.OGO TO U C FLAG CALL FRMCEL(JCC0RE(MA),D(l)tMl,6(7),2) IF(M1".EO.O)GO TO 4 C NODE TO NODE D(2)=0 IFtDtD.EQ.MOGO TO 8 IF(MC.GT.O)GO TO 11 MC=Da) GO TO 8 C DIVERGER 3 IF(D(1).EQ.O)GO TO 10 MG=KG*l * HE=MF MF=D(IJ „ . CALL FRHCEL(JCC0RE(MA),MF,0,G,3) IF(0(3».NE.0»GO TO 12 C TEST 1FC(D(2).NE.HC).AND.(MG.NE.H0))G0 TO 3 C SUCCESS 5 MC=D(2) CALL RcTURN(JCCORE(MA),HF,MF,l» IFIME.EQ.OGO TO 6 C NOT FIRST CALL FSTLNK(JCCORE(MA),Me,OCL»tH GO TO 7 C FIRST 6 CALL TOCELL(JCCORElHA),MBfD(l»iPil) 7 IFIJCAOBN.GT.OIGO TO 9
PAGE 354
142 TEST FOR SINGLE PATH CALL FRMCEL(JCC0RE{HA),MB,ME,P,4) IFIME.EC.OJGO TO 9 CALL FRMCEL(JCC0RE(MA»,ME,D,G,5) 1F(D(1).GT.0)G0 TO 9 REMOVE DIVERGER ENTRY IF(D(3J.NE.0)G0 TO 12 CALL RETURN(JCC0RE(MA),HE,ME,2) 8 CALL TCCELLlJCC0RE(MAl,MB,D(2)fPf 2» SECOND PASS 9 CALL T0CELL(JCC0RE(MAA)fMBfMI,P<4»t3) IFIP(2).EQ.2)GQ TO 91 JCPCFP=HB JCPOSP=MC IF((MH»JCPOSN).LE.O)GO TO 93 GO TO 92 91 IF((MH»JCPOSN).GE.O)GO TO 93 92 JCPOSN=MG KH=0 93 IF(K2.LT.0)GO TO 13 MD=-l M2=-l GO TO I NO CONNECTION 10 IF(MC.GT.O)GO TO 11 JCPCSN=HG GO TO 5 11 CALL SYSERRntHB) GO TO 9 NODE CNDIVERGER 12 CALL SYSERR(2f 0(3)) GO TO 9 13 CALL SYSEXT RETURN END
PAGE 355
343 C C «• ...«.••»»•»•••• .•«•..«•••.».• c •» C • COUPLE • c ••* c C PURPOSE C COUPLE JOINS TWO SPECIFIED NODES. C CALL COUPLEtJCNTWK.JCPOFP.JCPOSP.JCPOSF.JCPOSS.JCADSN, C JCCLNOJ C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCNTWK = THE ADDRESS OF THE NETWORK INFORMATION BLOCK C JCPOFP = THE ADDRESS OF THE FIRST NODE C JCPOSP = THE ADDRESS OF THE SECOND NODE r jCPOSF = -1, OR N. IF JCPOSF IS -I OR Oi THE NEW PATH C FROM JCPOFP IS POSITIONED AT THE END OR BEGINNING r OF THE DIVERGER RESPECTIVELY. IF EQUAL TO N, C JCPOSF INDICATES THE POSITION IN THE DIVERGER THAT C THE NEW PATH IS TO OCCUPY. C JCPOSS = THE SAME AS THE JCPOSF, BUT FOR THE REVERSE PATH C FROM JCPOSP TO JCPOFP C JCADBN = OR I AS RESPECTIVELY A DIVERGER IS NOT OR IS C ALWAYS REQUIRED BETWEEN NODES C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C C THE NUMBER REPRESENTED BY JCTCiA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FRHCEL C FSTLNK C LNKFWO C NEWCEL C SYSENT C SYSEXT C TOCELL C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C SUBROUTINE COUPLE( JCNTWK, JCPOFP, JCPOSP, JCPOSF, JCPOSS, JCADBN, 1 JCCLNO) COMMON/ ALLOC/JCCOREI I) DIMENSION P«7I,GI10),D(5) INTEGER P,"G,D DATA P/2,l,Ul,5,l,l/.G/3,l,l.,l,2,l,l,3,l,l/,D(3)/0/ C ENTER CALL SYSENT(1,3,3,2,JCCLN0» C SPUR Hl=JCNTWK+l
PAGE 356
344 Hl=JCCORE(Hl) H2=m+4 M2=JCC0RE(17)+7+14»{JCC0RE(M2)/5)-2»CJCC0RE(M2J/6) MA=«l*5»(JCCORE(H2J-l) M2=M2*l MAA=M1*5»(JCC0RE«M2)-1) M2=0 C FORWARD PATH P(l)=2 P«2)=l P{6)»1 Pt7)=l MB=JCPQFP 0(2)=»JCP0SP MC=JCPOSF C CURRENT LINK 1 CALL FRMCEL(JCC0R£{MAA),M6,0(4),P,1) D(5)=D(5)+l CALL TOCELL ( JCCORE ( MAA ) , MB , 0( 5 J , P ( A ) , 1 ) P(l)=l D(l)=0l4) IF(MC.E0.0)MC=1 MD=0 1F10(IJ.GT.O)GO TO 2 C END OF PATH IF(JCADBN.GT.0»GO TO 5 C NO DIVERGER REQUIRED ME=0(2) GO TO 6 C FIND POSITION 2 CALL FRMCELJJCC0R£(MA»,C{l).MlfG(7>,2) IFIMl.EQ.OJGO TO A C NODE TO NODE Hl=0(2) D(2J=0(U H2=l GO TO 5 C CONTINUE 3 0(2»=M1 Dtl)=ME M2=0 C DIVERGER 4 IFIHC.EQ.IJGO TO 5 HD=D(1) MC-J'.C-l D(1)=LNKFW0(JCCCRE(MA)|HD,1) IF{0(1».GT.O>GO TO 4 C GET DIVERGER ENTRY 5 CALL NEWCEL(JCCOREJMA),He,l) C STORE CATA CALL T0CELL(JCC0RE(HA)fMEiD.G.2) IF(K0.E0.0)G0 TO 6 C THREAD INTO DIVERGER CALL FSTLNK(JCCORE(MA),HD,HEfl) GO TO 7 C SET NODE LINK 6 D(4)=ME CALL TOCELL(JCCORE(MAA),K0f0(4),Pt3> 1FJM2.EQ.1)G0 TO 3 7 IF(MB.EQ.JCPOSP)CO TO 8 C BACKWARD PATH
PAGE 357
345 D<2)=MB HB=JCPOSP *1C=JCP0SS P(l)=2 P(2)=2 PI6)=.2 P(7»»2 GO TO 1 EXIT 8 CALL SYSEXT RETURN END
PAGE 358
346 C c«*««««> ••• ••• • ••»••• •• r »»»»«•»»» C • LNKBNT » C • c " C PURPOSE C LNKBNT RETRIEVES THE BACKWARD LINK FROM A SPECIFIED NODE. C C USAGE C LNKBNTtJCNTWK,JCPOFP,JCPOSP,JCHHDE,JCCLNO» C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS C JCNTHK = THE ADDRESS OF THE NETWORK INFORMATION BLOCK C JCPOFP = THE ADDRESS OF A NODE OR DIVERGER ENTRY C JCPOSP = THE ADDRESS OF THE NEXT DIVERGER ENTRY r JCWHDE = -If OR N, WHERE N IS A POSITIVE INTEGER. IF C JCPOFP IS A NODE, N IS THE SEQUENCE NUMBER OF A C DIVERGER ENTRY. IF JCPOFP IS A DIVERGER ENTRY, Q N IS THE NUMBER OF ENTRIES TO ADVANCE BEFORE C RETRIEVING THE ADDRESS OF A NODE (I.E. LNKONT). C IF JCWHDE = 0,-THE FIRST PATH IS TO BE SELECTED. C IF JCWHDE = -I, THE LAST PATH IS TO BE StLECTEO. C JCCLNO = A USER ASSIGNED CALL STATEMENT ID. PARAMETER C THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINES, C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C J7LINK C SYSENT C SYSEXT C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY C C C ••«•»••••• FUNCTION LNKBNT (JCNTWK, JCPOFP, JCPOSP, JCWHDE, JCCLNO» COMMON/ ALLOC/JCCORE( 1 ) C ENTER CALL SYSENT(l,3,3,3,JCCLN0) C GET LINK LNKBNT=J7LINKt JCNTWK, JCPOFP, JCPOSP, JCWHDE, -1,1) C EXIT CALL SYSEXT RETURN END
PAGE 359
347 C €•••• ..«•••• » »»»..«.»«..»»»»i C •••• C • LNKFNT • C .•«.•••••• c C PURPOSE C LNKFNT RETRIEVES THE FORWARD LINK FROM A SPECIFIED NODE. c C USAGE C LNKFNTCJCNTWK,JCPOFP,JCPOSPtJCHHOE,JCCLNOI C C DATA FORMAT C N/A C C . DESCRIPTION OF PARAMETERS C SEE LNK8NT C C REMARKS C THE NUMBER REPRESENTED 8Y JCTCIA MUST, FOR SOME MACHINESt C REPLACE THE I IN THE NAMED COMMON STATEMENT. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C SEE LNKBNT C C ERROR CODES FOR THIS PROGRAM C NONE C C METHOD C SELF-EXPLANATORY c FUNCTION LNKFNT(JCNTwK,JCPOFP,jCPOSPt,JCWHDEtJCCLNO) COMHON/ALLOC/JCCOREIl) C ENTER CALL SYSENT(1.3i3,4,JCCLNO» C GET LINK LNKFNT=J7LINK(JCNTWK,JCP0FPtJCP0SP,JCWHDE,Ifl) C EXIT CALL SYSEXT END
PAGE 360
348 c ,,.». c • .«.».<•...»•• ..»«.... ••• c • • C • NEXT • C ••««.•.»•• c c ''"'^''next specifies the next node in a trace given the current C NODE. c C USAGE C NEXTlJCNTWK,JCPOFP,JCTKEY,JCDOFT,JCLEVL,JCHOCLtLION,JCOATA, C JCCLNO) C C DATA FORMAT C N/A C C DESCRIPTION OF PARAMETERS ^ C JCNTWK = THE ADDRESS OF THE NETWORK INFORMATION BLOCK C JCPOFP = THE ADDRESS OF THE CURRENT NODE C JCTKEY = THE TRACE KEY C JCDOFT = +N FOR FORWARD TRACE OR -N FOR BACKWARD TRACE, f WHERE N IS A POSITIVE INTEGER. IF N > I, THE NODE C JCPOFP IS INSPECTED WITH RESPECT TO KEY AND COUNT r HATCH. IF N = 2, NEXT WILL ALWAYS ADVANCE FROM C JCPOFP UNLESS JCPOFP IS THE LAST NODE. C JCLEVL = -1 OR A NON-NEGATIVE INTEGER N. IF JCLEVL EQUALS C -I, NEXT WILL NOT ENTER A NODE TO INSPECT SU8C NODES. IF JCLEVL EQUALS N, N IS THE LEVEL OF THE r CURRENT NODE. C JCHDCL = THE ADDRESS OF THE TEMPORARY LIST HEAOCELL r LION = A VECTOR OF DATA FOR STORAGE IN THE TEMPORARY LIST C WHEN NEXT MUST ENTER A SUB-NODE LIST. C JCOATA = THE NUMBER OF DATA ITEMS IN LION (0 IF NONE) C JCCLNO » A USER ASSIGNED CALL STATEMENT ID. PARAMETER c . r THE NUMBER REPRESENTED BY JCTCIA MUST, FOR SOME MACHINESt C REPLACE THE I IN THE NAMED COMMON STATEMENT. C IF THE TRACE IS COMPLETE, NEXT IS RtTURNED AS 0. C THE LEVEL PASSED TO NEXT IS THAT APPROPRIATE TO JCPOFP, C WHILE UPON RETURN THE JCLEVL IS THAT OF THE NODE INDICATED C BY THE VALUE OF NEXT. C WHEN NEXT ENTERS A SUB-NODE LIST, INFORMATION IS C TRANSFERRED FROM LION TO A TEMPORARY LIST ENTRY. UPON C COMPLETION OF A SUB-NODE LIST, INFORMATION IS TRANSFERRED C FROM THE TEMPORARY LIST ENTRY TO LION. C C SUBROUTINE AND FUNCTION SUBPROGRAMS REQUIRED C FRMCEL C LAND C J7L1NK C POPUP C PUSH C SYSENT V C SYSERR C SYSEXT C TOCELL . C C ERROR CODES FOR THIS PROGRAM C CODE FATAL ERRORIOATA PROVIDED) Q I NF COUNT MISMATCH WITH NULL TEMPORARY LIST
PAGE 361
349 C (ADDRESS OF NODE) C C METHOD C THE KEYS AND COUNTS MuST MATCH FOR NEXT TO ASSUKE THE C ADDRESS OF A NODE. NEXT TRAVERSES A PATH THROUGH THE C NETWORK UNTIL IT IS FORCED TO BACK-TRACK BY END OF PATH OR C COUNT MISMATCH. BACK-TRACK DATA IS STORED IN THE C TEMPORARY LIST. IF THE KEYS AND COUNTS MATCH FOR JCPOFP, C AND JCLEVL IS NON-NEGATI VEf NEXT WILL ENTER ThE SUSNOOE C LIST FOR JCPOFP. C c FUNCTION NEXTIJCNTWK, JCPOFP. JCTKEY.JCDOFTf JCLEVL, JCHDCL, LION, 1 JCDATA.JCCLNOI COMMON/ ALLOC/JCCOREI I) DIMENSION N(19»,P(4),Q( H2=MU4 HA=JCC0RE
|
|