A HEURISTIC MODEL FOR CLASS SCHEDULING AND
MASTER SCHEDULE CONSTRUCTION
by
GARY ALLAN HORNBECK, B.S. in I.E.
A THESIS
IN
INDUSTRIAL ENGINEERING
Submitted to the Graduate Faculty of Texas Tech University in Partial Fulfillment of the Requirements for
the Degree of
MASTER OF SCIENCE IN INDUSTRIAL ENGINEERING
Approved
May, 19/^
Ac
-r3 t-. -
' >6. ::>
Cop.<2-
ACKNOWLEDGMENTS
First, I would like to thank Dr. Milton Smith,
Dr. Charles Burford. Dr. Brian Lambert, and Dr. Thomas
Bouillon for their educational assistance and guidance
throughout the course of this research. Also, I would
like to thank Dr. Richard Barton and The Aluminum Company
of America for their financial assistance contributed to
this research. Both the education and financial assistance
made this research possible.
11
TABLE OF CONTENTS
ACKNOWLEDGMENTS ii
LIST OF FIGURES vii
I. PURPOSE AND SCOPE 1
Introduction 1
Problem to be Considered 2
Literature Review 3
Master Schedule Construction . . . 4
Manual Methods 4
Optimal Methods 6
Heuristic Methods 7
Class Scheduling 9
Manual Methods 9
Optimal Methods 11
Heuristic Methods 12
Combination Master Schedule Construction and Class Scheduling Methods 14
II. ASSUMPTIONS ABOUT THE UNIVERSITY 17
Assumptions Made Concerning
University Objectives 17
Administrative Objectives . . . . 18
Faculty Objectives 19
Student Objectives 19
Constraints 21
Administrative Constraints . . . . 22
111
IV
Faculty Constraints 23
Student Constraints 24
III. MODEL DEVELOPMENT PROCEDURE
AND EXPECTED RESULTS 26
Procedure 26
Phase One 26
Student Information 26
Faculty Information 27
Phase Two 27
Administrative Information . . 27
Course Arrangement 28
Faculty Arrangement 30
Scheduling 30
Constraint Relaxation . . . . 31
Expected Results 32
University Demands 32
Student Satisfaction 33
Faculty Satisfaction 33
Administrative Satisfaction . . . 34
IV. M3DEL DEVELOPMENT AND OPERATION 35
Model Operation 35
Phase One 35
Phase Two 38
Comparison to Previous Research . . . 42
A Comprehensive University Scheduling System 42
General Academic Simulation
Programs 44
Other Comparisons 46
V. MODEL EVALUATION 47
Model Construction 47
Student Information 47
Faculty Information 48
Model Proportions 50
Courses and Course
Sections 50
Faculty Scaling 52
Student and Section
Size 53
Model Performance 55
Execution Time 55
Phase One 56
Phase Two 57
Student Constraints 58
Faculty Constraints 59
Evaluation 59
VI. CONCLUSIONS AND RECOMMENDATIONS 61
Data Processing 61
File Order 61
File Reference 62
Computer Programing Improvement . . . 63
Efficient Routines 63 Efficient Modular Construction 64
VI
Constraint Modification 65
Conclusion 65
REFERENCES 70
APPENDIX 72
Introduction 73
A 77
B. . 87
C 100
D. 110
E 119
F 129
CHAPTER I
PURPOSE AND SCOPE
Introduction
A university functions to supply courses according
to demand, to promote research in all fields of endeavor,
and to improve the educational processes. In accomplishing
these goals, it should strive for efficient utilization of
faculty, facilities, and public and private funds in order
to maximize the use of university resources and minimize
instructional costs. (5)
For these goals to be reached efficiently techniques
for good planning must be used. Accordingly, good planning
consists of the following:
1. Retrieving pertinent data from the university's
data base or information systems.
2. Forecasting demands which essentially are
student enrollment and the flow of each student
through the university.
3. Allocating university resources to the fore
casted demands.
4. Scheduling educational activities to take
place. (16,17)
In addition to a coordinating effort, the scheduling
aspect of planning, particularly class scheduling, may be
1
used to accomplish other objectives. For instance, the
final schedule might also be used to evaluate current
faculty loads, room utilization, and class organization,
and/or to develop administrative guidelines for projected
loads, room utilization, and core curriculum. (1)
Incorporating such an evaluation into the final schedule
yields a procedure for optimal schedule construction.
Problem to be Considered
The problem of class scheduling is twofold. First,
the class activities of a university must be arranged in
such a manner as to produce an acceptable solution to
class scheduling. These class activities include adminis
trative guidelines and restrictions, facilities operation,
faculty restrictions, student restrictions, and so forth.
Second, as a means of summarizing these activities, a
master schedule should be produced to depict an acceptable
solution for the combined class activities. Herein lies
the problem to be approached by this research, which is to
develop a heuristic procedure for scheduling students and
teachers to classes for a given university term. The end
product will be a procedure for construction of a master
schedule of classes showing the structure of each course
section, the teacher's final schedule for the term, and
the student's final schedule for the term.
The specific objectives of this research are to:
1. Set forth the data requirements necessary for
a university to maintain an automated class
scheduling system.
2. Set forth typical demands which could be
considered in an automated class scheduling
system.
3. Develop a heuristic procedure to schedule
faculty, students, and facilities of a
university to classes.
4. Develop a test model from sample data to
exemplify the operation of the heuristic
procedure developed.
This research will be conducted in the direction of
developing an automated heuristic procedure only and no
attempt will be made to approach optimality.
Literature Review
Research approaching the class scheduling problem
has two basic divisions: (1) master schedule construction,
and (2) course sectioning or class scheduling. A master
schedule is a list of courses by sections, showing the
number of hours, classrooms and/or laboratories, and
teachers required in order to conduct a course. (15)
Course sectioning or class scheduling is the process
whereby students choose, or are assigned, specific course
sections from a master schedule. (15) In most cases, the
master schedule is requisite to class scheduling, with
master schedule construction and class scheduling being
considered distinct processes and master schedule con
struction always preceding class scheduling. However,
exceptions do exist. One of these is Purdue University's
Comprehensive University Scheduling System (CUSS), where
the master schedule is an end product of class scheduling. (1)
The remainder of this chapter discusses these two concepts
of schedule construction.
Master Schedule Construction
Construction of the master schedule varies from
manual methods to heuristic methods to mathematical
programing or optimal seeking methods; but the most widely
used method is manual preparation. The following text will
discuss all three methods through examples of each.
Manual Methods
Purdue University's registration procedure is an
example of the manual method of master schedule construc
tion. (2) In this procedure, the master schedule relies
on the expertise of registration and departmental personnel.
The process starts with the passing of course information
from the university's various departments to a central
office which is responsible for the final university master
schedule. This office merely records the courses, meeting
times and rooms, number of sections, and teachers, thus
producing a university-wide schedule which is returned to
each of the departments for approval and alteration. This
exchange of information proceeds' until the departments
have fixed the course sections, teachers, rooms, and times
for each course to be offered in the coming session. The
departmental information is produced from the subjective
thoughts of the person(s) in charge and forwarded to the
university scheduling office, which applies the adminis
trative constraints and restrictions to the schedule.
The major advantages of a method such as this would
be time and cost involved in producing the master class
schedule. The additional time required for faculty members
and departmental officials to set up the faculty loads
for the next semester is relatively small. Also, the
additional cost of registration personnel recording the
the faculty loads is relatively small.
The major disadvantage of this method is in that
this procedure entails little if any information about
actual current student demands on the university. The need
for student input into a system such as this has produced
a switch in thinking from that of manual methods, utilizing
few student inputs, toward optimal seeking methods,
utilizing numerous student inputs.
Optimal Methods
At the opposite end of the continuum is the method
of seeking optimal solutions arrived at by mathematical
programing techniques. These techniques attempt to
optimize an objective function subject to a given set of
constraints. The objective function could minimize the
cost of teaching particular course sections under specified
conditions or maximize the suitability of the schedule for
one specific aspect of the university. The constraints
usually include the following:
1. Administrative considerations—physical
resources, funds, resources needed to teach »
certain courses, et cetera.
2. Faculty considerations—subject matter, time,
teaching-load preferences, et cetera.
3. Student considerations—courses needed, time
preferences, academic load desired, et cetera.
A major advantage to these types of solutions is
that the class scheduling environment is well defined in
terms of actual constraints and mathematical programing
models perform well at the theoretical level. The major
disadvantage is that the computational load and the lack
of efficient algorithms prevent the models from being
implemented for university use in any environment other than
a theoretical one. (8) However, there have been some common
conclusions about the approach to be taken.
One conclusion is that the scheduled class time
should be a calculated factor and not one arbitrarily
assigned. The scheduled class time should be the one which
satisfies the constraints assigned after all have been
considered. (12) A second conslusion is that a model
cannot claim optimality unless the student-teacher
constraints are considered along with the administrative
constaints. (6) One of the more impressive models of
optimal searching techniques is one constructed by the
Industrial Engineering Department at the University of
Pittsburgh. (9) The model presents an algorithmic scheduler
using Boolean Ismorphic Structures to construct a master
schedule. This schedule minimizes an objective function--
number of class periods per week—subject to the constraints
of administration, students, and faculty. The model was
successfully applied in a high school, but has proven to
be too inefficient for university application and requires
further research. This is a fate typical of the optimal
solution seeking models and is born out well in the
literature. (7)
Heuristic Methods
In contrast to traditional and laborious manual
methods, and idealistic mathematical programing methods,
a heuristic approach seems at present to have the most
potential. The objective of heuristic techniques is to
8
obtain feasible solutions that are so near optimum in a
large percentage of cases as to make the extra cost of
obtaining an optimal solution much higher than the cost of
accepting the heuristic solution. In most instances, the
expediency of the solution is never disproven; but neither
is it proven.
Heuristic methods and solutions for university
scheduling problems are compromises between the manual
methods and the mathematical programing methods. These
compromises attempt to combine advantageous features of
both manual and mathematical programing methods, i.e.,
produce a near-optimal, feasible solution with a method
that is efficient.
Under the method of heuristic construction of
master schedules, no examples pertaining strictly to master
schedule construction will be discussed. Examples of
heuristic methods for schedule construction will be discussed
in conjunction with heuristic methods, for. class scheduling
later in this chapter. These models construct a master
schedule and schedule classes in one operation. The master
schedule is an output of the heuristic model, rather than
an input. In the literature searched, no method of con
structing a master schedule heuristically for use as an
input to a scheduling model was found. The models were
either subjective (manual) or optimal (mathematical
programing).
Class Scheduling
Class scheduling models are divided into the same
three categories as master-schedule construction models
and are presented here in the same order.
Manual Methods
This approach to class scheduling has acquired a
significant amount of sophistication as compared to the
manual models of master schedule construction, which is
due mainly to advances in the field of computer software
and hardware. A good example of a manual registration
system is that of Texas Tech University.
In the Texas Tech system the student chooses
courses from a master schedule and proceeds to register
for these courses at a time which has been determined for
him in accordance with a priority list. Students who have
completed the most hours of course work are the highest
on the priority list. The fewer the total number of hours
a student has completed, the farther down on the list his
name will appear. During registration, the filling of
the most favorable course sections is slowed by periodically
opening and closing these sections in order to give students
who are down toward the end of the priority list a chance
to register for more favorable course sections. This
opening and closing of existing course sections and the
addition of more course sections is an attempt to provide
10
a more nearly equal opportunity for all students being
registered. Although this equalizing attempt is performed,
the system still favors the students with high priority
numbers.
The method used by Texas Tech University is a
relatively unsophisticated manual method even though the
computer is used for preparing class rolls and grade slips,
assigning fees, et cetera. The students must be processed
individually through lines to obtain class registration
permits, pay fees, and other related paper work.
A more sophisticated manual method of class
scheduling is exemplified by the University of California
at Los Angeles. (11) This procedure utilizes a computer
resident system in that all inputs to the system are
maintained in either on-line devices or in computer internal
memory positions. The system utilizes preregistration
where each student fills out course requests, choosing
alternatives for each requested course from a previously
prepared master schedule. These course requests are compared
by means of registrar-operated terminals displaying the
present course status. If the student being considered
can be registered in that course section, he is registered.
If he cannot be placed in that course section, his alternate
course request is processed in the same manner. This
process continues until the student is either scheduled
with all of his course requests and/or alternates, or
11
rejected and forced to prepare a new request list. All
students are registered by means of the terminal and its
operator. In addition, all record keeping is handled at
the terminals automatically.
Both of these methods are manual in that each
student and course section are considered with the assistance
of a member of the university's administration. UCLA's
class scheduling system is an example of the sophistication
being attained in the class scheduling model.
The chief motivation for the added sophistication
is the expediency of automated procedures. The automated
procedure of UCLA is much quicker and less cumbersome with
respect to record keeping than a system such as Texas
Tech's. In addition, thirty terminal operators at UCLA
process about twice as many students (approximately
36,000) as do about 200 registration personnel at Texas
Tech (approximately 20,000 students).
Optimal Methods
While manual class scheduling methods are pragmatic
in nature, optimal seeking methods appear to be mainly
theoretical. None have been developed as a general-purpose
model for university application.
One such theoretical model attempts a solution by
the transportation algorithm. (12) The model minimizes
cost to the university for teaching a course with a
12
particular teacher. The farther down a teacher-prepared
priority list a course is located, the greater the cost
of teaching it. Teachers and students input course
requests and a corresponding section is selected. This
model is only theoretical with an input of less than
100 students to a small course-selection list. Models
employing techniques of integer programing (14), quadratic
programing, non-linear programing (8), and other mathe
matical programing procedures have been constructed.
However, these models suffer the same fate as those of
optimal master schedule construction, previously discussed.
These models are theoretical in nature, and in the litera
ture reviewed the model builders stress the need for more
research before efficient optimal seeking models can be
implemented on a university scale.
Heuristic Methods
Heuristic class-scheduling moi elg, like heuristic
master schedule models, seem to have the greatest potential
for use. In heuristic class-scheduling models, methods
are sought to reduce the number of simultaneously con
sidered variables and constraints. An example which
typifies this category of models is that used at Purdue
University. (2)
The Purdue system assumes an input master schedule
which has been optimally constructed and from which students
13
make course requests. Each course is ordered on a priority
list with courses having the fewest sections to be offered
ranked highest. Students' names are arranged in a priority
list for registration, with a student's position on the
list determined by the courses he has requested. The
more important his courses, the sooner he is considered
for registration. The model schedules one student at a
time until all students have been registered or have been
rejected by the model. When a conflict arises for an
individual student, the model reverses its steps until
the conflict is resolved or the student is rejected.
Students who are rejected by the model are registered
manually.
A major disadvantage to a system of this nature is
that the outcome of the scheduling procedure is dependent
on the goodness of the input master schedule. However, the
scheduling procedure is automated and processes records
automatically and pursues the master schedule quite
thoroughly before the scheduling procedure is completed.
Purdue's system has been operational since 1957 and is
considered to be one of the better scheduling systems in
the United States for a large university (20,000
students). (15)
14
Combination Master Schedule Construction and Class Scheduling Methods
Some heuristic models have been designed to
accomplish simultaneously both master schedule construction
and class scheduling. The first model discussed will be
General Academic Simulation Programs (GASP) and it should
be noted that GASP is used mainly for high school scheduling,
but is also used to aid the Massachusetts Institute of
Technology in class scheduling. (10)
Inputs to the model are a manually prepared master
schedule and student's requests. Students are scheduled
as well as possible, and then the master schedule re
evaluated and altered in an attempt to better satisfy
their requests. After master-schedule modification, the
scheduling process is repeated and a new master schedule
is constructed from an analysis of the output of the model.
The process is repeated again and again until the number
of conflicts in the master schedule is reduced to an
acceptable number. GASP schedules courses by order with
the course having the fewest sections being the first
course to be scheduled.
The model proceeds by assigning an instructor,
a class room, students, and an acceptable class time to
each course section. To determine the class time for each
course section the model scimples student inputs and assigns
the class time with the fewest conflicts for students.
15
GASP works well in scheduling students for high schools
of about 1,000 students and assists greatly in MIT's
sclieduling (6,000 students). High schools using this model
reported fewer schedule conflicts than before and lower
cost to the school.
While GASP has been used primarily for high schools
(which have fewer students, a more fixed curriculum, and
fewer courses than universities), Purdue University has
made significant gains in university scheduling with the
model CUSS. (1) CUSS processes model inputs, which are
staff resources, physical resources, student requests, and
course requirements, to produce a master schedule with the
fewest time conflicts among the inputs. Courses are
scheduled one at a time, with an attempt being made to
isolate non-conflicting times for all students in a course
section as compared with a sample of other courses the
students are taking. This model of master-schedule con
struction is in use at a'Purdue Regional Campus (7,000
students) and at Seattle University (6,000 students). It
is also used to project master schedules for future
semesters and the resources the university will need to
handle student requests. Purdue has had some difficulty
in applying the model to the main campus of 20,000 students,
but work on this application is continuing.
The foregoing discussion has presented the state
of the art with respect to university scheduling.
16
Chapter II will put forth some of the assumptions to be
made by this research in regard to the university and
Chapter III will define the procedure developed in this
research and the expected results. Chapter IV will present
a test of the research heuristic procedure and Chapter V
will evaluate the results of the test. In summary.
Chapter VI will present some suggestions for improvement
and state some conclusions.
CHAPTER II
ASSUMPTIONS ABOUT THE UNIVERSITY
Assumptions made Concerning University Objectives
The university may have a multitude of objectives
concerning class scheduling, for example to maximize room
utilization, to minimize walking distance between class
rooms, to minimize the number of dissatisfied students and
teachers, to maximize the quality of education for its
students, and/or to minimize the educational costs. Each
of these objectives presents its own constellation of
problems to the university, and therefore should be
approached individually. This research will consider the
major objective of the university to be optimizing the flow
of students through the university with respect to obtaining
a degree.
If the university could be compared to a business,
then a major objective would be optimizing product output.
The output would be students receiving a degree. The
university considered as a business could be broken down
more finely into product lines: degree plans, major
requirements, and so forth. Optimizing the output of
students receiving degrees would be a major objective of
the university. Optimization of the flow of students
17
18
through the university encompasses three distinct sets of
objectives concerning administration, faculty, and students.
Administrative Objectives
Administrative objectives might be defined as
those of the university as a whole and, hence, would not
be apart from faculty and student objectives. In the
context of this research, however, administrative objec
tives will be in a separate category. Administrations are
concerned with finding suitable class meeting times,
curricula, rooms, special facilties, et cetera. It is
easy to understand the overall complexity of administrative
desires, but it is difficult to reduce the complexity
into representative components of these desires. In the
literature referring to student flow through the university,
researchers feel that the components most representative
of administrative concerns are curriculum, space, and class
meeting time. (2,5,9,10,18) The university must have
physical facilities, a well developed but flexible
curriculum, and a schedule of class meeting times to satisfy
the curriculum and space needs. Meeting these needs is of
great importance to the university with respect not only
to student flow but to overall university operation as
well. Therefore, any university scheduling model should
at least have curriculum, space, and time components as
administrative concerns.
19
Faculty Objectives
Faculty desires are no less complicated than those
of administration. Some examples are consulting hours per
term, teaching hours per term, times preferred to teach
or consult, individual room requests, courses preferred
to teach, research per term, et cetera. The literature
reviewed discusses course preferences and time preferences
as representative of faculty desires. (4,6,14) This
involves a slightly more complex interaction than might
first be assumed. A faculty member, by choosing courses
and hours, not only expresses his teaching objectives, but
his overall objectives for the academic term (consulting,
counseling, relaxing, et cetera). The complexity of
desires is not the important point here. The important
point is that the faculty must be able to express their
objectives in a workable form. The faculty members
determine the objectives collectively and then give them
to the university system model. The model considers the
objectives and condenses them into a representative set of
desires in order to reduce their complexity to a manipu-
latable level.
Student Objectives
In most situations where working models for class
scheduling systems have been developed through research,
the student is almost wholely dependent on objectives the
20
administration and faculty have set for him. Examples of
this can be found in the literature reviewed in Chapter I
in the sections under manual methods (both for master
schedule construction and class scheduling). The manual
methods show the overemphasis (possibly due to lack of
student information) placed on administration and faculty,
whereas the university system should depend on student
desires, which are fairly independent of faculty and
administrative desires. The composition of student desires
or objectives is very difficult and complex to determine,
but this should not negate the attempt to estimate these
objectives. Student desires are extremely diverse, so
university system designers have the problem of defining
a set of objectives which is flexible enough to represent
students' varying desires.
To help pinpoint student objectives, this research
will place the students in a purely academic environment.
In such an environment, it is assumed that a student is
seeking only to fulfill degree requirements and related
functions. Under this assumption, the notion of individually
tailored degree plans makes sense. Students can be placed
into various degree plans which will outline each student's
objective with respect to receiving a degree.
The total number of degree plans and the related
course work for each degree is a function of each individual
university. Students may choose degree plans, but
21
progression through this degree plan is relatively fixed
and allows little deviation. Hence, an important desire
of the student is assumed to be progression through the
selected degree plan.
It is also desirable that each student have pro
tected times, whatever the reason—working hours, study
hours, leisure hours, et cetera. The student likes to
feel that he has some control over his time. Protected
times are general and represent an important student need
similar to the faculty protected-time component.
Hence, these two desires do significantly represent
the student's concerns, although it is recognized that
they are not all inclusive.
University objectives may take on many forms, and
the way in which they are delineated here is only a
convenient vehicle for the production of a class scheduling
system which will satisfy overall desires of the university.
As long as all factors in class scheduling are represented
in the model, then the definition of the university's
objectives will remain constant.
Constraints
Once university objectives have been defined,
constraints become apparent. In this research, the
constraints are quantitative limits. They may be considered
22
to consist of limits upon administrative, faculty, and
student objective.
Administrative Constraints
The restrictions placed on administrative objectives
have constant values for each university term, but the
restrictions may vary from term to term. Examples of
restrictions are as follows:
1. . Curricular constraints vary from term to term
but remain constant within a given term. The
number of degree plans and the number of
constituent courses for each degree plan are
finite, as are the number of hours per term or
week required by each course, the number of
faculty members required to teach each course,
and so forth.
2. Class meeting time objectives usually remain
fixed from term to term. Class meeting times
are restricted to constant patterns for the
term. For example, 10 to 11 o'clock Monday,
Wednesday, and Friday, or 9:30 to 11:00 o'clock
Tuesday and Thursday, and should remain constant
for several terms.
3. Administrative space-utilization concerns
remain constant for each term, but vary from
term to term. A finite amount of space exists
23
at the beginning of each term and new space
seldom becomes available within a term.
Restrictions such as need for special facilities,
size, et cetera, also remain constant for each
term.
Administrative constraints are not difficult to determine
once administrative objectives have been defined. The fact
that administrative constraints have constant values reduces
the complexity of models for class scheduling purposes.
Faculty Constraints
The restrictions placed on the university system
by the objectives of faculty vary from term to term but
remain relatively constant throughout a given term. Hours
and courses preferred by faculty members reflect numerous
restrictions. Instructors are qualified to teach certain
courses and have various priorities with respect to other
instructors. These limits are constant for a given term.
The hour restrictions placed on the university system
reflect the various other commitments of the instructor
and vary from instructor to instructor. For instructors
to attain their individual objectives, these constraints
must exist to insure a proper balance of work.
Faculty constraints appear once the objectives of
the faculty have been determined and remain constant for
any particular term. The university makes course demands
24
on its faculty and once the demands are set, it becomes
important to the faculty to indicate how they feel the
demands should be satisfied.
Student Constraints
Student constraints are extremely variable from
term to term but are considered to be fixed at least during
the master schedule-class schedule construction period.
The constraints depend on the number of students in each
degree plan, the position of each student in the degree
plan, the makeup of each student's overall load for the
term, and several other factors including student time
preferences.
Students have the option of changing degree plans
from term to term but not during a term. Once each student' s
position in a degree plan has been determined for a term,
the constraints for the term are fixed. The total demand
of the student population upon university resources is
determined by accumulating individual student demands.
This type of demand is limited to aspects of curriculum.
Students have other demands which differ from curriculum
demands, the best examples of which are preferred class
meeting times in order to insure employment and university-
related extracurricular activites.
Student curriculum constraints could be obtained
easily if degree plans were utilized. As for the remaining
25
student constraints, a system of predicting them would be
necessary. If the proper student records were maintained,
this task could be simplified. (4,10,18)
Once the specific objectives of the university
have been determined, the constraints are fixed. The
constraints usually have constant quantitative values for
each term but have the flexibility of varying from term to
term. This varying from term to term allows class
scheduling models to have the necessary flexibility to
represent all terms in general. Changes in administrative,
faculty, and student constraints from term to term may be
logically assumed, as well as rigidity of these constraints
for a given term.
CHAPTER III
MODEL DEVELOPMENT PROCEDURE AND EXPECTED RESULTS
Procedure
Model development procedure is divided into two
phases. The first phase is strictly a data processing
function to arrange the input information into a usable
form. The second phase uses the input to schedule classes
and produce the master schedule as output.
Phase One
It is assumed that all the necessary input informa
tion about students, faculty, and administration can be
obtained from a university information system consisting
of computer files and computer programs. This assumption
is in keeping with the concept of an automated scheduling
system and the fact that such theoretical systems have been
developed. (4,14,18)
Student Information
Student input consists of (1) the courses needed
for the term to be scheduled and the priority ranking
which denotes the intensity of this need; (2) a predicted
protected-time preference which, by utilizing computer
programs and identifying characteristics of each student
26
27
(employment status, sex, classification, et cetera),
is determined prior to input. (4,18)
Faculty Information
Faculty input consists of (1) a course priority
list which indicates which courses a teacher is qualified
to teach and the order of his preferences with regard to
these courses; (2) each teacher's protected-time
preference. These two teacher inputs may be taken from a
university information system in any number of ways. For
example, the information could be maintained in an updated
computerized file or produced by computer programs. What
ever the status of this type of information, it will be
assumed that it may be produced in a form usable as computer
input (tape, punch cards, et cetera).
Phase Two
Administrative Information
Phase Two begins after the student and faculty
data have been arranged. Phase Two concerns class scheduling
and master schedule construction. At this point, the model
incorporates administrative input. Administrative input
consists of resource information and management preroga
tives. In examining the university system with respect to
faculty and students, it is necessary that administrative
information for a given term take on constant values. This
28
is not a limiting assumption by any means. Universities
for the most part do have constant resource values for the
short term, for example, the number of class rooms available
for a specific time period. This assumption allows the
importance of administrative constraints to be exhibited
and permits consideration of more variability in student
and faculty constraints.
In Phase Two, an iterative process will occur in
the production of a final master schedule. During the
scheduling process, situations creating conflicts will be
repeated under a number of different conditions. If a
simple procedure of searching and combining input data
will not solve the conflict situations, constraints must
be relaxed. This must be done gradually, and will terminate
by either scheduling or rejecting a.course section. After
resolving the conflict, the system will be restarted under
the initial conditions and will schedule or reject the
next course section.
Scheduling will be done by course-section priority.
The importance of one course section in relation to the
others has been determined in Phase One, and positions will
remain fixed. Only the constraints will vary when con
flicting situations occur.
29
Course Arrangement
In Phase One, the student course requests are
arranged according to a cumulative importance for use in
Phase Two. In Phase Two, the proper constraint configuration
will be set for the beginning of each course-section
scheduling iteration. The arrangement of input data
retrieved from the university information system reflects
individual student needs for given courses. The student
need situation is two-fold. Alternatives for a given
course during a given term will either exist or not exist.
No-alternative course situations will be considered high
priority and situations with alternatives will be considered
lower priority. The need factor for a given no-alternative
course is calculated by tallying the number of requests
for that course. The higher the need, the sooner a course
is scheduled. A list of the courses will be prepared (as
part of Phase One) in descending order of need. In
Phase Two, students, teachers, times, rooms, et cetera,
will be scheduled one course section at a time in accordance
with this list. If the course section can be scheduled
under the initial constraints, then no relaxation of
constraints will take place. If the course section cannot
be scheduled under the initial constraints, constraints
y ill be relaxed until the course section is scheduled or
rejected by the heuristic.
30
Faculty Arrangement
Faculty input will be handled in a manner similar
to student course requests. When faculty input data is
retrieved from the university information system, a faculty
member's preference (need) to teach an individual course
will be reflected in the input data. In Phase Two, the
search for instructors, faculty preferences, and qualifica
tions for particular courses will be conducted according
to this arrangement. Again, as in course arrangement,
constraints will be relaxed in conflicting situations.
Scheduling
Scheduling proceeds by course section according
to the arrangement of the input information. Each course
is allocated instructors, rooms, students, and class meeting
times which create the fewest conflicts among students
and faculty and satisfy the largest possible number of
constraints. The order in which students and faculty are
considered for a given course section is dependent on the
input for Phase One (e.g., alphabetic order, social
security numbers, tenure, et cetera). Students with no
alternatives for the given course to be scheduled and
teachers with the highest preference for this course are
considered first.
31
Constraint Relaxation
The iterative process previously discussed under
Phase Two is broken into three distinct periods. The
first period is executed with all constraints in effect.
No constraint relaxation has taken place prior to or during
this period. Course sections are scheduled simply by
searching for an acceptable combination of faculty and
student objectives which can be scheduled with no relaxation
of constraints.
The second period begins when all possible combina
tions of administrative, faculty, and student objectives
have been searched with the full set of constraints in
effect and course sections for the course under consideration
are unscheduled. In the second period, the constraint
restricting the solution search to the set of most favorable
class meeting times will be relaxed, and the search will
begin again. All class meeting times not previously
assigned to the course section will be available for
scheduling.
The third period begins when all possible combina
tions of administrative, faculty, and students objectives
under the conditions of the second period have been exhausted
In the third period, no preferences for faculty and student
objectives will be recognized. All possible combinations
which will satisfy need are considered and desirability is
disregarded. This operation of the model with the fewest
32
possible constraints is a determinative effort to schedule
a course section. If this effort fails, the course
section must be rejected.
Expected Results
Class scheduling, as approached in this research,
will utilize information from a standard data base to
demonstrate that an efficient heuristic procedure can be
developed for class scheduling. The use of an automated
standard data base can provide information of a quality
necessary for a scheduling procedure to produce a
satisfactory solution. The following discussion will
present the demands to be satisfied.
University Demands
The university functions to meet educational needs,
the majority of which are represented as course demands.
Quite naturally, course demands are made by students, and
a critical objective of the university should be to meet
these student demands. This is the central idea of the
procedure developed by this research to satisfy student
course demands through appropriate utilization of university
resources. This satisfaction of course demands will con
sider administrative, faculty, and student objectives in
the order of their importance to the university as a
whole.
33
Student Satisfaction
Once the accumulated objectives of the student
population have been defined, a method of approach for
meeting these objectives must be determined. By placing
each student into his chosen degree plan it is evident
(assuming these degree plans are similar to present degree
plans) that, in the progression of individual students
through their respective plans, certain courses are more
urgently needed than others and must be identified. The
urgent courses needed by the highest nurnber of students
should be the first courses considered. Students requiring
a needed course who have no alternative to that course
should be considered before students requiring the same
course and having an alternative. This presents a method
for considering the critical courses first and the less
critical courses last.
This research will consider the course demand as
the most important objective. If a situation exists where
the university system can accommodate the additional student
desire for protected times, then this will be considered,
but only if it will not totally block consideration of an
individual student's critical courses.
Faculty Satisfaction
Satisfaction of faculty objectives is approached
similarly to satisfaction of student objectives. Instead
34
of recognizing critical courses, an order of course
teaching preferences is established and an attempt is made
to satisfy them. If the university system can also satisfy
preferred teaching-time desires without disrupting the
priority scheme of desirable courses, then this objective
will be approached.
Administrative Satisfaction
Administration objectives must be satisfied for
each term. However, measures of dissatisfaction should
be maintained so the proper constraints may be adjusted
to promote satisfaction of faculty and students. The
university system which recognizes the satisfaction of
student and faculty course demands as an important objective
should be able to schedule classes more effectively than
a system which makes no attempt to utilize student course
demand.
The problems attendant to the simultaneous solution
of several objective functions cannot yet be solved.
Ranking these problems by importance can significantly
reduce their size and produce a workable solution which
has taken all objectives and constraints into consideration.
This method should produce a better solution than the
present applied class scheduling methods because more
input information is available, especially with regard to
student course needs.
CHAPTER IV
MODEL DEVELOPMENT AND OPERATION
The major emphasis of this research is development
of a procedure for construction of a master class schedule
and scheduling class sections in a manner which considers
student, faculty, and administration desires as model
constraints. The model constructed by this research will
be heuristic, and will produce a solution from the set of
feasible solutions that attempts to satisfy all student,
faculty, and administration constraints. The constraints
broken to obtain a workable schedule are those whose
elimination would affect the reamining set of constraints
the least.
Model Operation
At this point, the detailed operation of the model
developed by this research will be discussed. A generalized
flow chart is shown on the following page. This flow chart
contains an overall view of the logic involved for model
operation. More detailed flow charts are contained in the
appendices.
Phase One
In Phase One, the input data is arranged and files
are constructed for use in Phase Two. Of major interest
35
( START
36
CONSTRUCT STUDENT FILE
CONSTRUCT PRIMARY COURSE REQUEST
EXLE
CONSTRUCT ALTERNATIVE COURSE REQUEST FILE
CONSTRUCT FACULTY FILE
CONSTRUCT COURSE-TEACHER FILE
SCHEDULE INDIVIDUAL COURSE SECTIONS
OUTPUT STUDENT, FACULTY. AND MASTER CLASS
SgHSPVLE
c END 3 Fig. 1.—Overall Operation of Research Procedure
37
in Phase One are faculty and student course-time demands.
Data about these demands are assumed to be obtainable in
a usable form from the University Information System. (18)
Student course demands are presented as primary
requests with corresponding alternative requests. Primary
requests consist of the courses which are first in
importance, and the corresponding alternative courses are
those which will be considered as acceptable substitutes
in the event that the primary request is rejected. Student
time demands are presented as times that individual students
do not wish to attend class. (4,12)
Faculty course demands v;ill be presented as a list
of courses a faculty member desires to teach and the order
in which he is to be considered for teaching each course.
Faculty time demands are those hours during which individual
faculty members do not wish to conduct class.
Once the faculty and student course-time information
has been input in Phase One, three lists are constructed.
The first list consists of all student-requested primary
courses for which no alternatives exist. These courses
are arranged in descending order according to the total
number of no-alternative requests for each primary course.
The second list consists of all alternative course requests
for any primary request, arranged for each in descending
order according to the total number of requests for each
alternative course. The third list consists of the faculty
38
member available to teach each course. Teachers are
assigned to courses in accordance with a faculty priority
list.
A test model of class scheduling has been con
structed and appears in the appendices. Phase One is sho' m
in Appendices A-E. Appendix A shows the student course-
time demands and Appendix D shows faculty course-time
demands. Appendix B shows the list of primary course
requests; Appendix C, the list of alternative course
demands. Appendix E shows the list of faculty available
to instruct each course.
Phase Two
In Phase Two, students and faculty are scheduled
into course sections and a master schedule is produced at
the end of the scheduling procedure. Appendix F shows
Phase Two operation. The model cycles three times and all
constraint levels for students and teachers are possible
in each cycle. Administrative constraints are represented
as fixed model parameters in Phase Two.
Constraints are kept tightest when faculty and
student time preferences are considered, and are relaxed
when conditions in scheduling individual course sections
necessitate such action. The student time-preference
constraint is relaxed first, faculty time preferences,
second. Only the faculty membef and the students being
39
considered for an individual course section undergo con
straint relaxation at any given point in the scheduling
procedure.
The first two cycles of the model are controlled
by the primary course request list and the third cycle
is controlled by the alternative course list. The model
schedules one course at a time, according to its position
in the list being processed.
Cycle one schedules courses according to the primary
course list. All students who request this course with no
other alternative are considered at this time. Only the
students requesting a given course and having no other
alternative are scheduled in the first cycle.
Cycle two schedules according to the primary course
list, also. Here, the students to be considered have an
alternative to the given course. Students remaining after
two cycles with unfulfilled course requests will be
scheduled or rejected in cycle three.
Cycle three schedules according to the alternative
course list. All students who were not previously scheduled
in a primary request with a given course as an alternative
will be considered here.
The scheduling procedure begins with the constraints
at the tightest level. The first available faculty member
to teach a course section is selected and his first period
of availability to teach this co'urse section is located.
40
Next, the students requesting this course on this cycle
are searched until enough students to fill a section are
located for this class meeting time: the students are
scheduled in this section; the process is repeated with
another instructor and the remaining students requesting
this course on this cycle. In the event that not enough
students can be located to fill a section for a given
faculty member at a given class meeting time, another class
meeting time for this faculty member is located, and the
student search is repeated at the new class meeting time.
This process is repeated until no available class meeting
times remain or the teacher is scheduled with a course
section. When no available time periods remain under the
tightest constraint level, then the constraints are relaxed,
with student time-preference constraint being relaxed
first, as mentioned above.
At the first constraint-relaxation point, the
scheduling process begins again for a given course. The
same procedure is followed as before, but now a time-
preference will be disregarded if a course section can be
filled at a given point in a cycle. This condition holds
until the faculty member under consideration for the given
cycle has been placed into a section or no more available
time periods remain. At this point, the teacher time-
preference constraints are relaxed.
41
As before, in scheduling a course, the earliest
possible time is located. Any time period which had
previously been blocked as a teacher's protected time is
now considered as an available time to conduct a course
section. Also, student preferred-time constraints are
broken if necessary for scheduling a course section. These
conditions remain in effect until the teacher has been
scheduled in a given course section or no more available
time periods exist.
Student course requests are rejected in either
cycle one or cycle three if all possible constraints have
been relaxed and the course section under consideration has
not been scheduled. Students and faculty members can be
scheduled in any one of the three cycles under any con
straint setup, if necessary.
Student and faculty time preferences are ignored
only if a course section cannot otherwise be scheduled.
These constraints are not automatically broken from this
time forward in the scheduling procedure. Initially, when
scheduling a given course the constraints are in effect
and are relaxed for this course when the situation dictates.
The previous discussion has referred only to the
faculty and student constraints. Administrative constraints
are fixed parameters of the model in Phase Two. Examples
of these constraints are class meeting rooms, class meeting
time patterns, hours of class attendance for each course.
42
and section size. These parameters remain constant
throughout the three scheduling cycles.
Comparison to Previous Research
In the model presented by this research the heuristic
procedure will operate as follows: The university adminis
tration defines the capabilities of its resources for
class scheduling; next, the students and faculty make
demands on these resources in the form of courses and
preferred class attendance times. Once university cap
abilities, course demands, and time demands have been
defined, the courses are arranged in the order of most
critical demand, and scheduling is done one course at a
time until a final master class schedule has been produced.
A Comprehensive University Scheduling System
The first comparison will be made to a system
developed by James F. Blakesley and referred to as
"CUSS." (5,6) Originally, this system was developed to
assist Seattle University in building master class schedules
for future terms. The overall procedure is one of local
optimization rather than global optimization with respect
to individual courses and therefore is considered a
heuristic procedure by this research. The system worked
well at Seattle University and attempts are being made to
apply CUr* to the main campus of Purdue University.
43
Seattle University has an enrollment of about
6,000 students, whereas the main campus of Purdue has about
20,000 students. Consequently, one of the problems in
adapting CUSS to Purdue was the large size of the student
population. CUSS considers one course at a time, attempting
to isolate the best times to offer course sections by also
considering other courses requested by students requesting
the course being scheduled. CUSS then assigns a class
meeting time, a room, and an instructor to each section
of the course considered.
The heuristic procedure of this research differs
from CUSS in that the model presented here considers
faculty and students in relation to the potential section
composition of only one course, and other course requests
are not considered during the scheduling phase. The
previous phase of the model has taken into account the
interdependence of courses. By approaching one problem
at a time, the problem of size can be reduced enough that
the size of a university should have a smaller impact on
the scheduling model.
Another point of difference is that the entire
model developed by this research is a heuristic procedure,
and not one of local optimization. When considering a
large set of feasible class meeting times, in combination
with faculty, facilities, and potential student, the local
optimum solution may not be a great enough improvement
44
over a heuristic solution to justify a continued search
for the optimal solution. Early in the simulated scheduling
procedure a large number of feasible solutions exist, and
choosing one solution over another at this point has little
effect on solutions chosen later on. For example, the
procedure begins initially with almost all class meeting
periods being available. The end of one scheduling itera
tion for a course section temporarily has eliminated one
period for the teacher and one period for each student
scheduled in this course section. At this point in the
scheduling procedure the available periods all are of equal
weight. Only one period will be eliminated for each teacher
and student involved, leaving a large number of periods
remaining available. It is the hypothesis of this research
that by choosing any solution, the overall feasible solution
set remaining would not be greatly affected as compared
to choosing the local optimum.
General Academic Simulation Programs
The second comparison will be made to a system
produced by the Massachusetts Institute of Technology and
titled "GASP." (10) GASP was originally designed for use
in high schools to construct master class schedules and
to schedule classes, but it has been used to some extent
to aid MIT in these processes. It is a heuristic procedure
45
which combines manual methods and computer models to produce
the end result.
GASP starts with a manually constructed master
class schedule as input. The initial construction uses
all or part of the student requests as a guide to determine
class section size and class meeting times. The scheduling
procedure of GASP matches students, faculty, and rooms to
the course sections. Conflicts in time periods that cannot
be resolved by shifting students, faculty, and rooms into
other course sections are tabulated and printed out at the
conclusion of the scheduling phase.
At the conclusion of the scheduling phase, the
master schedule is altered manually by the administration
in an attempt to resolve conflicting situations; then the
scheduling procedure is repeated. The process of scheduling
followed by master schedule alteration continues until the
number of conflicts is reduced to an acceptable level.
The number of cycles required to obtain an acceptable
number of conflicts was usually in the neighborhood of
twenty, and about 5 per cent of the student requests were
rejected by the process. (10)
One advantage of the model developed by this
research is that the master schedule is only produced one
time at the end of the scheduling procedure. Also,
section composition—faculty and students in each section—
and class meeting times are allowed to vary until an
46
acceptable class meeting time for the faculty and students
under consideration has been located.
Other Comparisons
Other models have been constructed using different
procedures. One method is to schedule one student or
batch of students at a time to establish a master class
schedule. (13,18) The major disadvantage here is that
students not appearing at the first of the scheduling
list are usually forced to take what remains after others
are registered whether they requested it or not.
Scheduling by course rather than by student is less prone
to bias, and this is the major reason a heuristic procedure
that schedules one course at a time was chosen.
Another procedure is to obtain enough computer
hardware to be able to schedule by computer using the
same process as used in a manual method. This usually
does not produce a better scheduling system because such
a procedure increases registration costs in that personnel
requirements are not reduced and the computer cost is
added. In addition, the input information required for
efficient scheduling is not available for decision making.
CHAPTER V
MODEL EVALUATION
Model Construction
The information used to test the model developed
in this research was obtained from 175 student volunteers
in the Texas Tech University School of Business Adminis
tration. These students allowed use of their transcripts
in generating course demands for building a model to test
the heuristic procedure of this research. These 175
students were the only ones available for research purposes
When reviewing the test model it will be helpful to
remember that only 175 students were used and that each
student was enrolled in one of six sample degree programs
for the School of Business Administration.
Student Information
The sample of 175 students from the School of
Business Administration of Texas Tech University was taken
in the Spring Term of 1970. Permission was obtained from
these students to use information in their transcript
files for various studies to be conducted by the Texas
Tech University Office of Planning and Analyses.
First, each of the 175 students was placed in
his respective degree plan as stated in the Texas Tech
47
48
University General Catalog 1970-1971. A sample of six
degree programs was used and each student was in one of
these six degree programs. The degree program and the
current position were determined from the student's
transcript. Each student was assigned five courses from
his respective degree plan. Out of the five courses one,
two, or three of the courses represented no-alternative
course requests (an average of two no-alternative requests
was maintained over the entire number in the sample),
and the remaining number of requests for each student
had four alternatives listed for each request.
Student protected-time preferences were estimated
in another study conducted by the Texas Tech University
Office of Planning and Analyses. Each of the 175 students
was assigned fifteen to eighteen hours of protected time.
Student identification data was taken directly
from the student's transcript and punched on data cards.
This data consisted of the student's name, social security
number, classification, major code, and a model code
number, which was arbitrarily assigned to each student
to identify him in test model use. Appendix A contains
a sample of student input information.
Faculty Information
Faculty information was not available in the same
form that student information was available, which would
49
have been individual records. This situation created the
need to generate hypothetical faculty information. The
faculty information was generated by subjective thought
in conjunction with a computer program listing each course
and the number of primary and alternative student requests,
and a Texas Tech University General Catalog, 1970-1971.
The General Catalog provided the names of faculty members
from the various departments, and the computer program
provided an-estimate of the number of faculty members
needed to satisfy the potential demand for each course.
Each faculty member was arbitrarily assigned
either one, two, three, four, five, or six courses which
he was considered qualified to instruct. These courses
were listed in a manner which represented his personal
preference for teaching each course. This process continued
until it was felt that about 50 per cent more instructors
than necessary had been accumulated to instruct each
course. This allowed at least enough faculty members to
be generated on the first attempt, so that computer runs
could be minimized. Also, each faculty member was restricted
to only one department and allowed to teach only courses
in that department.
Each faculty member received an arbitrarily
assigned free period of preferred blocked-time period.
The number of blocked times varied from twenty-four to
twenty-seven hours of potential class meeting times.
50
In addition to course and time information, each faculty
member was assigned a department number and a model code
number. Appendix D contains a sample of faculty input
information.
Model Proportions
In developing a model to test the heuristic of
this research, a meaningful scale factor was needed in the
model's construction to relate the test model to a
university. The data used in building the test model
presented some problems in scaling it. The following
discussion will be concerned with the problems of con
structing a test model for class and master scheduling
and the scale used.
Courses and Course Sections
The first scaling problem was to select a parameter
which could be used as an overall guideline to constructing
a scale model. This parameter must be obtainable from the
working system. In this research, the number of courses
and the number of corresponding sections of each course
were considered as the overall parameter to be used as
a guide to scaling the model, because they were representative
of the university's supply and demand, and could be
determined with a relatively small amount of research.
51
The number of courses offered for the Fall of 1970
(approximately 1,700) was obtained from the Texas Tech
University Schedule of Classes. The total number of course
sections offered in the Fall of 1970 (approximately 3,400)
was obtained from the Texas Tech University Office of
Institutional Research. This ratio of total course
sections to-total courses offered was kept constant in
scaling the test model. The test model offered 240 courses
and required about 480 sections.
While the ratio of the total number of course
sections to the total number of courses was approximately
the same for the model as for Texas Tech University, the
ratio of individual course sections to individual courses
was not maintained because of the nature of the sample.
The 175 student sample consisted primarily of business
administration students; hence the section make-up, with
respect to student degree plans, of the model was not
representative of the university section make-up. If a
count could be performed of the courses actually offered
and the sections for each course, it is possible that all
course sections listed in the Schedule of Classes are not
taught this semester while some others have a larger
number of sections actually taught than listed. These
differences between individual courses should not be
points of major concern. The important point—that some
courses need more sections and others fewer than the
52
university has resources to satisfy—has been considered
in constructing the test model.
Faculty Scaling
Student course requests were generated first, and
then the faculty was generated to handle the course requests
Determining the number of faculty members required by the
test model to handle the course requests is the next
aspect to be considered.
The model generated approximately 300 instructors,
or about 50 per cent more than actually needed; this was
done to avoid having to rerun the model numerous times
while searching for the desired number of instructors.
The only reason for this was to minimize the number of
runs on the computer. In an actual application this step
would not be performed; however some needed sections
might not be taught due to a shortage of instructors. As
will be shown later, this number was reduced to 200. Data
from the Texas Tech Office of Institutional Research
showed that approximately 1,400 instructors were available
for the Fall of 1970. If the same ratio of test model
instructors to Texas Tech instructors is to be maintained,
about 200 model instructors are required. An intuitive
estimate allowed the average number of courses to be
taught by each instructor to be about three for Texas
Tech and about three for the test model.
53
A separate computer program was written specifically
to reduce the number of instructors to the proper ratio
in the test model. After the list of instructors for each
course in order of relative preference had been constructed,
a reduced list was produced eliminating approximately one-
third of the instructors for each course (this was con
ducted before the model began to schedule course sections).
This process effectively cuts the number of professors for
each course by one-third par course resulting in avail
ability of 200 instructors and thus obtaining approximately
the desired ratio of instructors to test model sections,
which would approximate proportions at Texas Tech
University.
Student and Section Size
If the appropriate ratio of test model students
to Texas Tech students is to be maintained, approximately
3,000 students are needed. The restrictions placed on
university use of student records at Texas Tech, and the
quantity of data which subsequently would have to be
gathered, necessitates another approach in obtaining the
needed student input. A relationship exists among course
section size, number of courses requested per student, and
total number of students. It is not difficult to make
175 students carry the weight of 3,000.
54
During the process of generating student course
requests, it was hoped that the total number of primary
requests would produce the desired number of course
sections. Course sections can be produced with a section
size of two. In this research, the section size is
important only with regard to the effect it has on the
total number of course sections, and not the psychological
effect it may have on administrators who visualize their
university conducting numerous courses with an enrollment
of two students per section. The approximate number of
sections is close enough to force a large amount of
university resources to be used.
The number of rooms required to conduct the course
sections was scaled using the same ratio. The Texas Tech
Office of Institutional Research indicates that Texas
Tech has about 260 classrooms, which produce about forty
rooms for the test model. Special qualifications for the
rooms were ignored and only the total number of rooms was
considered. This allowed any course section to be con
ducted in any available room.
The use of overall figures in scaling down the
test model is necessary because of the emphasis of this
research. Since the objective of this research was to
develop a heuristic procedure and test this procedure in
class scheduling, the envolvement in data collection was
to be minimized. The output of the test model is not
55
aesthetically sound for the sake of appearance, but the
effects of the test model are sound with respect to class
scheduling.
The following discussion will explain the output
produced in Phase Two, which is the class scheduling and
master schedule production phase of the test model.
Model Performance
Execution Time
The total execution time for the model, if applied
to a university such as Texas Tech, would be about seventy
hours—or close to three days. This estimate is based on
the total combined time used on two different computer
systems. Phase One was executed on an IBM 360/50 with OS
capability in a regular job stream with no provisions for
simultaneous execution or job interrupts. Phase Two was
executed as a batch job of low priority on a UNIVAC 494
Real Time System with provisions for simultaneous execution
and job interrupts. Linear extrapolation is used here as
a means of relating test model execution time to a large
size university, but the question of linearity as an actual
trend is not the focus of this research. In the following
section potential ways of reducing execution time will be
discussed.
56
Phase One
This phase, which constitutes the smaller portion
of the total model execution time, involves three
functions: (1) construction of the primary course request
list, (2) construction of the alternative course request
list, and (3) construction of the ordered list of teachers
who will instruct each course section.
Preparation of the primary course request list
and the alternative course request list took approximately
fifty-five minutes—twenty-five minutes to accommodate
approximately 105 different primary course requests, and
thirty minutes to construct an alternative course request
list of approximately 240 different courses. A linear
extrapolation applied to a university such as Texas Tech
(with approximately 1,700 course requests) would indicate
that preparation of these two lists would require approxi
mately six and one-half hours. About 45 per cent of this
six and one-half hours, or about three hours, would be
used for primary course request list preparation. As
will be shown in the following chapter, the additional
three and one-half hours required for the alternative
course list preparation could be eliminated by efficient
modular construction.
The remaining student information produced in
phase One of the test model would be obtained from a
University Information System. Since this information
57
would include student course requests and blocked times,
additional data processing would be involved in producing
it as input to the heuristic class scheduling and master
schedule construction model.
Preparation of the ordered list of teachers for
each course section required approximately three hours for
the original 300 instructors placed in the test model.
Again, a linear extrapolation applied to a university such
as Texas Tech (with approximately 1,400 instructors) would
show that approximately fourteen hours would be needed
to prepare this list. The following chapter discusses
potential methods of reducing this amount of time.
A University Information System would furnish the
remaining faculty information, including faculty course
preferences and blocked times, in a manner similar to the
acquisition of student information previously discussed.
This information once established could be a permanent
part of the University Information System and updated
periodically to keep current with faculty information.
Phase Two
Phase Two constitutes the larger portion of model
execution time and is broken, as was Phase One, into
three parts: (1) file initialization, (2) course section
scheduling and file updating, and (3) report production.
58
Execution time for this phase of the test model
was approximately seven and one-half hours. The first
and third parts of this phase took approximately fifteen
minutes each, while the second part took approximately
seven hours. The first part sets up the various direct
access files to be used in the second part, which involves
updating these files. The third part interrupts the
updated files and outputs the individual student schedules,
faculty schedules, and the master class schedule.
In the second part of Phase Two, approximately
400 course sections were scheduled. Again, if a linear
extrapolation were applied, completion of this part of
Phase Two would require about sixty hours for a university
such as Texas Tech. About four additional hours would
be required for the first and third.parts of Phase Two.
The following chapter deals with potential ways of
decreasing the amount of time involved.
Student Constraints
The students' sample made a total of 875 course
requests, seventy-five of which were not satisfied. About
600 of the requests satisfied were primary requests, and
the remainder (about 200) were alternative requests.
Unavailability of common unscheduled class meeting times
accounted for only about five course rejections. Instructor
unavailability and insufficient numbers of student requests
59
caused the remaining seventy rejections. Lack of a meeting
place never caused a course section to go unscheduled.
Only eight course requests were scheduled in the corre
sponding student initial blocked times.
Faculty Constraints
Satisfaction of faculty course requests, in a
preference arrangement, was achieved for instructors
giving preferences to teach courses from the Texas Tech
School of Business Administration. This was predictable
because the sample of students used represented only
business administration majors. Faculty from the School
of Business Administration received complete course
schedules, while faculty representing other disciplines
received incomplete course schedules. Also, out of 200
faculty each with twenty-seven hours of block time, one
faculty member was scheduled a course section in an initial
blocked time.
Evaluation
The procedure mainipulated the test data under
adverse circumstances. Both computer systems used were
limited by two factors: first, slow input/output devices;
and second, each system was operating twenty-four hours
a day with the procedure receiving computer time when time
was available. These two factors are major contributers
60
to the length of execution time for the test model. Also,
the scheduling procedure did not have a large number of
demands remaining unsatisfied. About 9 per cent of course
requests from students were unsatisfied and negligible
(less than 1 per cent); blocked times for students and
faculty were broken.
A proper prospective must be maintained when
evaluating the procedure of this research. The test
model relies heavily on computer peripheral devices
(external memory) and used a minimum of internal memory.
An increase in the use of internal memory would reduce
execution time and, conversely, a decrease in external
memory v/ould increase execution time. Also, increases or
decreases in the types of constraints placed on the pro
cedure would increase or decrease the execution time.
The following chapter will discuss potential
procedure improvement and conclusions about the overall
research.
CHAPTER VI
CONCLUSIONS AND RECOMMENDATIONS
Data Processing
Two important data processing techniques would
have increased programing efficiency and decreased execu
tion time for the test model developed by this research.
Utilization of these two techniques, as a matter of
convenience, will be referred to as file order and file
reference.
File Order
Faculty and student information should have been
more efficiently organized. For example, faculty informa
tion could have been arranged by department, so that the
model in searching for an instructor for a given course
would scan only the faculty in the appropriate department
rather than every faculty member. As it was, the model
had to first determine whether or not he was in the
appropriate department and then check to determine if he
had requested to teach the course. By having the model
search only one department at a time, the necessity of
assessing every record in the file could be eliminated.
The course file is not only prepared by a sequential
searching technique as mentioned^ above; but it is searched
61
62
sequentially every time the file is referenced in Phase
Two. Therefore, the creation of a file which could be
searched by sections (departments) would reduce the
execution time of Phase Two.
File Reference
In files assessed frequently for small amounts
of information, each record should be readily available.
Time-wasting searches could be eliminated by a file index
system. The index should be small to be searched rapidly,
but thorough enough that the location of the desired record
could be easily determined. The record could then be
assessed directly without searching.
The primary course request list could have been
indexed to save time. For example, the test model used
a course number from the primary course request list in
locating students for a given course. This entailed a
sequential search of the entire list of student course
requests. If, however, this file had been constructed
so that each course and each student requesting it were
identified by an index number, sequential processing could
be eliminated. The student course request file could be
processed directly, and only the student course request
in question would be referenced, thereby saving some
execution time in Phase Two.
63
The file order and file reference techniques men
tioned here might not apply in all instances, but an
investigation into their possibilities should be undertaken
Computer Programing Improvement
Two other areas in need of improvement are com
puter program routines and computer model construction.
Improvement in these areas is to a large extent contingent
upon the computer hardware to be used. More efficient
computer programs and larger individual program modules
require a larger computer. Available computer hardware
will not always handle more efficient scheduling models.
However, assuming the availability of sufficient computer
hardware efficiency with respect to routine and modular
construction will be discussed.
Efficient Routines
This area has the greatest potential for reducing
execution time, for we can achieve greater efficiency
by removing redundance in the data processing routines.
For example, during the execution of Phase Two, all
potential class meeting times were assumed available at
the start of the scheduling procedure for each section,
and each time was scheduled whenever the scheduling
procedure changed to a different constraint setup. Each
student's time array was checked to determine whether
64
enough students are available at a potential class meeting
time under a given constraint level. if, after searching
the list of students requesting the course, it was dis
covered that not enough students were available, the first
potential class meeting time should have been eliminated
in attempting to schedule other sections of the course at
this constraint level. This approach would mean revision
of the routine developed in this research, but it would
also reduce the set of feasible solutions by at least one.
Efficient Modular Construction
An improvement in this area would be construction
of program modules which can be executed simultaneously,
thus decreasing total model execution time. For example,
the primary and alternative course request lists could be
constructed for simultaneous execution.
The program modules which handle the two lists in
the present model execute sequentially, constructing first
the primary course list and then the alternative course
list. However, since each list is created by a separate
program module, they could be produced simultaneously,
thus decreasing the total execution time involved in their
construction by approximately 50 per cent. Additional
research might reveal more areas in which the simultaneous
execution could be utilized.
65
Constraint Modification
Research is needed in the areas of faculty and
student course-time demand constraints to determine the
parameters of these demands for given administrative
constraints. Constraints for student and/or faculty could
be varied to study the effects on the total system. Also,
the varying of administrative constraints could produce
interesting effects. The object of research in the area
of faculty, student, and administrative constraints should
be to investigate the potential relation, if any, among
the various types of constraints and how to improve
scheduling model operation in light of these relations.
Conclusion
The focal point of this research was development
of a heuristic procedure for class scheduling and master
schedule construction. A procedure was proposed and a
test model developed. The results yielded by the test
model and the extrapolations concerning application to
universities indicate that a workable model might be
developed along the lines suggested by this research.
The approach taken in this research can be tempered
any number of ways to produce different results. For
example, additional computer routines could be written
which would more finely define the restrictions to be
placed on the university. The additional routines would
66
be able to select specific class meeting times for a given
course and schedule that course in a particular room most
suitable to faculty, students, and administration. As
another example, actual student and faculty input could
be used in conjunction with information from past master
class schedules to aid administration in forecasting the
future physical facilities for the university.
In addition, the demands on the university from
term to term can be handled by the procedure developed in
this research. This procedure has the flexibility to
process the variability the university environment presents
from term to term.
The scheduling of course sections and production
of a master schedule simultaneously has the advantage of
producing a more acceptable master schedule the first
time. In addition to this, the master schedule produced
reflects the actual demand during scheduling and the number
of students, faculty, rooms, and so forth, has been captured
for future use. This offers the advantage of reflecting
actual demand during the scheduling procedure when needed
and promoting more accuracy for forecasting future master
schedules.
In the area of lead time to produce the master
schedule additional research will be required. Pre
registration systems are in effect at numerous universities
and these systems have a master 'schedule prepared well in
67
advance of the beginning of the next university term. The
procedure of this research would produce a more detailed
master schedule and no doubt additional research will be
required so that the master schedule for the next term
would be produced with the appropriate lead time. Such
problems encountered would be as: lead time to procure
course supplies—text books, lab material, et cetera,
and the time at which transfers and course changes among
faculty and. students no longer place a prohibitive
restrictions on the university data base—the frequency
of updating prohibits the use of the information stored,
because it becomes obsolete before it can be used.
The data and execution time areas of the model
were discussed in the preceding chapter. The lack of
information to make comparisons is an additional restric
tion placed on any type of strict evaluation, but a rough
economic picture can be constructed. For instance, a
registration system such as Texas Tech University requires
about 200 additional employees for about thirty hours of
registration at the wage rate of approximately $2.00 per
hour. This amounts to about $12,000 per term for registra
tion. The use of a computer system is usually leased for
a fixed amount or purchased outright and the only cost
incurred would be the opportunity cost associated with
using the computer time for registration instead of regular
day-to-day operation. The opportunity cost could appear
68
as overtime for regular computer staff or the outright
purchase of time from another computer system. If seventy
hours of overtime were required at the Texas Tech Computer
Center, twenty people at $3.00 an hour would amount to
about $200. An evaluation on this assumption shows an
automated system could be less costly than the manual
system presently operating. If seventy hours of additional
computer time were purchased from an equivalent system
at $300 per hour the cost would be $21,000. If a value
could be associated to the loss of student and faculty
enrollment due to uncompetitive class scheduling procedures,
poor master schedule construction, and ineffective means
for forecasting student-teacher demands an automated
system could be less costly than a manual system.
Just how practicable the procedure developed in
this research is and its worth remain subjective apprisals
by the potential user. Additional research would be
beneficial to reduce computation time; also an extensive
application would be necessary to reliably estimate both
computation time and the effectiveness of the procedure.
But, with little or no additional research, the procedure
presented could be partially implemented as a forecasting
technique. Specifically, student course demands could be
predicted for a given term even though class meeting times
probably would not be assigned at this time.
69
However, it can be assumed the universities will
be requesting such procedures in the future for class
scheduling and master scheduling. This research procedure
does present an efficient method for handling the variety
of class scheduling demands which will be presented to
the universities and at no great additional costs to the
university. This procedure will utilize information
presently available to universities with little or no
additional cost to obtain it in a useable format.
REFERENCES
1. Abell, V. A.; Blakesley, J. F.; Morgan, G. E.; and Sherwood, W. C. "A Comprehensive University Scheduling System." Lafayette, Indiana: Office of Schedules and Space, Purdue University, 1965.
2. Abell, V. A. "Purdue Academic Student Scheduling." Lafayette, Indiana: Office of Schedules and Space, Purdue University, 1965.
3. Baughman, W. E. "A Computerized Educational Scheduling System." Master's Thesis, University of Pittsburgh, 1965.
4. Bicket, Edward L., Jr. "Development of a Master Computerized Student Record." Master's Report, Texas Tech University, 1970.
5. Blakesley, J. F. "A Data Processing System for Scheduling University Students to Classes Using an Intermediate Speed Digital Computer." Master's Thesis, Purdue University, 1970.
6. Blakesley, J. F. "Administration-Integrated Records and Procedures." In Computers and Education, edited by R. W. Gerard. New York: McGravz-Hill, 1967.
7. Brubaker, J. E. "Computer Learning Theory in University Scheduling." Master's Thesis, University of Pittsburgh, 1961.
8. Harding, R. E. "The Problem of Generating Class Schedules for Schools." Ph.D. Dissertation, Carnegie-Mellon University, 1968.
9. Holzman, A. G., and Turkes, VI, R. "Optimal Scheduling in Educational Institutions." U.S. Department of Health, Education, and Welfare, Office of Education—Cooperative Research Project No. 13 23. University of Pittsburgh, 1964. (Mimeographed.)
10. Murphy, Judith. "The Story of GASP." New York: Education Facilities Laboratories, Inc., June, 1969.
70
71
11. "Notes from UCLA Registrar's Office." Office of Planning and Analyses, Texas Tech University, 1970. (Unpublished.)
12. Schoeman, Milton, and B?iaumik, Gora. "A Class Scheduling Model and Algorithnn." Reproduced from Universitv Management Models, Project Generalized University of Texas at Austin, 1970. (Mimeographed.)
13. Stewart, J., and Clark, R. L. "University of Maryland Student Scheduling Algorithms."
• In Proceedings of the 1968 ACM National Conference. College Park, Maryland, 1968.
14. Thompson, G. L. "A Method for Scheduling Students - to Classes." In Recent Advances in Optimization Technigues, edited by A. Lavi and T. P. Vogl. New York: John Wiley and Sons, Inc., 1966.
15. Tomei, Mario Joseph. "An Analysis of the Experience and Effects of Computer Assisted Scheduling." Ph.D. Dissertation, Temple University, 1970.
16. Turksen, Ismail B. "A Micro Level Forecasting Model of Student Enrollment." University of Toronto, 1970. (Mimeographed.)
17. Turksen, Ismail B., and Holzman, A. G. "Micro Level Resource Allocation Models for Universities." Paper presented at the Thirty-Seventh National Meeting of the Operations Research Society of America, V' ashington, D.C., April, 1970.
18. White, Langdon. "A Simulation Algorithm for Student Registration at Texas Tech University." Master's Thesis, Texas Tech University, 1969. (Parts I & II.)
INTRODUCTION
The following discussion describes the test data
and working programs developed. Each appendix describes
the program statements and gives samples of the input and
output for each program module.
History
The test data was generated from the transcripts
of 175 Texas Tech University students from the Spring
Semester of 1970. This data was the only information not
specifically created for the model's use. (Texas Tech
University Office of Planning and Analysis has used informa
tion about these 175 students to conduct other research
related to university management problems.) All faculty
and administration information was created specifically
for the test model and is not necessarily representative
of faculty and administration desires.
Description
The following is a description of the overall test
model which consists of twelve (12) individual program
modules.
Title: "A Heuristic Test Model for Class Scheduling
and Master Schedule Construction"
Programmer: Gary Hornbeck
73
74
Advisor: Dr. Milton L. Smith
Language: FORTRAN IV
Compiler: Phase I - IBM FORTRAN G. Phase II -
UNIVAC FORTRAN
Machine: Phase I - IBM 360/50 with OS capability.
Phase II - UNIVAC 494 real time system.
Approximate Core Space: Phase I - 153,600 bytes
including compiler. Phase II - 9000 words
for load element.
Addition Comments: One seven tract tape was used
to keep permanent files and one scratch disk
was used for temporary files.
Flow Chart: Figure L - Overall Program Flow.
Example Job Control Language: (IBM): Phase I
For two sequential tape files.
//GO.FT3 3F001 DD UNIT=TAPE7,V0LUME=SER=11118,
LABEL=(,NL),
// DISP=(OLD,KEEP),DSN=COREG,DCB-LRECL=80,
// BLKSIZE=800,RECRM=FB,DEN=2,TRTCH=ET)
//GO.FT33F002 DD UNIT=TAPE7,VOLUME=REF=*.
FT3 3F001,LABEL=(2,NL),
// DISP=(NEW,KEEP),DSN=ORDER,DCB=(LRECL=24,
// BLKSIZE=240,RECFM=FM,DEN=2,TRTCH=ET)
For one temporary disk file.
//GO.FT45F001 DD UNIT=SYSDA,SPACE=(80,(1024),
// DISP=(NEW,DELETE),DSN=TTOD,DCB=(DSORG=DA)
75
Example Omega Control Language (UNIVAC): Phase II
For any number of tape files created.
#ASG]^JMRIW)J5TAPE,M, , 0460
For one permanant drum file created and
catalogued.
#ASG)t$ J_DRUM, W, 150000D/150000D
#MFD>fcj^0,23/l
#END
For reference to a previously catalogued
drum file.
#MFD)J$AJ 0,23/1
#END
START
76
CONSTRUCT STUDENT INFORMATION PERMANENT FILE(l) (1 PROGRAM)
CREATE PRIMARY COURSE REQUEST LIST PERMANENT FILES(2) (2 PROGRAMS)
CREATE ALTERNATIVE COURSE REQUEST LIST PERMANENT FILES(2) (2 PROGRAMS)
CONSTRUCT FACULTY INFORMATION FILE (1) Sc DEPARTMENT COURSE
OFFERING PERMANENT FILE(l) (2 PROGRAMS)
CREATE PERMANEtTT FILE(l) OF INSTRUCTORS TO TEACH EACH COURSE
(1 PROGRAM)
CREATE MODIFIED PERMANENIT FILE(l) OF INSTRUCTOR TO TEACH COURSE
(1 PROGRAM)
CREATE TEMPORARY SCHEDULING FILES (4) Al D PASS (1 PROGRAM)
SCHEDULE STUDENTS AND TEACHERS, UPDATE TEMPORARY FILES(4) AND PASS
(1 PROGRAM)
READ TEMPORARY FILES AND OUTPUT STUDENT SCHEDULES, FACULTY SCHEDULES,
AND MASTER STUDENT SCHEDULE (1 PROGRAM)
( END
Figure 1
APPENDIX A
Job step composition: One main program.
Approximate compile and execution time: 4 minutes.
Approximate number of lines: 1500
Purpose: To construct a student information file.
Program input: Three different cards for the three types
of student information are input in the main program.
The cards are described as follows by field length and
field definition as sequentially appears on each card
type.
Type 1 - general information (1 card per student)
NAME - 32 alphameric characters
SOCIAL SECURITY NUMBER - first 9 integer
characters
MAJOR CODE - 3 integer characters
CLASSIFICATION - 2 integer characters
MODEL CODE NUMBER - 3 integer characters
An example is shown in Figure Al with the column numbers
for each field shown. The student's name is Dennis C.
Bailey, social security number 160-76-8990, major
code 301, classification 1, and model code number 1.
Type 2 - preferred blocked times (1 card per student)
BLOCKED TIMES 1, 2, 3, 4, and 5 - 8 integer
characters, and 4 alphameric characters each.
MODEL CODE NUMBER - 3 integer characters
77
78
An example is shown in Figure A2 with the column
numbers for each field shown. The students blocked
times are 7:30 - 8:30 MWF, 3:30 - 4:30 MWF, 4:30 -
5:30 MWF, 6:30 - 8:00 MWTT, 7:30 - 9:00 TT, and
model code number of 4.
Type 3 - course requests (1 card for each primary
request and 5 cards per student)
PRIMARY COURSE REQUEST - 8 integer characters
PRIMARY COURSE LECTURE HOURS - 1 integer character
PRIMARY COURSE LAB HOURS - 1 integer character
ALTERNATIVE REQUEST 1 - 8 integer characters
ALTERNATIVE COURSE LECTURE HOURS - 1 integer
character
ALTERNATIVE COURSE LAB HOURS - 1 integer character
One primary course request per card with four up to
four alternative requests for this primary course.
An example is shown in Figure A3 with the column
numbers for each field shown. The students primary
request is 301, 234 with 3 lecture hours and no lab
hours, and model code number of 10.
Program Output: Three different types of output exist,
corresponding to the three types of card input.
The output is stored on tape. The tape output
for the corresponding three types of input cards
is shown in Figures Al, A2, and A3. The tape
79
output is identical to the card input except the
fields have been moved in the record.
Input/Output Restrictions: The model is set up to
handle exactly 175 students with exactly a total
of seven cards of input per student.
Flow Chart: Figure A4.
Program Listing: Remainder of Appendix A.
80
00 o
r- 00
4J
H
p i H o U
fd u
i n IT)
LD ro
ro 00
ro CN
O O
t-i O ro
O
00
o
u
H
H
CO o
4J
p o
o u 0)
fO EH
' f in
•^ CM
CO ro ro CN
o o rH O i H O ro O 0^ cr> CO
o vD
u
H
W
Q
(U
u en
•H
H
81
P ft H
o u
u
00 o
r- 00
r in
r-- CM
VD o\
VD vo
vD 'st*
VO rH >D O
in t
lO -^
'^ LO
ro M ro O
a
o o EH EH
a P o
o u Q) ft ro EH
00 O
vD ro
VD O
in r^ in \o
in ro in CN
^ 00
-^ IT)
^ .H
ro r^ ro vD
ro ro ro CM
CM C3 CM CO
CN in CM -^
CN n-\ CM O
iH ro rH CM
cr> CO
in "*
rH
o ro 00 o o ro r-o
CN <
P Di •H
82
00 o
[ 00
p ft a
0
u
u (0
u
i> o
VD O
in CO
in vD
LO ro LO CM
'^ 00
^ rH
' o
ro r~> ro yD
ro ">*
ro CM
CM cr> CM CO
CM LO CM -t CM (N
CN O
rH r^
ro CM
O
00
LO
o o
o
o o o o o o o o o
o o o o o o o o o
o o o o o o o o o
o o o o o o o o o ro
ro CN
o rH
o ro O
a P o c B P o u
ft (0
00 o
vD ro vD CN \0 rH VD O lo cr> lO 00
lO LO LO 'i*
lO H LO O
^ 00
"^ LO
"* rH ^ o ro cr> ro 00
ro LO ro ^
ro iH ro O CM a\ CN CO
CN lO CM "^
CM CM O
00
lO
rH rH rH O
00
LO
4:::
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o ro
ro CN o rH o ro o
ro <
u p en •H PX4
83
START
DO 175 ITERATIONS READ STUDENT GENERAL INFORMATION AND WRITE ON TAPE FILE ONE
DO 175 ITERATIONS READ STUDENT BLOCKED TIMES AKID WRITE ON
TAPE FILE ONE
DO 175 ITERATIONS DO 5 ITERATIONS
READ ONE PRIMARY COURSE AND FOUR ALTERNATIVE COURSE
REQUESTS AND WRITE ON TAPE FILE ONE
Figure A4
84
C THE FIRST JOB MODULE ONLY READS THE DATA CARDS AND LISTS C THEM ON TAPE C THREE TYPES UF DATA ENTERED AT THIS POINT C . 1 STUDENT GENERAL INFORMATION C 2 STUDENT PREFERRED PROTECTED TIMES C 3 STUDENT COURSE REQUESTS
DIMENSION NPl(5),NP2{5),ND(5),ICSEt5»5),LCHRS(5t5),L0H IRS(5,5)
DIMET>ISION N A M E ( 8 ) » I D E P T ( 5 , 5 ) , L A G ( 2 0 ) REWIND 33
C GENERAL INFORMATION ON TAPE DO ?02 1=1,175 READ(5f200) NAME,NSSl,NSS2,MC,NCC,NA,NSEQ
200 F 0 R M A T ( 8 A 4 , 5 X , I 5 , I 4 , 6 X , I 3 , 5 X , I 2 , 3 X , I 5 , 7 X , I 3 ) WRITE(33 ,201 ) NAME,NSS1,NSS2,MC,NCC, NA,NSEQ
201 F 0 R M A T ( 8 A A , 1 5 , 1 4 , 1 3 , 1 2 , 1 5 , 1 3 ) 202 CONTINUE
C PROTECTED TIMES CN TAPE DO 205 1=1,175 REA0(5,203) (NPl(L),NP2(L),ND(L),L=l,5) ,NSEQl
203 FORMAT(5( IA,IX,14,2X,A4),2XtI 3) WRITE (33,204)(NPl(L),NP2(L),ND(L),L=l,5) ,NSEQ1
204 F0RMAT(5(2I4,A*4), 13) 205 CGMTINUE
C COURSE REQUESTS ON TAPE 00 208 J=l, 175 DO 208 1=1,5 REAC(5,206) ( IDEPTCI,NA),ICSE(I,NA),LCHRS( I,NA),LBHRS 1(I,NA), CNA=1,5),IA,NSE02
206 F0RMAT(5(?I4,IX,I I,IX,I 1),9X,11,7X,I 3) WRITE(33,207)(IDEPTCI,NA),ICSE(I,NA),LCHRS(I,NA),LBHRS I(I,NA), QNA=l,5),IA,NSE0?
207 F0RMAT(5(2I4,211),11,13) 208 CONTINUE
C END OF FILE ZERO RECORD DO 220 1=1,20 LAGd )=0
220 CONTINUE WRITE(33,221) LAG
221 F0RMAT(20I4) END FILE 33
C FILE ENDED AND A PRINTOUT OF INFORMATION PRODUCED REWIND 33 WRITE(6,216)
216 FORMAT(lHl) WRITE(6,260)
260 FORMAT(//,lH ,39X,6HS0CIAL»20X,6HC0URSE,6X,5HM0DEL) WftITE(6,261)
85
261 FORMATdH , 12X, 9HSTUDENTS , 17X, 8HSECURI TY,5X,5HMAJ0R,2 IX,5HCLASS, C2X,6'HALTER.,6X,4HC0DE) WRITE(6,222)
222 FORMATdH ,14X,4HNAME,21X,6HNUMBER,6X,4HC0DE,10X,5H123 145,7X, C6HNUMnE«,/)
GENERAL INFORMATION 00 210 1=1,175 REA0(33,?C1) NAME,NSS1,NSS2,MC,NCC,NA,NSEQ WRITE(6,213) NAME,NSSl,NSS2,MC,NCC,NA,NSEQ
213 FORMATdH , 8A4, 5X, 1 5,1 4, 6X, 13, 5X, I 2, 3X , 15, 7X, I 3 ) 210 CONTINUE
WRITE(6,?16) WKITE(6,330)
330 F0RMAT(//,1H ,2X,lOHPERIOD ONE,5X,lOHPERlOD TW0,5X,12H IPERIOO THREE C,3X,liHPeRI0D F0UR,4X,11HPERI0D FIVE,4X,5HM0DEL) WRITE(6,331)
331 FORMATCIH ,77X,4HCODE) WRITE(6,332)
332 FORMATdH , IX , 2HFR, 3X, 2HT0, 4X , 2HDA, 2X, 2HFR , 3X , 2HT0, 4X^ 12H0A,2X,2HFR C,3X,2HT0,4X,2HDA,?X,2HFR,3X,2HT0,4X,2HDA,2X,2HFR,3X,2H 1TG,4X,2HUA, C3)(,6H^n)MHER,/)
PROTECTED TIMES DO 211 1=1, 175 READ(33,2 0A) (NPl{L),NP2{L),ND(L),L=1,5),NSEQl WRITE(6,214) (NP1(L),NP2(L),ND(L),L=1,5),NSEQ1
214 FORMATdH , 5 (14 , IX, 14 ,2X, A4 ) , 2X , 13 ) 211 CONTINUE
WRITE(6,216) WRITE(6,430)
430 FORMAT!//,1H ,45HPRIMARY COURSES WITH ALTERNATIVES FOR 1 EACH ) WRITE(6,431)
431 FORMATdH , 5X , 63HL ISTED AS DEPARTMENT NO, ,COURSE NO.,L lECTURE HOURS CAND LAB HOURS) WRITE(6,435)
435 FORMAT!//,IH ,3X,7HPRIMARY,20X,12HALTERNATIVES,25X,6HN 1UMBER,5X, C4HC0DE) WRITEl6f436)
436 FORMATdH , 1X,6HC0URSE, 2X, 3HHRS,2X,4HN0.1 , 3 X , 3HHRS, 2X, 1 4 H N 0 . 2 , 3 X . C3HHRS,2X,4HN0.3 ,3X,3HHRS,2X,4HN0.4 ,3X,3HHRS,TX,6HALTER 1.4X,6HNUMBER C,/)
COURSE REQUESTS
86
DO 212 J=l,175 DO 212 1=1,5 READ(33,207) (IDEPTCI,NA),ICSECI,NA),LCHRS(I,NA),LBHRS 1(I,NA), GNA=1,5),IA,NSE02 WRITE(6,215) ( IDEPKI,NA),ICSEd,NA),LCHRS(I,NA) ,LBHRS
ld,NA), QNA=l,5),IA,NSE02
215 FORMATdH ,5 C 2 I 4, IX, 11, IX, 11) ,9X, 11, 7X, 13) 212 CONTINUE
WRITE(6,216) REAO(33,221) LAG WRITE(6,221) LAG
C END OF FILE MARKER C MODEL CONTAINED INFORMATION FROM 175 TECH STUDENTS C 1 ONE GENERAL INFORMATION PER STUDENT C 2 ONE PROTECTED TIME CARD PER STUDENT C 3 FIVE COURSE REQUEST CARDS PER STUDENT
CALL EXIT END
APPENDIX B
Job step composition: One main program with one subroutine
and another main program - executed in modular fashion.
Approximate compile and execution time: First module -
18 minutes. Second module - 8 minutes.
Approximate number of lines: First moiule - 500. Second
module - 400.
Purpose: To construct a permanent tape file of primary-
course requests in descending order according to the
total number of requests which have no other alternative.
Input/Output:
First Module Input: The primary course requests from
tape file one as described in Appendix A. A
temporary disk file is used, referred to as
number 45 in the program listing/ to eliminate
the continuous rewinding, reading, and writing
of the tape.
First Module Output: To be used by the second module.
DEPARTMENT - 4 integer characters
TOTAL NUMBER OF DEPARTMENTAL REQUESTS - 4 integer
characters
DEPARTMENT MARKER - Skip 12 spaces and write
4 integer zeros.
PRIMARY COURSE - 4 integer characters
TOTAL NUMBER OF REQUESTS - 4 integer characters
87
88
TOTAL NUMBER NO ALTERNATIVE REQUESTS -
4 integer characters
TOTAL NUMBER OF REQUESTS WITH ALTERNATIVES -
4 integer characters
An example of the file structure is shown in Figure Bl.
The first department is 301 which has 134 requests for
primary courses. The first course department 301 offers
is 23 2 with 20 total requests, 20 recjuests with no
other alternatives and no requests with alternatives
existing. The second course department 301 offers is
335 with 5 total requests, 5 requests with no other
alternatives and no requests with alternatives existing.
The second department is 235 with 50 requests for
primary courses. The end of tape file two is denoted
by a department number equal to zero (0) .
Second Module Input: The department number, course
number, and total number of primary course recjuests
with no alternatives from tape file two as described
in Figure Bl. A temporary disk file is used,
again referred to as 45 in the program listing.
Second Module Output: To be used by the scheduling
program in Phase Two.
DEPARTMENT - 4 integer characters
COURSE - 4 integer characters
TOTAL NUMBER OF NO ALTERNATIVE REQUESTS - 4 integer
characters
89
An example is shown in Figure Bl. The first
department is 301, first course is 235,
and the total number of no alternative
recguests is 35, the second department,
course, and total number of no alternative
request follow, etc. A zero (0) department
record denotes the end of the taps file
two.
Flow chart: Module one in Figure B2 and module two in
Figure B3.
Program Listing: Module one and module two in the
remainder of Appendix B.
90
11 1 2 2 1 45 89 23 6 1 4
03010134 0232002000200000 0335000500050000
0000
02350050 0000
TAPE FILE TWO OUTPUT
1 45 89 1 2
030102350035 030102340028 033003380023
TAPE FILE THREE OUTPUT
Figure Bl
c START
91
COPY COURSE REQUESTS ONTO TEMPORARY DISK FILE
END TAPE FILE ONE AND POSITION TAPE FOR FILE TWO
READ DEPARTMENT AND COURSE
YES
NO
YES
NO
ADD COURSE TO COUNTING ARRAY AND INDEX
APPROPRIATE DEMAND COUNTER
Figure B2a
92
> READ DEPARTMENT AND COURSE
NO
YES
YES B
E >
NO
IF 'PREVIOUSLY ENTERED INTO COUNTING
ARRAY
YES
LOCATE APPROPRIATE POSITION AND INDEX DEMAND COUNTER
Figure B2b
93
B CONSTRUCT TAPE FILE TWO
WRITE DEPARTMENT Ai<ID TOTAL NUMBER OF DEMANDS
AND PLACE ZERO IN APPROPRIATE TAPE POSITION
WRITE NEXT COURSE, TOTAL NUMBER OF DEMANDS, NUxMBER OF NO ALTERNATIVE REQUESTS, AND NUMBER OF ALTERNATIVE
REQUESTS
NO YES
WRITE ZERO LAST RECORD AND END TAPE FILE TWO
( END )
Figure B2c
94
START )
COPY DEPARTMENT, COURSE AND NUMBER OF NO
ALTERNATIVE REQUESTS ON TO DISK FROM TAPE FILE TWO
END TAPE FILE TWO AND POSITION FOR
CONSTRUCTION OF TAPE FILE THREE
LOCATE NEXT DEPARTMENT AND COURSE WITH LARGEST NUMBER OF NO ALTERNATIVE REQUESTS
WRITE ON TAPE FILE THREE
NO
WRITE ZERO LAST RECORD AND END FILE THREE
END )
Figure' B3
95
C PERFORMS A COURSE COUNT AND DEMAND BY DEPARTMENT C MAIN ROUTINE CHECKS FOR PREVIOUSLY COUNTED COURSES C THE SUBROUTINE PERFORMS THE ACTUAL COUNT PROCESS FOR EACH C . COURSE
DEFINE FILE 45(1025,80,E,LCI) DIMENSION I0EPT(5),ICSEC5),LCHRS(5),LBHRSC5),NOTC6) COMMON MREC(50),LC1 REWIND 33 NO=a N=l JS=0 KS=a
C SET RECORD ARRAY TO ZERO DO I 1=1,50 MREC(I)=0
1 CONTINUE C READ TAPE TO BY-PASS UNWANTED DATA
2 DO 4 1=1,350 REA0(33,3) NSEQ
3 F0RMATC39X, I D 4 CONTINUE
C CONSTRUCT DISK FILE FOR COURSE REQUEST LCl = l
20 RrA0C33,21) CIDEPT(J),ICSECJ),LCHRSCJ),LBHRSCJ),J=l,5) l,IA,NS
21 F0RMAT(5C2I4,211),11,13) W!^IT£C45»LC1,21) ( IDEPTC J) , ICSE ( J ) ,LCHRS( J ) , LbHRS C J ) , J 1=1,5),IA,NS IFCIDEPTCD) 20,22,20
22 END FILE 33 C START THE COUNTING PROCESS
23 LCl=l 24 R E A D ( 4 5 ' L C I , 2 1 ) CIDEPTCJ) , ICSECJ) ,LCHRS(J) ,LBHRSCJ) ,J=
1 1 , 5 ) , I A , N S C CHECK FOR PREVIOUSLY COUNTED COURSES
I F ( IDEPT( D ) 6 , 1 5 , 6 6 DO 7 J = l f N
IFdOEPTCD-MRECCJ) ) 7 , 1 4 , 7 7 CONTINUE
C CALL COUNT ROUTINE CALL MATCH(IDEPT,ICSE,IA,JS,KS,LCHRS,LBHRS,NS,NO) N=JS GO TO 23
14 GO TO 24 15 CONTINUt
C WRITE TOTAL NUMBER OF PRIMARY COURSES DEMANDED WRITE(6,16) KS,NO
16 FURMATdH ,////fl7H TOTAL NUMBER IS ,I6,17H PLUS DE IPT IS ,16)
C WRITE ZERO LAST RECORD DO 17 1=1,6
ik.
96
17 NOT(I)=0 WKITE(33,18) NOT
18 F0RMAT(6I4) END FILE 33 CALL EXIT END
C COUNT SUBROUTINE SUBROUTINE MATCHCIDEPT,ICSE,I A,JS,KS,LCHRS,LBHRS,NS,NO
1) DIMENSION IDEPT(5),ICSE(5),LCHRS(5),LBHRS(5),IZC4),MCT 1RC200) COMMON MREC(50),LC1 IL=l DO 2 1=1,4
2 IZd)=0 MCTRC1)=IDEPT(1) MCTR(2)=ICSEC1) DO 1 M=:3,200
1 MCTR(M)=0 IF(lA) 8,7,8
7 MCTR(3)=1 GO TO 9
8 MCTR(4)=1 9 RFAD(45"LCI, 10) (IDEPTCM),ICSECM),LCHRS(M),LBHRSCM),M=l 1,5) ,1 A,.NS
10 F0RMATC5(2I4,?II), I 1, 13) C READ AND CHECK FOR PROPER DEPARTMENT TO BE C CONSIDERED
IF( IDEPTI 1)) 14,35, 14 14 IF( IDEPK 1)-MCTR( 1) ) 30,15,30 15 IL=IL+1
C CHECKS THE DEMAND FOR THIS COURSE AND ADDS TO C RECORD ARRAY IF IN PROPER SEQUENCE — ARRAY IS IN C DESCENDING ORDER ACCORDING TO TOTAL NUMBER UF C STUDENT DEMANDS
DO 29 1^2,200,3 IF(MCTR( I )) 16,17,16
16 IF(MCTR(l)-ICSE(I)) 29,18,29 17 MCTR( I) = ICSEd) 18 IFCIA) 20,19,20 19 11=1+1
MCTRdl) = MCTR( Il) + 1 GO TO 9
20 12=1*2 MCTR(I2)=MCTR(I2)+l
30 GO TO 9 29 CONTINUE ^5 CONTINUE
C CONSTRUCT TAPE FILE NUMBER TWO AND PRINT OUT C RESULTS
WRITE(6,36)
k
97
36 FORMATt1H0,20HDEPTARTMENT TOTNO ) JS=JS+l MREC(JS)=MCTR(1) WRITE(6,37)MCTR(1), IL
37 FORMATdH , 6X, 14 , 5X , 14 ) N0=N0*1 WRITE(33,50) MCTR(1),IL, 12
50 F0RMAT(6I4) WRITE(6,38)
38 FORMATdH ,20X, 16HC0URSE TOTNO ,3X,6H0 ALT ,3X,6H4 lALT ,3X •14HURGENCY FACTOR,3X,7HC0DE NO)
C URGENCY FACTOR IS RATIO OF NUMBER OF ZERO ALTERNA-C TIVES TO TOTAL
DO 45 1=2,200,3 IFCMCTRd ) ) 39,46,39
39 11=1+1 12=1+2 MTOT=MCTRdl )+MCTRC 12) R 1 = M C T R ( I I ) R 2 = M C T R ( I 2 ) T O T = ( C R 1 / C R 1 + R 2 ) ) * 1 0 0 0 . 0 ) NT=TOT NO=NO+1 K S = K S + l
C PRINT OUT OEPARTME^JT DEMAND W R I T E ( 6 , 4 0 ) M C T R C I ) , M T O T , M C T R C I D , M C T R C I 2 ) , N T , K S
40 FORMATdH , 22X , 1 4 , 5 X , 1 4 , 2 C 4 X , 14 ) , 13X, I 4 , 7 X , I 4 ) W R I T f c ( 3 3 , 5 0 ) MCTRC I ) ,MTOT, MCTRC I D , MCTRC 12) , N T , K S
45 CONTINUE 46 CONTINUE
RETURN END
98
C ORDERS COURSES ACCORDING TO HIGHEST NUMBER OF ZERO C ALTERNATIVE COURSES
DEFINE FILE 45C 150,24,E,LC) DIMENSION MARRC400),JUNKC6),N0T(3) REWIND 33 N0=0 WRITE(6,48)
48 FORMAT(1HO,5X,4HDEPT,3X,6HCOURSE,4X,5HO ALT) C SKIP FIRST TAPE FILE
DO 50 IJ=1,350 49 F0RMAT(39X,I1) 50 READ(33,49) NSEQ
DO 60 IJ=1,9G0 59 F0RMAT(2I4) 60 ReAD(33,59,END=70) IDEPT,ICSE
C CONSTRUCT FILE OF DEPARTMENT DEMAND ON DISK FROM C TAPE
70 LC=l DO 5 K=1,150 REA0(33,1)(JUNKCI),1=1,6)
1 F0RMATC6I4) WRITE (45 * L C D (JUNKC I ) , 1 = 1 ,6 ) I F C J U N K d ) ) 2 , 6 , 2
2 IF(JUNK(6)) 3,5,3 3 N0=\0+1 5 CONTINUE 6 J=l
N0=N0*3 N01=N0+1
C SETS RECORD ARRAY TO ZERO DO 8 K=l,400
8 MARR(K)=0 C STARTS COMPARE OF TOTAL NUMBER OF ZERO DEMANDS FOR C COURSE
9 LC=l 10 ReAn(45«LC,l) (JUNK(I),I=1,6)
IF(JUNKd)) 11,37,11 11 IF(JUNK(6)) 13,12,13 12 IDEPT=JUNK(D
IDA=JUNK(1) GO TO 10
13 ICSE=JUNK(1) IA=JUNK(3)
C CHECKS FOR COURSES ALREADY CONSIDERED AND PLACED C IN RECORD ARRAY
DO 15 M=l,J,3 IF(IDA-MAKR(M)) 15,14,15
14 M1=M+1 IF(ICSE-MARR(M1)) 15,10,15
15 CONTINUE 23 REA0(45«LC,1)(JUNK(D,I=1,6)
99
IFIJUNKd) ) 24,35,24 24 IF(JUNK(6)) 26,25,26 25 I0A=JUNK(1)
GO TO 23 • 26 IF(MARRd) ) 27,33,27
C COMPARE FOR HIGHEST ZERO ALTERNATIVE COURSE AND C CONSTRUCT ARRAY IN DESCENDING ORDER
27 DO 29 N=l,J,3 IFdOA-MARR(N) ) 29,28,29
28 Nl=N+l rF(JUNK(1)-MARR(N1)) 29,23,29
29 CONTINUE 33 IF(IA-JUNK(3)) 34,23,23 34 IA=JUNK(3)
ICSE=JUNKC1) IDEPT=IDA GO TO 2 3
35 IFCJ-NOD 36,37,37 36 MARRCJ)=IDEPT
Jl=J+l MARR(Jl)=ICSE J2=J+2 MARR(J2)=IA J=J2+1 GO TO 9
3 7 DO 38 1=1,3 38 NOTd ) = 0
END FILE 33 C CONSTRUCT TAPE FILE NUMBER THREE AND PRINT OUT C RESULTS
00 41 1=1,NO,3 11=1+1 12=1+2 WRITE(6,30) M^RRC1),MARRC11),MARRC12)
39 FORMATdH ,3C5X,I4) ) WRITE(33,40) MARR(I),MARR( I1),MARR(I2)
40 F0RMAT(3I4) 41 CONTINUE
WR1TE(6,4?) NOT 42 FORMAT(lH0,/////f314)
WRITE(33,40) NOT CALL EXIT END
APPENDIX C
Job step composition: Two main programs executed in modular
form.
Approximate compile and execution times: First module -
5 minutes. Second module - 24 minutes.
Approximate number of lines: First module - 500. Second
module - 500.
Purpose: The purpose of these modules is to order the
alternative requests in descending order according to
the largest amount of requests.
Input/Output: Input to the first module is taken from a
file which lists each primary request and the alterna
tives to each primary request. This file is not
required as part of the model but was used in conjunc
tion with file three and file six to establish the
faculty and each faculty member's courses qualified
to instruct. A temporary disk file is used once again.
First Module Input: Each primary course request is
listed with the alternatives following. The two
types of records are as follows.
Primary Request:
PRIMARY DEPARTMENT - 4 integer characters.
PRIMARY COURSE - 4 integer characters.
TOTAL NUMBER OF NO ALTERNATIVE REQUESTS - 4
integer characters.
100
101
TOTAL NUMBER OF ALTERNATIVE REQUESTS - 4 integer
characters.
PRIMARY COURSE MARKER - 4 integer zeros.
Alternative Requests:
ALTERNATIVE DEPARTMENT - 4 integer characters.
ALTERNATIVE COURSE - 4 integer characters.
TOTAL NUMBER OF REQUESTS - 4 integer characters.
SEQUENTIAL NUMBER - 4 integer characters.
LIST NUMBERING - 4 integer characters.
An example is shown in Figure CI. The first primary
request is department 301, course 235, 35 no alternative
requests, 1 alternative request, and 0 as primary
course marker; the first alternative is department 308,
course 334, 1 request, sequence number 1, and list
number 1; the second alternative is department 308,
course 339, 1 request, sequence number 2, and list
number 2; etc. The second primary request is depart
ment 301, course 234, 28 no alternative requests,
1 alternative request and 0 as primary course marker;
etc.
First Module Output:
DEPARTMENT NUMBER - 4 integer characters.
COURSE NUMBER - 4 integer characters.
TOTAL NUMBER OF STUDENT REQUESTS - 4 integer
characters.
NUMBER OF COURSES AS ALTERNATIVE - 4 integer
characters.
102
SEQUENTIAL NUMBER - 4 integer characters.
A zero department record denotes the end of file five.
An example of tape file five is shown in Figure Cl.
The first department is 308, the first course is 334,
the number of student requests is 26, the number of
courses as alternative is 10, and the sequential
number' is 1. The second and third are also shown.
Second Module Input: The information from file five
is module input, as shown in Figure Cl. Here,
again using a temporary disk file.
Second Module Output:
DEPARTMENT NUMBER - 4 integer characters.
COURSE NUI4BER - 4 integer characters.
TOTAL NUMBER OF REQUESTS - 4 integer characters.
SEQUENTIAL NUMBER - 4 integer characters.
A department number of zero denotes the end of the
file. An example of tape file six is shown in
Figure Cl. The first department is 264, course 230,
total number of requests is 103, and the sequential
number is 1; the second; etc.
Flow chart: First module Figure C2 and second module
Figure C3.
Program listing: Module one and module two in the remainder
of Appendix C.
45 89 11 23
11 67
2 0
03010235003500010000 030803 34000100010001 03080339000100030002
03010234002800010000 030503 31000100010005 03100246000100020006
TAPE FILE FOUR INPUT
1 45 89 11 23
11 67
2 0
03080334002600100001 03080339002600140002 02970238003700200003
103
TAPE FILE FIVE OUTPUT
1 45 89 11 23
1 6
0264023001030001 0260023000920002
TAPE FILE SIX OUTPUT
Figure Cl
104
START )
COPY TAPE FILE FOUR ONTO TEMPORARY DISK FILE
END TAPE FILE FOUR AND POSITION TAPE FOR TAPE FILE FIVE
LOCATED NEXT ALTERNATIVE REQUEST
NO ADD TO APPROPRIATE COUNT?:?. FOR COURSE IN
COUNTING ARRAY
CONSTRUCT TAPE FILE NUMBER FROM COUNTING ARRAY
ZERO LAST FILE RECORD
END )
Figure C2
105
r START ^
COPY TAPE FILE FIVE ONTO TEMPORARY DISK FILE,
END FILE FIVE AND POSITION TAPE FOR FILE SIX
NO
IF )EMAND COURSE
DEr IAND IN POSITION
UNDER CONSIDER
ATION
YES
CHANGE COURSES
IN POSITION OF LIST
READ NEXT DEPARTMELMT,
COURSE AND DEMAND
GO TO NEXT LIST POSITION
ARR^Y
NO YES
YES
CONSTRUCT FILE SIX FROM
LIST ARRAY
ZERO LAST RECORD
r END J
Figure C3
106
C ORDERS COURSES ALTERNATIVES BY THE HEAVIEST DEMAND C ESSENTIALLY THE PROGRAM ORDERS FILE FIVE BY C LARGEST REQUEST NUMBER
DEFINE FILE 45(1500,20,E,LC) DIMENSION MORDd200),NOT(4) REWIND 33
C SKIPPING TAPE FILE NUMBER ONE DO 15 IJ=1,350
14 F0RMAT(39X,I1) 15 READ(33,14) NS 20 REA0(33,21) IDEPT 21 Ff]RMAT(I4)
IF( IDEPT) 20,25,20 25 END FILE 33
C SKIPPING TAPE FILE NUMBER TWO 26 REA0(33,27) ID 27 FORMAT I 14)
IF(ID) 26,30,26 30 END FILE 33
C SKIP TAPE FILE NUMBER THREE 35 READ(33,36) ID 36 FORMATI14)
IF(ID) 35,40,35 40 E'^D FILE 33
C SKIP TAPE FILE NUMBER FOUR 45 R£ACC33,46) ID 46 FCRMATI14)
IFC ID) 45,50,45 50 END FILE 33
C READ FILE NUMBER FIVE FROM TAPE AND CONSTRUCT A C DISK FILE FOR ORDERING
LC=1 55 READC33,56) IDEPT,ICSE,NSR,NCR,ICN 56 F0RMATC5I4)
WRITE(45*LC,56) IDEPT,ICSE,NSR,NCR,ICN IFdOEPT) 55,60,55
60 END FILE 33 C ZEROING RECORD ARRAY
DO 62 1=1,1200 62 MORD(I)=0
K = l C BEGIN COMPARISION FOR LARGEST ALTERNATIVE DEMAND
65 LC=1 70 RfcAD(45«LC,56) IDEPT,ICSE,NSR,NCR,ICN
IFCIDtPT) 75,200,75 C ENTER INITIAL VALUES FOR COMPARISION
75 IFIK-D 80,86,80 C CHECK FOR PREVIOUSLY CONSIDERED COURSES
80 DC 85 1=1,K,3 IF(MORDd )-IDEPT) 85,83,85
83 11=1+1
107
IF(M0RD(I1)-ICSE) 85,70,85 85 CONTINUE 86 ND=IDEPT
NC=ICSE NUM=NSR
90 READ(45»LC,56) IDEPT,ICSE,NSR,NCR,ICN IF(IOEPT) 95,190,95
95 IF(K-l) 100,110,100 100 DO 105 1=1,K,3
IF(MORDd)-IOEPT) 105,103,105 103 11=1+1
IF(MORDdl)-ICSE) 105,90,105 105 CONTINUE 110 IFCNUM-NSR) 113,90,90 113 ND=IDEPT
NC=ICSE NUM=NSR GO TO 90
190 MORD(K)=ND Kl=K-H M0RC(K1)=NC K2=K+2 M0RD(K2)-NUM K = K + 3 GO TO 65
PRINT OUT ORDER AND WRITE TAPE FILE NUMBER SIX 200 WRrTE(6,205) 205 F0RMAT(12H ALT. COURSE,4X,14HN0. STUD. REQ.,4X,7HC0UNT
lER,//) ICT=0 DO 215 1=1,K,3 IFCMORDCI)) 206,220,206
206 11=1+1 12=1+2 ICT=ICT+1 WRITE(6,210) MORDCI),MORDCI1),MORDCI2),ICT
210 FORMATdH , 3X, 2 14, lOX, I 4,1IX, 14 ) WRITE(33,212) MORDCI),MORDCID,MORD(I2),ICT
212 F0RMAT(4I4) 215 CONTINUE 220 DO 222 1=1,4 222 NOTd )=0
WRITE(6,225) NOT 225 F0RMAT(4I4)
WRITE(33,227) NOT 227 F0RMAT(4I4)
WRITe(6,230) ICT 230 FaRMAT(///,ITH THIS IS THE END ,14)
CALL EXIT END
108
C PERFORMS A DEMAND COUNT SIMILAR TO THE PRIMARY DEMAND C COUNT AND CONSTRUCTS TAPE FILE NUMBER FIVE C A TAPE FILE NUMBER FIVE
DEFINE FILH 45(1500,80,E,LC) DIMENSION MREC( 1000),N0T(5) REWIND 33
C SKIPS TAPE FILE NUMBER ONE DO 15 IJ=1,350
14 F0RMAT(39X,I1) 15 READ(33,14) NS 20 REAn(33,21) IDEPT 21 FORMATI14)
IFdDEPT) 20,25,20 25 END FILE 33
C SKIPS TAPE FILE NUMBER TWO 26 READ(33,27) ID 27 FORMAT(14)
IFdD) 26,30,26 30 END FILE 33
C SKIPS TAPE FILE NUMBER THREE 34 READ(33,35) ID 35 FORMAK 14)
IF(ID) 34,40,34 40 END FILE 33
C READS TAPE FILc NUMBER FOUR AND CONSTRUCTS DISK C FILE FOR COUNTING
LC=l 44 READ(33,45) ID, IC,NO,NOS,JM 45 F0RNATC5I4)
WRITE(45«LC,45) ID,IC,NO,NOS,JM IF( ID) 44,50,44
50 END FILE 33 C SETS RECORD ARRAY TO ZERO
DO 55 1=1,1000 55 MREC(I)=0
K=l C STARTS COUNTING PROCESS
LC=l 65 READ(45'LC,45) ID,IC,NO,NOS,JM
IF(JM) 67,65,67 67 MREC(K)=ID
K1=K+1 MREC(K1)=IC K2=K+2 MRECIK2)=N0 K3=K+3 MREC(K3)=1 K=K+4
75 READ(45'LC,45) ID,IC,NO,NOS,JM IF(ID) 76,100,76
76 IF(JM) 77,75,77
109
C CHECKS FOR COURSES ALREADY CONSIDERED C ANDS COURSES NOT ALREADY IN RECORD ARRAY
77 DO 90 I=1,K,4 IF(MREC(I)-ID) 90,80,90
80 11=1+1 IF(MREC( ID-IC) 90,82,90
82 12=1+2 MREC(I2)=MREC(I2)+N0 13=1+3 MREC(I3)=MREC(I3)+l GO TO 75
90 CONTINUE MREC(K)=ID K1=K+1 MREC(Kl)=IC K2=K+2 MREC(K2)=N0 K3=K+3 MREC(K3)=l K=K+4 GO TO 75
100 WRITH(6,1CI) 101 FORMM(lH0,llHALTcRNATIVE,4X,15HNO. STUD. REQS.,4X,19H
INC. COURSE A CS ALT. ,4X,7HC0UNTER,//) ICN=0
C CONSTRUCTS TAPE FILE NUMBER FIVE AND PRINTS OUT C CONTENTS
DO 115 1=1,K,4 1F(MREC(I)) 105,116,105
105 11=1+1 12=1+2 13=1+3 ICN=ICN+1 WRITE(6,110) MRECC D,MREC(Il),MREC( I2),MRECd3),ICN
110 FORMATdH , 2X, 2 14, 1IX, 14, 16X, 14, 13X, 14 ) WRITE(33,112) MREC(I),MREC(11),MREC(12),MRECd3),ICN
112 F0RMAT(5I4) 115 CONTINUE 116 WRITE(6,120) K 120 F 0 R M A T d H 0 , / / , 2 3 H THE LENGTH OF ARRAY I S , 2 X , I 4 )
DO 124 1=1 ,5 124 N O T d ) = 0
W R I T E ( 3 3 , 1 2 5 ) NOT 125 F0RMAT(5I4)
CALL EXIT END
k
APPENDIX D
Job step composition: One main program.
Approximate compile and execution time: 11 minutes.
Approximate number of lines: 1000.
Purpose: To construct a faculty file with each faculty
member's course qualification, each member's course
preference list, and each member's desired blocked
times. In addition, another file is constructed of
each department's course offerings as taken from the
faculty - this serves as a check to insure all
possible student course requests have been accounted
for.
Input/Output:
Input For File Number Seven: The information for this
file is read directly from cards containing the
following fields - one card per faculty member.
DEPARTMENT NUMBER - 3 integer characters.
INSTRUCTOR'S NAME - 32 alphameric characters.
COURSES QUALIFIED TO TEACH IN ORDER OF TEACHING
DESIRE - 6 fields of 4 integer characters
each.
BLOCKED TIME CODE NUMBER - 1 integer character.
MODEL SEQUENCE NUMBER - 3 integer characters.
An example of the card input is shown in Figure Dl.
The first department number is 233, teacher's name
110
Ill
is Youngblood, Betty J., the courses qualified to
teach in order of preference are 3331, 338, 213, 232,
4332, and 3361, blocked time is 1, and model code
number is 501. The remaining teachers are listed
in this fashion with a department number of zero
denoting the end of the file.
Output Of File Seven: The output is identical to
the card input only the record columns have been
moved. The input record is shov/n as output
in Figure Dl.
Input For File Eight: As file seven was being
constructed from the card input a disk file was
also being constructed. This disk file served
as information for the construction of file eight.
Output Of File Eight:
DEPARTMENT NUMBER - 4 integer characters.
COURSE NUMBER - 4 integer characters.
An example is shown in Figure D2. The first department
is 233, first course is 331, second course is 338, etc.
A zero course number denotes the end of the department
list and a zero department number denotes the end of
the file.
Flow chart: Shown in Figure D3.
Program Listing: Remainder of Appendix D.
112
CO o
r- 00
VO O
CO VD ro in
O in
00 o
.H
m en CN CO ro
CM CO CM O ro iH CN O 00 ro ro O
EH
P O O m
4-»
H
vD ro
vD O in G\
rH
ro ro ro
^ M fU U ro \0
ro in
O in
ro ro CM ro ro
CM ro CM O ro rH CM O CO ro ro O iH ro ro ro
CQ
P O
4->
:3
4->
o 0) > (D
0) rH •H
a) ft fO
p (U
•H fa
ro ro ro CM
ro ro ro CM
114
NO
f START
READ NEXT FACULTY MEI-ffiER
WRITE TAPE FILE NUMBER SEVEN AND TEMPORARY DISK FILE
YES
YES
END FILE SEVEN
READ NEXT DEPARTx lEHT
ADD TO DEPARTMENT ARRAY
Figure D3a
115
READ NEXT DEPT. FROM DEPT. ARRAY
READ DISK FILE FOR DEPT, NUMBER & COURSE NUMBER
IF .DEPT. NUMBER
= ZERO
NO
YES
NO IF
DEPT. NUMBER = ARRAY
DEPT.
YES
WRITE DEPT. NUMBER Al D COURSE INTO TAPE FILE
EIGHT
ADD COURSE NUMBER TO LIST
NO
WRITE DEPT. NUMBER AND ZERO COURSE NUMBER
YES
WRITE ZERO DEPT. NUMBER
C ND )
Figure D3b
116
C C
C C C c c c c
CONSTRUCTS T NUMBER SEVE
DEFINE FILE 45( DIMENSION KC(6) REWIND 33
SKIP TAPE FI DO 15 IJ^1,350
14 F0RMAT(39X,I1) 15 REA0(33,14) NS 20 READ(33,21) IDE 21 FORPATI 14)
IFdOEPT) 20,25 25 END FILE 33
SKIP TAPE FI 26 READ(33,27) ID 27 FORMATI14)
IF(ID) 26»30,26 30 END FILE 33
SKIP TAPE FI 35 READ(33,36) ID 36 FGr<HAT( 14)
IF(IO) 35,40t35 40 END FILE 33
SKIP TAPE FI 45 RtAD(33,46) ID 46 FCRN'AK 14)
IF(ID) 45,50,45 50 END FILE 33
SKIP TAPE FI 55 READ(33,56) ID 56 FORMATI14)
IF( ID) 55,60,55 60 END FILE 33
SKIP TAPE FI 65 READ(33,66) ID 66 FORMAT(14)
IF(IO) 65,70,65 70 END FILE 33
READ TEACHER FILE NUMBER
73
EACHER INFORMATION FILE—TAPE FILE N 1000,80,E,LC) , N A M E ( 8 ) , M D C ( 100 ) ,MCRS ( 100 ) , JUlJK ( 50 )
LE NUMBER ONE
PT
,20
LE NUMBER TWO
LE NUMBER THREE
LE NUMBER FOUR
LE NUMBER FIVE
LE NUMBER SIX
TEACHER TEACHER TEACHER TEACHER TEACHER
L. 2. 3. 4. 5.
WRITE(6,73) F0RMAT(//,1H
IREFERENCES, C7X,12HBL0CKED LC = 1 K=l
INFORMATION CARDS AND CONSTRUCTS SEVEN DEPARTMENT NAME COURSE PREFERENCE LIST BLOCKED TIME IDENTIFICATION NUMBER
10HDEPARTMENT,18X,4HNAME,27X,18HCOURSE P
TIME,4X,11HI.D. NUMBER,/)
fe.
117
75 R£A0(5,76) LD,NAM£,KC,LBT,N0 76 FORMAT(I3,eA4,6I4,I1,17X,I3)
C WRITES CONTENTS OF TAPE FILE NUMBER SEVEN WRITE(6,83) LU,NAME,KC,LBT,NO
83 FORMATdH ,4X, 13, 8X, 8A4,9X , 614, 9X, II, 13X, I 3) C COPYING TAPE FILE SEVEN ONTO DISK
WRITE(45»LC,84) LD,NAME,KC,LBT,NO 84 F0RMATd3,8A4,6I4,Il,I3)
WRITE(33,84) LD,NAME,KC,LBT,NO K=K*1 IF(LO) 75,80,75
80 END FILE 33 C READ TAPE FILE NUMBER SEVEN AND PLACE ON DISK TO C CONSTRUCT TAPE FILE NUMBER EIGHT WHICH CONTAINS C TEACHERS IN THEIR ORDER OF PREFERENCE FOR EACH C COURSE IN A DEPARTMENT C ZERO DEPARTMENT RECORD ARRAY AND TEACHER-COURSE C ARRAY
85 DO 90 1=1,ICO MDC(I)=0
90 MCRS( I )-=0 C LIST DEPARTMENTS IN DEPARTMENT RECORD ARRAY
LC = 1 100 KEAD(45«LC,10n LO,KC,LRT,NO 101 FC;^MAr( I3,3?X,6I4, I It 13)
IF(LO) 105,115,105 105 DO llO 1=1,100
IF(MDC(I)-LD) 107,100,107 107 IF(N0C( I)) 110, 108,110 108 MDC(I)=LD
GO TO IGO 110 CONTINUE
C PREPARING LIST OF COURSES OFFERED BY EACH C DEPARTMENT TO CONSTRUCT FILE FOR LISTING C TEACHERS TO TEACH COURSES BY THEIR PRIORITY LISTS
115 CONTINUE DO 180 1=1,100 IF(MDC( I) ) 116, 183,116
116 LC=l C CONSIDERED DEPARTMENT AT ATIME
JK=l MCRS(JK)=MDC(I) JK=JK+l
117 READ(45»LC,101)LD,KC,LBT,NO IF(LD) 118,140, 118
118 IF(MDC( I)-LD) 117,119,117 119 DO 135 IM=1,6
IFIKCdM) ) 122,117,122 122 DO 130 N=2,JK
IF(fCRS(N)-KC( IM) ) 130,135,130 130 CONTINUE
118
MCRS(JK)=KC(IM) JK=JK+1
135 CONTINUE GO TO 117
140 WRITE(6,145) MCRSd) 145 F0RMAT(1HC,10X,10HDEPARTMENT,2X,I4,2X,6H0FFERS,2X,10HC
lOURSES — ) PRINTOUT LIST AND CONSTRUCT TAPE FILE NUMBER EIGHT
DO 155 NN=2,JK WRITE(6,15l) MCRSd),MCRS(NN) FORMATdH ,45X, 14, IX, 14)
CONSTRUCTING TAPE FILE NUMBER EIGHT TO BE USED FOR TEACHER PREFERENCES
WRITE(33,153) MORS(1),MORS(NN) FORMAT(214) CONTINUE
ZEROING ARRAY TO START NEXT DEPARTMENT DO 160 L=l, 100 MCRS(L)=0 CONTINUE WRITE(6,184) MDC(T),MDC(I) FORMAT!///,20X,'THIS IS THE END ',214) WRITE(33, 153) MDCd),MDC(I) CALL EXIT END
c c
c
150 151
153 155
160 180 1R3 184
I.
119
APPENDIX E
Job step composition: Two main programs.
Approximate compile and execution time: First module - 190
minutes. Second module - 5 minutes.
Approximate number of lines: First module - 4000. Second
module - 4500.
Purpose: The purpose of the first module is to search the
faculty file and list each faculty member for each
course in order of faculty preference and constructing
a permanent file. The purpose of the second module is
to produce a permanent file which has reduced the
number of faculty members to instruct each course.
Input/Output:
The input for the first module is from files seven and
eight. An example of the input is shown in Figure Dl
and Figure D2. A temporary disk file is used for the
listing process. File seven is contained on the first
half of the disk file and file eight is on the second
half of the disk file. This allows the tape to be
positioned for the construction of file nine. The
output for the first module is permanent tape file
number nine containing each course and the instructors
to teach each section in order of faculty member
preference.
DEPARTMENT - 4 integer characters.
120
COURSE - 4 integer characters.
TEACHER CODE NUMBER - 4 integer characters.
TEACHER BLOCK TIME - 1 integer character.
A zero teacher code number denotes the end of each
course list. An additional zero record denotes the
end of the file. An example is shown in Figure El.
The first department is 233, the course is 3331, and
the teachers are 501 with blocked time 1, 504 with
blocked time 2, etc. The second department is 233,
the course is 338, and the teachers are 501 with
blocked time 1, 502 with blocked time 7, etc.
The input for the second module is from file nine.
As shov;n in Figure El.
The output for the second module is permanent tape
file number ten and is formatted the same as file nine.
The number of instructors to teach each has been
reduced by excluding the instructor numbers at the
end of the list.
Flow chart: Shown in Figure E2.
Program listing: Module one and module two in the remainder
of Appendix E.
121
1 45 8 02333331 05010001 05040002
00000000 02330338 05010001 05020007
Tape File Nine Output
Figure El
122
(START)
COPY TAPE FILES SEVEN AND EIGHT
ONTO DISK
READ DEPT. AND COURSE TO BE CON
SIDERED FROM FILE EIGHT
READ TEACHER FROM FILE SEVEN AND LIST IN ARRAY
LIST DEPT. COURSE, AND INSTRUCTORS IN FILE NINE
NO
YES
C END )
Figure E2
123
C CONSTRUCTS TAPE FILE NUMBER NINE—TEACHER C PREFERENCE FOR EACH COURSE
DEFINE FILE 45(1000,80,E,LC) DIMENSION KC(6),NAME(8),MDC(100 ) ,MCRS(100),JUNK(50) REWIND 33
C SKIP TAPE FILE NUMBER ONE DO 15 IJ= 1,350
14 F0RMAT(39X,I1) 15 READ(33,14) NS 20 REA0(33,21) IDEPT 21 F0RMAT(I4)
IFdOEPT) 20,25,20 25 END FILE 33
C SKIP TAPE FILE NUMBER TWO 26 RtAD(33,27) ID 27 FORMAT(14)
IFdD) 26,30,26 30 END FILE 33
C SKIP TAPE FILE NUMBER THREE 35 READ(33,36) ID 36 FORMAK 14)
IF( ID) 35,40,35 40 END FILE 33
C SKIP TAPE FILE NUMBER FOUR 45 RGAC(33,46) ID 46 FORMAK 14 )
IFdD) 45,50,45 50 END FILE 33
C SKIP TA^F FILE NUMBER FIVE 55 READ(33,56) ID 56 FORMATI14)
IFdD) 55,60,55 60 END FILE 33
C SKIP TAPE FILE NUMBER SIX 65 READ(33,66) ID 66 FORMATI 14)
IFdD) 65,70,65 70 END FILE 33
C COPIES TAPE FILE NUMBER SEVEN ONTO DISK LC=l
75 READ(33,76) LD,NAME,KC,LBT,NO 76 F0RMAT(I3,8A4,6I4,I1,I3)
WRITE(45»LC,76) LD,NAME,KC,LBT,N0 IFdD) 75,80,75
80 END FILE 33 C PLACING ON DISK TO BE USED FOR LISTING COURSE C TEACHERS COPYING FILE EIGHT ONTO DISK
LC=50l 85 READ(33,86) ID, IC 86 F0RMAT(2I4)
WRITE(45'LC,86) ID, IC
124
IF(IO) 85,90,85 90 END FILE 33
C PROCEDURE FOR LISTING TEACHERS FOR COURSES ACCORD-C ING TO TEACHER CHOICE
183 NUM=0 KEY=0 MOP=0 NUMB=501
185 DO 190 1=1,50 190 JUNK(I)=0
LC=NUMO IM=0
195 READ(45«LC,196) IDEPT,ICSE 196 F0RMAt(2I4)
NUMR=NUMR+1 JUNK(1)=IDEPT JUNK(2)=ICSE IN=3 IF(ICSE) 200,199,200
199 I F d D E P T ) 2 3 0 , 2 5 0 , 2 3 0 2 0 0 LC=l 2 0 4 IM^IM+l 2 0 5 R h A D ( 4 5 « L C , 1 0 1 ) LD,KC,LBT,NO I 01 FORMAK 1 3 , 32 X, 6 1 4 , 1 1 , 1 3 )
I F d D ) 2 0 6 , ? l 0 , 2 C ^ 206 I F ( I D h P T - L n ) 2 0 5 , 2 0 7 , 2 0 5 2 0 7 I F ( K C ( I M ) - I C S E ) 2 0 5 , 2 0 8 , 2 0 5 208 J U N K d N ) = NO
I N = I N + l J U N K ( I N ) = L B T I N= I N 4-1 GO TO 205
210 IF(IM-6) 200,212,212 212 WRIT£(6,213) JUNK(1),JUNK(2) 213 F0RMAT(//,11H DEPARTMENT, 14,8H COURSE ,14,• WITH TEACH
lERS AND PROT CECTED TIMES AS FOLLOWS',//) WRITE(33,196)JUNK(1),JUNK(2) DO 218 1=3,IN,2 11=1+1 WRITE(6,217) JUNK(I),JUNK(I1)
217 FORMATdH , 34X , 14, lOX, 14 ) WRITE(33,196)JUNK(I),JUNK( ID
213 CONTINUE MOM=( dN-3)/2) WRITE(6,221) JUNKd),JUNK(2),M0M
221 F0RMAT(//,20X,26HT0TAL TEACHERS FOR COURSE ,14,IX,14,4 IH IS ,14) NUM=NUM-H M0P=M0P*1 GO TO 185
r
125
14, 230 WRITE(6,231) JUNKd),MOP 231 F0RMAT(//,50X,'DEPARTMENT
IRSES*) MOP=0 GO TO 185
250 WRITE(6,251) NUM 251 FORMAK////,20X,26HT0TAL NUMBER
WRIT£(33,196)KEY,KEY CALL EXIT END
OFFERS •,I4,' CQU
OF COURSES IS,14)
126
C C REDUCTICN IN NUMBER OF TEACHERS FOR EN C REDUCTION IN NUMB?:R OF TEACHERS FOR EACH COURSE — FILE 10 C
CIMENSICN MRECI ICO) DEFINE FILE 45(2500, 10,E,L45) REWIND 33
C C SKIP FILE ONE C
DO 5 1=1,350 4 FORMAK 39X, ID 5 REAC(33,4) NS 10 REAC(33,11) JUNK 11 F0RMAKI4)
IF(JUNK) 10,15,10 15 END FILE 33
C C SKIP FILE TWO C
20 REAC(33,11) JUNK IF(JUNK) 20,25,20
25 END FILE 33 C C SKIP U L E TFREE C
30 R£AD(33,ll) JUNK IF(JUNK) 30,35,30
35 END FILE 33 C C SKIP FILE FCUR C
40 REAC(33,ll) JUNK IF(JUNK) 40,45,40
45 END FILE 33 C C SKIP FILE FIVE C
50 R E A D ( 3 3 , 1 D JUNK IF(JUNK) 50,55,50
55 END FILE 33 C C SKIP FILE SIX C
60 REAC(33,11) JUNK TF(JUNK) 60,65,60
65 END FILE 33 C C SKIP FILE SEVEN C
70 READ(33,71) JUNK
127
71 FCRMATd3) IF(JUNK) 70,75,70
75 END FILE 33 C C SKIP FILE EIGHT C
80 READ(33,11) JUNK IF(JUNK) 80,85,£0
85 END FILE 33 C C START PROCEDURE FOR REDUCTION OF TEACHERS QUALIFIED TO C TEACH EACH COURSE C
WRITE(6,91) 91 FURMAT(//,6X,« TEACHERS FOR EACH COURSE «,/)
DC 95 1 = 1,ICO 95 MREC( I )=0
IZERO=0 MARK=l L45=l
ICO REAC133,1C1) Nl,N2 101 FORMAT(214)
W K I T E ( 6 , 1 C 6 ) N 1 , N 2 1 0 6 FORMAK I I X , 1 4 , 2 X , 1 4 )
I F ( M ) I K , , l 2 C , l i 0 1 1 0 M:^tC(MARK ) = M
f AKK = MARK+l MREC(MARK)=N2 MARK=MARK*1 GQ TO ICO
1 2 0 K E E P = ( M A R K * 2 ) / 3 DO 1 3 0 1 = 1 , K E E P , 2 1 1 = 1 + 1 W R I T E ( 4 5 « L 4 5 , 1 0 1 ) MREC( I ) , M R E C ( I D WRITE ( 6 , 1 0 6 ) M R E C d ) , M R E C d l )
1 3 0 CONTINUE W R I T E ( 4 5 « L 4 5 , 1 0 D I Z E R O , U E R O WRIT£(6,IC6) IZERO,IZERO MARK=1 CO 140 1^1,100
140 MRECd)=0 R£AD(33,101) N1,N2 IF(M) 110,150,110
150 WRITE(45'L45,1C1) IZERO,IZERO WRITE(6,1C6) IZERO,IZERO END FILE 33 L45=l NUT=0
160 REA0(45«L45,101) N1,N2 WRITE(33,10D Nl,N2 URITE(6»1C6) Nl,N2
APPENDIX F
Job step composition: Three program modules
Approximate compile and execution time: First module - 15
minutes. Second module - 7 hours. Third module - 15
minutes.
Approximate number of lines: First module - 5000 lines.
Second module - 100,000 lines. Third module -
5000 lines.
Purpose: The first module reads the necessary permanent
files from tape and constructs temporary files to be
passed to the second module. The second module
schedules class and constructs the master schedule
and passes this information to the third module by
alternating the temporary files. The third module
reads the modified temporary files and produces
student schedules, faculty member schedules, and the
master class schedule.
Input/Output:
The input to the first module is from the various tape
files. The first input is the student information
from tape file number one and is used to construct a
temporary direct access student file. The input is
shown in Appendix A. The direct access student file
contains the following:
Student general information from record 1
through 175;
129
130
Student block times—in coded format—record
176 through 350. The coding format is
shown in Figure Fl—examples are 7:30 to
8:30 Monday is code number 1 and 7:30 to
9:00 Tuesday is code number 12.
Student course requests are from record 351
through 2100. A student's course request
is first and then a blank record to depict
the course scheduling situation. The
fields for the scheduling record are as
shown in Figure F2. The course request
record is shown in Appendix A.
The second type of input is section information from
file ten shown in Appendix E. This information is
set up in a general information direct access file
occupying record 501 through record 3000. Initial
section information has been zeroed. The record format
is shown in Figure F3. The remaining positions in
this general information file consist of: the no-
alternative course list in records 1 through 200; the
alternative course list in records 201 through 500;
and finally, the room occupation schedules in coded
format (shown in Figure Fl) in records 3001 through
3040.
The third type of input is faculty information and
output on a direct access file. Records 1 through
131
1000 contain general faculty information as shown in
Appendix D. Records 2001 through 3000 contain faculty
course section scheduled as shown in Figure F4. The
initial course section information has been zeroed.
Records 1001 through 2000 contain faculty blocked
times which is in the same format as the student
blocked time records. The previous input/output
information pertains to the first module which is a
direct access file initializing program. No printer
output of any of the file information is done.
Printer output from module one is produced for
monitoring program progress. Module two outputs to
the printer only monitoring information concerning
the progress of the scheduling heuristic. This
information is coded, but can be easily traced back
through the program listing.
Module three reads information from the direct access
files. Uncodes this information and prints out a
master class schedule, faculty schedules, and student
schedules. For uncoding class meeting times, a
direct access file is constructed from input cards.
This file consists of two parts—one for lecture
times and the second for lab times. Figure F5 shows
samples of the two parts; Figure F6 shows a sample
student schedule; Figure F7 shows a sample faculty
schedule; and Figure F8 shows an example from the
master class schedule.
132
Flow Chart: Shown in Figure F9 for module one. Figure FIO
for module two, and Figure Fll for module three.
Program listing: First module - 10 pages in length;
second module - 22 pages in length; third module -
8 pages in length. Module one, module two, and
module three in the remainder of Appendix F.
133
Monday
730(01)
830(02)
930(03)
Tuesday
730(12)
900(13)
Wednesday
730)20)
830(21)
Thursday
730(31)
930(22) 900(32)
F r i d a y
730(39)
830(40)
930(41)
1030(04)
1130(05)
1230(06)
1030(14) 1030(23) 1030(33) 1030(42)
1200(15) 1130(24) 1130(43)
1230(25) 1200(34) 1230(44)
130(07)
2 3 0 ( 0 8 )
130(16) 130(26) 130(35) 130(45)
300(17) 230 (27 ) 230 (46 )
330(09) 3 3 0 ( 2 8 ) 3 0 0 ( 3 6 )
3 3 0 ( 4 7 )
430(10) 430(18) 430(29) 4 3 0 ( 3 7 ) 4 3 0 ( 4 8 )
630(11) m/M/m
630(19) 6 3 0 ( 3 0 ) V///////////j\
6 3 0 ( 3 8 )
F i g u r e F l
134
11 1 23 67 01
PROBODEPTCRSELECT
11 22 22 2 67 01 23 4
LAB LERMLARM
PROB = scheduling problem - 0 means unscheduled, 8 means rejected, and 9 means scheduled.
DEPT = course department number
CRSE =
L E C T ••
LAB
LERM = lecture meeting room
department course number
class meeting times for lecture
class meeting times for lab
LARM = lab meeting room
Figure F2
135
1 45
TEACHER
33 67
1ST SECTION
1 66 0 89 0
2ND SECTION 3RD SECTION
Section Information Record Layout
1 LECT
11 67 01 LAB STUDENTS
22 89 T ;
33 3 01 2
JIMLARI'I
Information On Each Section
LECT = class meeting times for lecture LAB = class meeting times for lab STUDENTS = students scheduled in this section LERM = lecture meeting room LARM = lab meeting room
Figure F3
136
1 1st course
11 22 89 45 xxxxxx2nd course
44 4 23 8 xxxxxx
4 66 7 67 2
3rd course xxxxxx
FACULTY INFORMATION RECORD LAYOUT
1 45 89 11 23
11 45
1 6
CRSELECTLAB LERl iLARM
INFORMATION ON EACH COURSE
CRSE = department course number LECT = class meeting times for lecture LAB = class meeting time for lab LERM = lecture meeting room LARM = lab meeting room
Figure F4
137
1 730- 830 830- 930 930-1030
1 3
M M M
730- 830 830- 930
MW
Lecture Time Scheme
730 830
M M
1 3
Lab Time Scheme
Figure F5
138
r ^
W U H O
t-i r-{
W H
u u l- H o o
rH
H U H o
; ^
w u H o t-H l-rt HH l-iH hr<
iJ-i M H i-M t-ln t-in
u o
s
u u o o
u o
s s s P^ Dii Pi o::,
u
V
1 1 1
L.AB
LAB
LAB
0^ "^ O ro
0^ O
130
1030 -
CM ro
s s : s s ce; D: Di cr; cc; fc
MWF
h En
IS
1230- 130
1130-1230
930-1030
230- 330
900-1030
H H E-t EH EH
H Eiq 0 Q H J J ^q h l hJ
CM r^ rH i-i OJ ro ro ro ro "^ CNj rH rH CM rH
rH CNJ O i n VD O "" l CM ro O ro CM CN CM CN
vD En
Q) U
en •H En
139
o IT)
#
W Q O U
o o o s s IS: (^ Oi Pi
ro ro CM
EH S Eiq S
AR
T
DE
P
S H J^ S pLJ ^
V
o o
§ § § hJ ^q J
cr> o rH cvi ro
S S S p:; CK; cKj
fc! & K i ^ ^ S S EH
o o o ro ro ro 0^ rH rH
rH 1 1 1
O O O ro ro O CO O CM
r-{ ,-{
EH Es EH
y y W o w w w fn O Pi Oi
tJ hJ J
CM CM CM ro ro ro CM CM CM
En
0) JH
• H En
140
CM ro CM
Pi
O U
O ro
Eiq Q
S S S S « Di Cc; p:
.-:i K:I J hJ
o^ "^ t n LO rH rH rH
s s s s ct; Di ci cc;
^ .
En En En
<^
o o o o ro ro ro ro rH O cr» CO
I I I I
o o o o ro ro ro ro CM 0^ 00 (^
EH H EH EH O U U W W W . J i J hJ J
rH ro IT) O CM CM CM ro i n i n LD i n
ffi m K K
w w w w EH EH EH EH
rH CM ro ^
:^ S S 13 O O O O H H H H EH E H E H E H U U U U w w w w w w w w
CO En
(U JH
• H W
141
^START ^
READ TAPE FILE ONE AND CONSTRUCT TEMPORARY
STUDENT FILE
READ TAPE FILE THREE AND SIX AND CONSTRUCT TEI^PORARY PRIMARY AND
ALTERNATIVE COURSE LISTS
READ TAPE FILE SEVEN AND CONSTRUCT TEMPORARY
FACULTY FILE
READ TAPE FILE TEN AND CONSTRUCT TEx lPORARY
FILE OF FACULTY FOR EACH COURSE
INITIALIZE SCHEDULING FILE, ROOM FILE, AND CONSTRUCT UNCODING
TIME PERIOD FILE FROM CARDS
^ ENDJ
Figure F9
r START J
142
^
NO
READ NEXT COURSE TO BE SCHEDULED
YES
LOCATE NEXT INSTRUCTOR
NO
LOCATE LAB AND LECTURE HOURS REQUIRED
<'"° )
<
Figure FlOa
143
YES
NO
LIST ALL STUDELMTS REQUESTING THIS
COURSE
B >
LOCATE NEXT AVAILABLE LECTURE TIME AND ROOM
LOCATE NEXT AVAILABLE LAB TIME AND ROOM
NO
<
YES
Figure FlOb
144
LOCATE NEXT STUDENT TO FILL A SECTION AT THESE TIMES
UPDATE STUDENT, FACULTY, Sc COURSE
FILES
NO <I
Figure FlOc
145
>
IF \ STUDENT \ TIMES
AVAILABLE /
^ NO ALLOW BLOCKED TIMES TO BE AVAILABLE
< -
YES
IF INSTRUCTOR
TIMES AVAILABLE
NO ALLOVJ BLOCKED TIMES TO BE AVAILABLE • <
B
YES
^
Figure FlOd
146
/STARTN
READ SCHEDULED COURSES FROM TEMPORARY STUDENT FILE, UNCODE HOURS
AND PRINT STUDENT SCHEDULES
READ SCHEDULES COURSES FROM TEMPORARY FACULTY FILE, UNCODE HOURS
AND PRINT FACULTY SCHEDULES
READ SCHEDULED COURSES FROM TEMPORARY COURSE FILE, UNCODE HOURS
AND PRINT MASTER SCHEDULE
PRINT NUMBER OF UNSATISFIED COURSE
REQUESTS
C END J
Figure Fll
FILE 15 IS TAPE FILE 1 GRGINALLY AND SERVES AS A 6CCKKEE-PING FILE FCH STLCFM SCHEDULES
KECCRC 1-175 CnMAINS NA^E,SOC, SEC. NC-,6TC. RECCRG176-35C CCNTAIN PROTECTED TIMES AND COURSE TINES RECCRC351-210C CONTAINS CCURSE RECUESTS AND ONES SCHE-CELEC
147 JOB I FnRTRAN/GARY,A,C,CfC
CINENSICN NANE(e),ITIME(A8)tND(5)tNP(6),10(5,5),IC(5»6 I)»LCH(5,5) CIVEMSICN LPH(5,5) CINENSICN IZERC(2^) C A T A ( I Z E R L ( I ) » I = 1 , 2 A ) / 0 , C , 0 , C , C , C , 0 , C , 0 , 0 , C , C , 0 , C , C , 0 ,
I C O f O f C C G t - 0 , 0 / C/iTA WF/AH N'/yF/,VWTT/AHKWTT/,MT/AH TT/
C THIS IS THE ACTLAL SCHEDULING PRCGRA^ WHICH USES ALL CF C THE FILES CC.NSTRUCTEU IN PREVIOUS PROGRAMS C C IN ACCITICN SEVERAL FILES FCR BCCKKEEPING PURPOSES ARE C CONSTRUCTED CM A TENPCRARY BASIS C C c c c c c c c c C FILE ?C CCNTAIKS TAPE FILES 3,6,9 + 10 PLUS RCCV' USE INFf. C REC(RC l-2Cr Cl-NTAINS THE PRIMARY CCLRSE ORDERING LIST C R -CC-JC 2Cl-'3CC CCMTAINS THE ALTER. CRDEr^ LIST C kKCC><a 5GI-3CCC CliNTAlN'S THE TLACHERS TL TEACH EACH C CCL?SE Kv THE CPCtR TC EE SCHEDULED C RLCCRD 3CCI-3C5C CCNTAINS TIME USE CF THE RCONS C C C FILE 21 IS TAPE FILE 7 C RFCCRC 1-lCCC CCNTAINS NAKE,COURSES TO TEACH,ETC. C RECfKD ICC1-2CCC CONTAINS TEACHER BLOCKED TlVtS AND C CCURSE Tlf^ES C RECCRS 2CC1-3CCC CONTAINS THE COURSES THE TEACHERS C ARE TC TEACH C c C (;<:««#*«*:t*****«********************** ****************** ****C
REWIND 13 C C READING AND V<RITING GENERAL STUDENT INFO. C
DO 10 1=1,175 READ(13,9) NA^'E,.MSS1,NSS2,MC,NCC,NA,NSEC
9 FGRNATCeAA, 15, lA, 13,12,15,13) L15=NSEC VsRITE(2,9<;9g) L15
9999 FCR^'ATlfiH L 15 IS , lA ) V^RIT£(15$L15,9) NA^E,NSSl,NSS2,hC,NCC,NA,NSEC WRITE (2, 9) NAME,NSSl,NSS2,KC,^-iCC,NA,^SE0
10 CONTINUE
148
C BEGIN CODING PROTECTED TINE PERIODS FOR PROGRAM USE C AN 8 DENOTES A PROTECTED TIME AND A 9 DENOTES A SCHEDULED C -COURSE TINE C
DC ^5 1=1,175 REAC( 13,15) {NP(L),ND(L),L = 1,5),NSEQ
15 FCRNAT(5(IA,AX,AA),13) C C ZERO ELCCKEC TINE ARRAY C
DC 17 IX=1,A8 17 ITINE(IX)=0
KEEP=C 19 KEtP=KEEP+l
C C CHECK FCR f')t>f TINE PERIODS TC CODE C
2C 1F(ND(KE£P)-NWF) 52,21,52 C C CHECK FOR VvHICH HALF CF THE DAY AND IF 730 NWF C
21 IE{NP(KErP)-73C) 2 3,22,35 C C IF 530 NVsF SKIP - ALTON AT IC ALLY BLOCKED C
23 IF(NP{K£fcP)-53C) 2A,7e,2A C C BLOCK 730 NWF TIME PERIODS C
22 I T I N c ( l ) = e I T I N E ( 2 C ) = e I T I N E ( 3 9 ) = P GC TO 78
C C IF A3C NVvF PLCCK TINE PERIODS C
24 IF(NP(KFEP)-A3C) 27,25,27 25 ITIN£(lC)=g
IT1NE<29)=8 ITINE(A8)=e GO TO 78
C C IF 330 NWF PLCCK TINE PERIODS C
27 IF(NP(KFEP)-33C) 30,28,30 28 ITINE(9)=fi
C c c
c c c
c c c
c c c
c c c
c c c
ITINEr28)=8 ITlNE(A7)=e GO TC 76
IF 23C NV.F ELOCK TINE PERIODS
149
33,31,33 30 IF(NP(KEEP)-?30) 31 I T I N E ( 8 ) = 8
I T I N E ( 2 7 ) = 8 I T IN E { 4 6 ) = 8 GC TO 78
IF 13C MWF e L O C K T I N E P E R I O D S
33 I T I N E ( 7 ) = e I T I N E ( 2 6 ) = 8 ITlNE(/i5 ) = 8 GO TO 78
IF 1230 MV,F PLOCK TINE PERIODS
35 IF{NP(KEFP)-123C) 38,36,38 36 ITINt(6)=e
ITINE(25)=8 ITINE('*A) = a GC TO 78
IF 1130 P^f PLCCK TINE PERItXS
Al,39,Al 38 IF(NP(KEEP)-113C) 39 ITINL(5)=e
ITINE(2A)=8 ITINE{A3)=8 GO TC 78
IF 1C30 NV«F PLCCK TINE PERIODS
4A,A2,4A 41 IF(NP(KEEP)-1C3C) 42 ITINt(4)=8
ITINE(23)=8 1TINE(A2)=8 GC TC 78
IF 93C NKF OLCCK TINE PERIODS
44 IF(NP(KEEP)-93C) 45 ITINE(3)^E
1TINE(22)=8 ITINE(41)=8 GO TO 78
47,45,47
C C
C c c
c c c
c c c
c c c
c c c
c c c
c c c
IF 83C MWF BLOCK TINE PERIODS
47 1TIME(2)=8 ITINE(21)=8 I T I E C^ C ) 8 GC TO 78
52 IF(ND(KEtP)-NT) 72,53,72
IF 73C TT BLOCK TINE PERIODS
53 IF(NP(KEEP)-730) 56,54,64 54 ITINE(12)=8
ITINE(31)=8 GC TO 7 8
IF 43C TT BLOCK TINE PERIODS
56 IF(NP{KFEP)-43C) 59,57,59 57 ITINE(18)=8
ITINL(37)=E GO TC 78
IF 3CC TT BLOCK TINE PERKOS
59 IFCNPCKEEP )-3CC) 62,60,62 6C ITINE(17)=8
ITINi=(36) = e G( TC 7E
IF 13C TT BLOCK TINE PERIODS
62 ITUE(16) = 8 ITINE(35)=8 GO TO 78
IF 12Cq TT BLOCK TINE PERIODS
64 IF{NP(KFEP)-12CC) 67,65,67 65 ITINE(15)=8
ITINE(34)=8 GC TC 78
IF 1030 TT eLOCK TINE PERIODS
67 IF(NP(KEEP)-103C) 70,68,70 68 ITINE(14)=8
ITINE(33)=8 GC TC 78
IF 9CC TT BLOCK TINE PERIODS
150
151
C C C c
c c c
c c c
c c c
c c c
70 ITINE(13)=8 IT1NE(32)=8 GC TC 78
IF 63C NWTT BLOCK TINE PERIODS
72 IF(NC(KEEF)-NWTT) 74,73,74 73 ITINE(11)=P
ITINE(19)=8 ITINE(3C)=8 ITINE(38)=8 GO TO 1^
74 wRIT£{2,75) KEEP,NSEQ 75 FORMAK//,2CX,$PL0CKED TIME $,I4,$ FOR STUDENT $,14,$
IVAS AT FAULT - $,//)
IF CHECKED ALL TINE PERIODS FOR A GIVEN STUDENT
78 IF(KEEP-5) 19,79,79
WRITE IF STUDENT FILE
79 L15 = NSE':+175 WRITE(2,9S99) L15 W«MTE(15lL15,eO) ITIME
8 0 E p '< T ( A8 11) 85 CONTINUE
READING AND WRITING STUDENT COURSE RECUESTS
DO 95 J=l,175 DO 91 1=1,5
90 F0RNAT(5{2I4,2I 1),II,13) 91 REAC(13,9C) ( ID( I ,L ) ,IC(1,L),LCH(I,L),LBH{I,L),L^
11,5),NP(I ),N -SEO L15=341*( 10*NSEC) VsRITE(2,9999) L15 DO 94 1=1,5 WRITE(15$L15,9C) (ID(I,L),IC(I,L),LCH(I,L),LBH{I,L),L-
11,5),NPII ),N -SEQ
92 FCRNAT(?4I1) 94 WRITE(15$L15,92)IZERC 95 CONTINUE
END OF TAOE FILE 1
RCAD(13,96) NSEC
96 F0RNAT(I4) 152
C SKIP TAPE FILE 2 C
ICO REAC(13,1C1) JUNK 101 FCRNAT(lA)
IF(JUNK) 100,105,100 C C END TAPE FILE 2 C C
C TRANSFERING PRINARY COURSE ORDER TC FILE20 C
105 L20=l 110 REAC(13,111) IDEPT, ICSE,lALT
VNRITE(2C$L2C,111 ) I DEPT , ICSE , I ALT 111 FCRMAT{3I4)
IF( IDEPT) 110, 120,110 C C END TAPE FILE 3 C C C SKIP TAPE FILE 4 C
120 READ( 13,1C1) JUNK rF(JU,\K) 12C,13C,120
C C END TA^E FILE 4 C C C SKIP TAPE FILE 5 C
130 REAC(13,1C1) JUNK IF(JUNK) 13C,135,130
C C END TAPE FILE 5 C C
C TRANSFERING ALTER. ORDER FILE TO FILE 20 C
135 L20=2Cl 140 PEAC(13,lll) IDEPT,ICSE,lALT
WRITE(2C$L2C,111) IDEPT,ICSE,I ALT IFC IDEPT) 14C, 145,140
C C END TAPE FILE 6 C C Q3fr«#*««**************««**«««««****************************C
C C
TRANSFER TEACHER INFO. TO FILE25 153
145 150 151
15 3
9998
NCP=1 tD( 13,151) IDEPT,NANE^NP,LPT,NO ;NAT(r3-PA^./'I^.Tl-T^\
REAI
C c c c
c c c
FORNAKI3,8A4,6IA, II,13) IF(NG) 153,225,153 L25=NCP WRITE(2,999P) L25
FCRNATIFH L25 IS ,14) WRITt(21$L2 5,151) IDEPT,NANE,NP,LBT,N0
INITIALIZING A PRCTECTEC
PROTECTED TINE ARRAY - AS BEFORE AN 8 DENOTES TINE AND A 9 DENOTES A SCHEDULED COURSE TIME
C C C
DC 156 IX=1,48 156 ITINE(IX)=C
IF 1 - BLOCK 1ST QUARTER MWF
IF(LBT-l) 163,158,163 158 DC 159 IX=1,3 159 ITINE{IX)=8
DC 161 IX=2C,22 161 ITINE(IX) = t'
DC 162 IX=39,41 162 ITIN£(IV)^8
GC TO 16 81
IF 2 - BLOCK 2i\C CUARTER NWF
163 164 165
166
168 681
1685
IF(L'n-2) 169,164,169 DC 165 IX=4,6 ITINE{IX)=8 DO 166 IX=23,25 ITINb(IX)=8 DC 168 1X=42,44 ITINE(IX)=8 DO 1685 1=16,19 11=1+19 ITINEC I) = 8 ITINEC Il) = 8 GC TO 210
C c c
IF 3 - ELOCK 3RD CUARTER NWF
169 I F ( L B T - 3 ) 1 7 6 , 1 7 0 , 1 7 6 170 DC 171 IX=7 ,9 171 I T l N E n X ) = 8
DO 173 I X = 2 6 , 2 8 173 n i N E ( I X ) = 8
DO 175 I X = 4 5 , 4 7
c c c
175 ITINEIIX)=8 GO TC 1881
154
IF 4 - BLOCK 4TH CUARTER NWF
C C C
176 lH(LfiT-^) 1!J3,177,183 177 CO 178 IX=1C,11 178 ITINE{IX)=8
CO 18C IX=29,3C 180 I TINE{ IX) = 8
ITINL(48)=8 1881 DO 1885 1=12,15
11=1+19 ITINE(I)=8
1885 ITIN£CI1)=8 GO TO 210
IF 5 - RLOCK 1ST QUARTER TT
190
C C C
183 IF(L8T-5) 190,184, 184 DC 18t) IX=12,13 185 ITIME(IX)=8
DO 187 IX=31,32 187 IT1NE(IX)=8
GC TO 1941
IE 6 - "LOCK 2vC CUARTER TT
19C 191 192
194 1941
1945
IF(LBT-6) 197,191, 197 CO 192 IX=14,15 niNE(I>)=8 DC 194 IX=33,34 ITINE(IX)=8 DC 1945 1 = 6,IC 11=1+19 12=1+38 ITINEd ) = 8 ITINE(I1)=8 ITINE(12)=8 ITINE(11)=8 ITINE(3C)=8 GO TO 210
C C C
IF 7 - ELOCK 3RD QUARTER TT
197 IH(LBT-7) 2C4,198,204 198 DC 199 IX=16,17 199 ITINE(IX)=e
DC 201 IX=35,36 ?C1 ITINt(lX)=8
GC TO 2C71
c 15^
C IF 8 - ELOCK ATH CUARTER TT C
204 DO 205 IX=18,19 205 ITINF(lX)=e
DO 207 IX=37,38 207 ITINE{IX)=8 2071 DO 2C75 1=1,5
11=1+19 12=1+38 ITINE(I)=8 ITINE(I1)=8
2075 ITINE(I2)=8 210 L25=lCCC+Nn
WRITE(2,9998) L25 C C WRITE IN TEACHER FILE C
WRITE(21$L25,80) ITINE C C INITIALIZING SCHEDULED COURSE FILE C '
L25=2CCC+NC WRITF(2,9998) L25
WRITf(2l$L25,216) 1 ZERO,I ZERO,I ZERO 216 FCRNAT(3(24I I) )
NCP=NCP+1 GC TC 15C
C C END TAPE FILE 7 C C C SKIP TAPE FILE 8 C
225 REAC(13, ICl ) JUNK IF(JUNK) 225,23C,225
C C END TAPE FILE 8 C C C«:^**«*«* 4-<!***************«****«********************«*«*« «c C TRANSFERING TEACHERS FOR EACH COURSE TO FILE 20 C C C SKIP FILE NINE — OLD FILE OF TEACHERS FOR EACH COURSE C
230 NUT=9 231 REAC(13,236) N1,N2 236 FCRNATi2I4)
IF(NUT) 233,232,233 232 I F C M ) 2 3 3 , 2 3 4 , 2 3 3
~
c c c
c c c c c c c
233 NUT=N1 60 TC 231
END FILE 9
156
END TAPE FILE IC
SETTING UP ROOM TINES IN USE FILE IN 20
245 L2C=3C0C DO 265 1=1,41 Wi<IT£(2C$L2C,259) I ZERO, IZERO
259 FC^N.M{2( 2 1 1) ) 265 CCNTINUE
END END
157
CONNGN LECT, ICCNT,LECON,KCEPR,ITIME(4e),ILECT(48),KTIM IE(4P) CONNON L2C C I N EviS ION N A»'E ( r:) , NO ( 5 ) , NP • *>) , ID ( 5 , 5 ) , IC ( 5 , 6 ) , LCH ( 5 , b 1),LEH(5,5) DINENSICN NREC(110),LIST(II ,LAP(50) DIN ENS ION lKD(5),INC(5) ,IiJLt j),INLA(5) ,ISEC(3,6) DIMENSION IZERC(24) CATA(1ZERL(I),I=1,24)/0,C,C,0,0,C,0,C,0,0,0,0,0,C,C,0, lC,0,0,0,CtC, - C O /
9999 FORMAT($ COURSE = $,I4,1X,I4,$ WITH $,I4,$ NO ALTERNAT IIVE RECUESTS - $,5X»$ ON CCURSE NUNBER $,I4,$ OF PASS $,I4)
9998 FORNAT($ CCURSE = $,I4,1X,I4,$ INDIC = $,I1,$ LECT = l$,Il,i: AND -LAB = $,I 1,$ L2C = $, I )
9996 FORNAT(t TEACHtR Ai C STUDS $,I4,$ SECT. =1 $,6I3,$ SEC IT. =2 $,6 13, -$ SECT. =3 1 ,613,$ L20 IS $,I4)
9995 FORNAT($ TEACHERS COURSES SCHEDULED $,314,$ L25 IS $,I 14)
9994 FCRMAT($ READ STUDENTS COUTSES $,5(1X,I 4,I 4),$ ALTER IS $,I1,$ SE -C. NO. t,n,T Ll ) IS ^,14)
9993 FC>-NAT(S SCHECULt SITUATION $,Il,S ALTER. CSHcCLLEi: £, 111,? cru^s - E JUMPER 1 , 2 1 4 , f LECTURE PERIODS $ 3 1 2 , $ LAP Pt.<ICD IS $ , 2 1 2 , $ LE -RN $, 12,$ LRN $,12)
9992 FCRMATd TEACHER $,I4,$ TIME PATTERNS $,48(11,IX)) 9986 FORMAT($ TEACHER LAB SEARCH ONE HOUR TERIOD $,I4,$ L20
1 IS $, 14) 9985 FCRNAT($ FOR LAE PERIOD GREATER THAN OF EQUAL TC ONE $
1,314) 9984 FORMAT($ L^P RM SEARCH $,I4) 9983 FCRNAT(f INDEX IS $,I4,$ = SCHEDULED $,I4,$ STUDENT =
1$,14,4811) 9982 FORMAT{$ FIRST FREE PERIOD $,I4,$ LIKE $,I4,$ ITIME $,
I48I 1) 9981 FORNAT($ STUDENT TINE CHECK MWF $,I4) 9980 FORNAT($ STUDENT TINE CHECK TT $,I4) 9979 FORNAT($ STUDENT LAB CHECK $,214) 9977 FORMAT($ TI 'E PLCCK $,I4) 9976 FORNAT($ LAP PLCCK EQUAL OR GREATER THAN ONE $,214) 9975 FCRNAT($ TEACHEi ' TINE UPDATE $,I4) 9974 FORMATt$ TEACHER COURSE UPDATE $,14,IX,14) 9973 FORNATCl; UPDATE COURSE INFO L20 IS $,I4) 9971 FORNATCS STUDENT TO UPDATE $,I4) 9898 FORNAT($ TEACHER $,I4,$ ITIME $,4811,$ L30 IS $,I4)
158
9897 FORMAT($ COURSE $,I4,1X,I4,$ LECT $,I1,$ LAB $,I1,$ ST lUD $, 14,$ LI -5 IS $,I4)
9799 FORNAT(t NPFC = $,I4,$ NARK 15 $,I4) 9798 F0RNAT(3($ COURSE $,I4,$ LECT TIME $,312,$ LAB TIME $.
1212,$ LECT A -NO LAB RM $,212,/))
9797 FORNAT($ TEACHER $,I4,3($ LECT TIME $,312,$ LAB TIME $ 1,212,$ STUDE -NTS $,613,$ LECT AND LAB RM $,2T2,/))
9795 FORNAT($ IPROB $,I1,$ ISCH $,I1,$ COURSE $,I4,1X,I4,$ ILECT TINES $ -,3I2,$ LAB TIMES $,212,$ LECT AND LAB RN $,212)
9794 FORNAT($ IPROB $,I1,$ ISCH $,I1,$ COURSE $,I4,1X,I4,$ ILECT TINES $ -,3I2,$ LAE TINFS $,212,$ LECT AND LAB RN $,212,//)
9700 FORMAT($ KEPLR $,214) C C INITIALIZING COURSES TO SCHEDULE COUNTER C
LEFT=875 JUMP=0
C C DETERMINING WHICH PASS IN SCHEDULE C
5 KCUNT=1 6 JLN'^ = JUN^+I 7 L2C=KCUNT
C C JCON = STUDEN'T LIST STATUS — 0 = ENPTY AND 9 = FULL C LCON = LAB TINE UPDATE — 0 = YES AND 9 = NO C
DC 8 1=1,50 8 LAP(I)=C
JCCN=C INDEX=1 CO 10 1=1,110 NREC(I)=0
10 L I S T d )=C C C READ NEXT CCURS TC PE SCHEDULED C
REAC(2C$L2C,11) IDEPT,ICSE,IALT 11 FCRMATI3I4)
WR1TE(2,9999) IDEPT, ICSE,IALT,KOUNT,JUMP K0UNT=KCUNT+1 IF(JUMP-2) 2C,2l,22
20 IF(IALT) 30,5,3C 21 IF(IDEPT) 3C,25,30 22 IFC IDEPT) 3C,1050,30 25 K0UNT=2C1
c c c
c c c
c c c
GO TO 6
INITIALIZE WORK FILE
159
30
34 35
L30 = l DC 35 1=1,9 WRITE(IC$L3C,34) FCRNAT(3(24I1)) CONTINUE L20=5C1
IZERO,IZERO,IZERO
SEARCH FCR COURSE LIST CF TEACHER IN ORDER CF PREFERENCE
NUT = 0 45 REAC(2C$L2C,46) MD,NO,INDIC,LECT,LAB 46 F0RNAT{2I4,3I1)
IF{NUT) 5C,47,5C 47 IFCND) 48,1000,48 48 IF(IDEPT-NC) 5C,49,5C 49 IF(ICSE-MC) 50,53,50 50 NUT=MD
GO TO 45 53 KEEPC=L2C-1
WRITE(2,9998) MC,MC,IND IC,LECT,LAB,L20
LCCATES TEACHERS AND STUDENTS IN RESPECTIVE FlLtS
lY^l 60 KEEPT=KEEPC+1 70 L2U=KEhPT 75 REAC(2C$L2C,76) NTEA,( I SEC( 1,L ) , L = l,6 ) , (I SEC(2, I ) , I = 1,
16),(ISEC(3,J -),J=1,6)
76 FORMAK 14,3{ICX,613,4X) ) KEEPT=L20 WRITE(2,9996) NTEA,(I SEC(1,L),L=1,6),(I SEC(2, I ) , I = 1,6 ) 1,(ISEC(3,J), -J=1,6),KEEPT IFCNTEA) 77,89,77
77 DC 65 1=1,50 WRITE(2,9CC) LAP(I)
900 FORMAT(//,$ TEACHER LIST CHECK $,I4//) IFCLAPd)) 63,78,63
63 IF(LAn( I)-NTEA) 65,70,65 65 CCNTINUE 78 IE(ISEC(IY,2) ) 70,79,70 79 L25=2CCC+NTEA
READ(21$L25,84) (NP(I),1=1,3) 84 F0RNAT(3(I4,2CX))
WRITE(2,9995) (NP(I),1=1,3),L25 IZ = C
"
c c c
DO 88 N N = 1 , 3 IF(NP(NN) ) 8 5 , 9 2 , 8 5
85 I F ( N P ( N N ) - I C S E ) 8 8 , 8 6 , 8 8 86 IZ=IZ+1
I F ( I Z - I Y ) £ 8 , 9 2 , 9 2 88 CC/MTINUE
GC TC 7C 89 IY=IY+1
I F ( I Y - 3 ) 6 C , 6 C , 1 5 0
DETERMINING SECTION SIZE FOR SCHEDULING
160
92 93
95 lie
67
1 15 69
118
95,93,95
ITIME
9699
125
IF(ISEC(IY,1) ) JSIZE=2 GO TO 110 JSIZE=1 L25=1CCC+NTEA REAC(21$L25,67) F0RNAT(A8I1) WRITE(2,9975) L25 L3C = 1 WRITE( 1CSL3C,69) NTEA,ITIME F L R r- A T ( I , 4 E; I 1) W R I T E ( 2 , 9 c 9 8 ) N T E A , T T I M F , L 3 0 ir(JSIZE-l) 118,118,150 NCTH=2-JS1ZE DC 125 l=l,fCTH L15=1754ISFC( lY, I ) WrUTE(2,969S) L15 FCR' 'AT($ L15 IS $,I4) READC 15$L15,67) ITINE WRITE(1C$L3C,69) I SEC( IY,I),ITlME WRITE(2,9898) I SEC( IY,I ) ,ITIME,L30 CONTINUE
C c c c c c c c
CHECK FCR PREVIOUSLY SCHEDULED SECTION WHICH WERE PARTIALLY FULL
REMOVING TEACHER, STUDENT AND ROON BLOCK TIMES IF PREVIOUS -LY SCHEDULED PARTIALLY FULL SECTION
L30=l 128 REAC(1C$L30,69) NTEA,ITIME
L25=2GCC*NTEA WRITfc(2,9975) L25 RLAD(21tL25,131) (ND(L ) ,(LCH(L,I),1 = 1,3),(LBH(L,I),1 = 1 1,4),L=1,3)
131 F0RNAT(3(I4,7I2,6X)) WRITE(2,9 798) (ND(L),(LCH(L,I),1=1,3),(LBH(L,I),I= ll,4),L=l,3)
5010 5015
5020
5030 5040 5045
5050 5060
52CC 4CCG 4C1C
4020
4030
4035 4040
4050
4060
4065
DC 5200 11= REAC(IC$L3C L30=L3C-1 IF(NSEG) 5G IF(LBH(NN,3 DO 5030 1=1 IF(LCH(NN,I J12=LCH(NN, KTIME(J12)= CONTINUE IF(LaH(NN,4 J6=LBH(NN,1 J7=LBH(NN,2 DO 5050 I=J KTIN£(I)=C L15=NS£C+17 WRITG(2,969 WRITe(15$L1 L15=3424(10 WRITE(2,969 WRITE(15$L1 NREC(INDEX) WRITE(1C$L3 LEFT=LEFT+1 lNLcX=INDEX IF(L1HINN,3 L2C = 3CCC+Lf: REAC( / > C t L 2 0 DC 403C 1=1 I F ( L C H ( N N , I J 1 2 = L C H ( N N , K T I N E ( J 1 2 ) = IT IMF(J 1 2 ) = CCMTINUE L 2 C = L 2 0 - 1 WRITE(2C$L2 I F ( L B H ( N N , 4 L20=30CC+LP REAC(20IL20 DC 4C5C T=J KTINE(I)=C ITINE(I)=C L20=L20-1 WRITE(2C$L2 L25=1CCC+NT WR1TE(21$L2 L30=l WRITE(1C$L3 I F ( N N - 3 ) 40 DO 4 0 9 0 I=N J l = I + l
1,2 , 6 9 ) N S E C K T I M E
10,4CC0,5010 ) ) 5 C l i > , 5 0 4 0 , 5 0 1 5 , 3 )) 5C20,5030,5020 I) C
)) 5C45,5060,5045 )
)
6,J7
9) L15 5,67) KTIME *NSEC) 9) L15 5,34 ) IZERO, IZERO,IZERO ^NSEC C,34) IZERO, IZERO, IZERO
+ 1 )) 4C10,4035,4010 H(NN,3) ,67) KTINE ,3 )) ^020,4030,4020 I) C C
0,67) KTIME )) 4C40,4060,4040 H(NN,4) ,67) KTINE 6,J7
161
C,67) KTIME EA 5,67) ITIME
0,69) NTEA,ITIME 65,4095,4095 N,2
162 CO 4070 J=l,3
4070 LCH(I,J)=LCH(J1,J) DC 4080 J=l,4
4080 LBHC I,J) = LEH(J1,J) 4090 ND(I)=ND(Jl) 4095 DC 41CC J=l,3 4100 LCH(3,J)=C
DO 4110 J=l,4 4110 LEH(3,J)=C
ND(3)=C L25=2CCC+NTEA WRIT£(21$L2 5,r31) ( ND ( L ) , ( LCH (L , I ) , I = 1 , 3 ) , (LBH(L,I),I = 11,4),L=1,3) WRlTfc(2,979r ) (ND(L),(LCH(L,I),I = 1,3),(LBH(L,I),I = ll,4),L=l,3) L2C=KEEPT-1 READ(20$L2C,14C) NTEA,{ (LCH(L,I ) ,1 = 1,3),(LBH(L,I),1 = 1, 12),(TSEC(L,I -) ,1-1,6 ), (LPH(L, I), 1 = 3,4 ),L=1,3)
140 FCRNAT( 14,3(512,613,212) ) WRI TC(2,9 797) ^iTEA, ( (LCH(L,I ) , 1= 1 , 3 ) , ( LBH( L , 2 ) , 1 = 1,
12),(ISEC(L,I -) ,1^1,6), (LP.H(L, I), I=3,'i),L=l,3) DO 'sl5C 1 = 1,3
4150 LCH( lY, I )=C DO 4 U C 1=1,4
^160 L^H( lY, I )=C DC ^17C 1=1,2
4170 ISc:C(IY,I)=C L20=L2C-1 WRITE(2C$L2C,1^C)NTEA,( (LCH(L,I), 1=I,3),(LBH(L,2),1 = 1, 12),(ISEC(L, I -) ,1 = 1,6), (LBH(L,I), I = 3,4),L=l,3) WRITE(2,9797) NTEA,((LCH(L,I),I=1,3),(LPH(L,2),T=l,
12), ( ISEC(L,I -),I = 1,6), (LnH(L,I), I = 3,4),L=1,3) JSIZE=2
150 KEEPS=351 IF(JCON) 217,151,217
151 JC0N=9 IF(INDIC) 2CC,153,200
C TO CALCULATE LAE AND LECTURE HOURS OR NOT
C 153 L15=KEEPS
READ( 15$L15,155) ( I ND(L),INC(L),INLE(L),INLA(L),L=1,5) 1, lA.NSEC
155 FCRNAT(5(2I4,2I1),I1,I3) KEEPS=L15+1 JY=1 IFCJUNP-2) 156,156,160
w
c c c c
c c c c c c c c c
c c c
156 IFC IDEPT-INCCl ) ) 153,158,153 158 IFC ICSE-INC( I) ) 153,163,153 160 JY=JY+1
IFCIOE^T-INDCJY)) 162,161,162 161 IF(ICSE-1NC(JY) ) 162,163,162 162 IF(JY-5) 160,153,153
VERIFY LAB AND LECTURE HOURS WITHIN ACCEPTABLE RANGE AVOID KEYPUNCH ERRORS
163
- TO
163 164 165 166 167
175
IF( INLE(JY)-3) 164, 164,153 IF( INLA(JY)-6) 165,165,153 IF( INLE(JY) ) 167,166,167 IFC INLACJY) ) 167,153,167 LECT=INLE(JY) LAB=INLACJY) INDIC=9 L20=KEEPC WR1TEC2C$L2G,46) ND , NC , I >JD IC , LECT , LAB WRITEC 2,9897) NC,NO,INDIC,LEOT,LAB IE(JUMP-2) 18C, lfcO,175 JY=JY-1 CO TO \ilQ
PRINARY COU'^SE 1ST ;U<;UEST
LOCATION - ALL STUDENTS WITH THIS COURSE AS
ALTERNATIVE COURSE LOCATION - ALL STUDENTS WITH THIS CGUTS E
COURSE AS /5N ALTERNATIVE TO SGNE PRIMARY RECUEST
2C0 JY=1 L15=KEEPS READC 15$L 15, 172) ( INDCL ) , INC(L) , L=1,5),IA,NSEG
172 F0RNAT(5(2I4,2X),Il, 13)
KE£PS=L15+1
DETERNINES WHICH PASS AND TYPE OF COUTSE TO BE LOCATED
180 IF(JUMP-2) 181,182,205 181 IF(IA) 215,206,215 182 IF( lA) 206,215,206 205 JY=JY+1 206 IFC IDEPT-INCCJY) ) 208,207,209 207 IFC ICSE-INCCJY) ) 2(;e,210,208 206 lECJUNP-2) 215,215,209 209 IFCJY-5) 2C5,215,215 210 READC15$L15,186) I PROB,ICNUM,JDE,JOE,CNPCI ),I = 1,3),LAB
lS,LAnE, -LERN,LARN
164 186 F0RMAT(2Il,2I4,7I2)
WRITE (2,9994) ( I ND ( L ) , INC ( L ) ,L= 1, 5 ) , I A , .N SEO , KEEPS WRITE(2,999 3) I PROB, ICNUN,JDE,JOE,(NP(I ) , 1 = I , 3),LAB 1S,LABE, -LERM,LA'^M IF(IPROP) 215,212,215
212 MRECC INCEX) = NSEC INDFX=INDEX*1
215 IF(K£EPS-21C1) 2C0,217,217 217 IF(JUMP--2) 219,218,218 218 IFCINDEX-2) 102C, 1020,219 219 IFCIY-3) 22C,22C,905
C
C BEGIN SEARCH FOR ACCEPTABLE TIME FOR TEACHER C
220 KEEPR=0 ICONT=C ICONS=C 1SNWF='C ISTT=C
222 NARK=1 La^j<=l
JAN = 0 223 DO 224 1=1,48 224 ILFCT(T)=C
Lcr!N = c 226 LECCN=C
LACO.N = 0 L30 = l READC 1C$L3C,69) NTEA,ITINE WRITEC2,9992)NTEA,ITINE IFCLECT) 3CCC,295,3C00
C C CHECK IF LECTURE HOURS NEEDED C c C ESTARLICHES THE NEXT EARILIEST TIME PERIOD TO START THE C TEACHER TINE SEARCH C LECON = LECT CONFLTS AND LACON = LAB CONFLTS C 3CC0 IFCLECT-2) 3C05,303C,3050 3005 DO 3010 1=31,38
IFCILFCTCD) 3010,3090,3010 3010 CONTINUE
DC 3020 1=39,48 IFCUECTCD) 3020,3080,3020
3020 CCNTINUE 3030 DO 3040 I=2C,3C
IFCILECT(I)) 3C40,3C80,3040 3040 CCNTINUE
w 3050 CO 3060 I
IFC ILECTC 3060 CCNTINUE
DO 3C7C I IFC ILcCTC
3070 CONTINUE GO TO 889
3C80 LIKE=C CALL TENW WRITEC2,9 IF(LIKE)
3090 LIK£=C CALL TETT WRITEC2,9 IFCLIKE)
165 = 1,1C I)) 3060,3080,3060
=11,19 I)) 3C7G,3C9C,3C70
C C IF C PE C C C LAB C -C LE C TH C
2 9 5 6CC0
THE TEACHE RIODS - CH
EC I,LIKE, ISMWF, ISTT) 9 f; 2 ) I , L IK F , IT I M E 3CCC,295,3C0C
CI,LIKE,ISMWF,ISTT) 982) I,LIKE,ITIMt 3CC0,295,3CCC
R UNDER CONSIDERATION HAS NO MORE TIME ECK CONSTRAINT SITUATION
ON THE LAST PERIODS AND WORK TOWARD THE FIKST CTURE HOURS WERE OPPOSITE UNLESS ONLY ONE S WAS REQUESTED, THEN THE SEARCH STARTED AT WORKED FORWARD
4 7 5,6CC0,4 75
S START FR WHEREAS LE CTURE HOUR E END AND
IFCLCO.N) NXL 1 = C NXLE=G NXL1C=C KEPLR=C
C C DETERNINE NUMBER CF LAB HOURS REQUIRED C
296 L30 = l READC1C$L WRITEC2,9 IFCMXLl )
297 IFCMXLB) 298 IFCNXLIC) 299 IF(LAB-l) 3C0 IFCMXLl-3 301 11=38
GC TG 312 302 IF(NXL1-1 303 11=30
GO TG 3C6 304 11=19
GO TO 312 305 LABTT=LAB
11 = 49 306 11=11-11
30,69) NTEA,ITINE 992) NTEA,ITIME 300,297,300 382,29E,382 332,299,332 475,3C5,329
C) 302,303,301
9) 329,304,303
^ ^
307 308
311 312
317 320
327
329
C C IF C
332 333 334 335
336
337
L20=3C01 WRITEC2,9986) I1,L2C DC 311 J=l,40 READC2C!L2C,67) KTINE IFC ITINECII )) 311,307,311 IFCKTINEC ID ) 311,308,311 KEPLR=L2C-3CC1 WRITEC2,97CC) KEPLR,L20 NXL1=I1 GO TO 475 LAC0N=LAC0N+1 11=11-8 L20=3CC1 WR1TEC2,9986) 11,L2C DO 327 J=l,40 R£ACC2C$L20,67) KTINE IFC ITIMEC I D ) 3 2 7 , 3 1 7 , 3 2 7 IFCKTINEC I D ) 3 2 7 , 3 2 0 , 3 2 7 KEPLR=L2C-3CC1 WRITEC-2,97CC) KEPLR,L20 NXL1=I1 GO TO 475 LACCN=LACCN+l IFC 11-11) 329,329,306 NXL1=C NAX=49 NVLIC^NAX GO TO 34C
LAP HOURS GREATER THAN 1 - START LAB SEARCH
166
IFCNXLlC-39) IFCMXL1C-2C)
333,351,335 334,351,336
IF(NXLIC-LAH) 8 2 9,3 37,337 NAX=4g GO TO 340 MAX=3C GC TC 340 NAX=11
C C SEARCHES MWF PERIODS C
340 12=1 LAUTT=LAB L=MAX-MXL10+1 DO 350 I=L,10 11=MAX-I WRITEC2,9985) IFC ITIMEC I D )
3 4 5 1 2 = 1 2 + 1 I F C L A E - I 2 ) 36C ,360 ,35C
1 , 1 1 , 1 2 3 4 9 , 3 4 5 , 3 4 9
w
C c c
c c c
349 12=1 LACCN=LAC0N+1
350 CONTINUE 351 NAX=MAX-11
NXL10=C NXL8=NAX IFCNAX) 390,889,390
PERFORMS A ROOM CHECK
360 I4=Il-LAfi*l 15=11 L20=3001 IFCNXLlC-39) 366,365,365
365 IFCI4-39) 351,370,370 ^^^ IFCNXL1C-2C) 368,367,367
IFCI4-2C) 351,370,370 IFCNXLlC-1) €89,369,369 IFC 14-1) 889,370,370
^f^ DC 38C J=1,4C 371 RtA0C2C$L2G,67) KTINE
DC 3 75 N=I4,T5 ^RITE(2,9SPA) N IF(KTIMECN) ) 38C,375,380 CCNTINUE KtPLR=L2C-3CCl WRITEC2,97CC) KEPLR,L20 NXL1C=1 1 LAPTT=LftB GC TO 475 CONTINUE M X L 1 0 = M X L 1 C - 1 GC TO 332
167
366 367 368 369 370
375
380
SEARCHES TT PERIODS
382 383 384
IFCMXL8-31) 383,421,384 IFCNXLe-12) 421,421,387 NAX=38 GO TO 390 MAX=19 12=1 L=MAX-NXL8+1 IFCLAE-4) 392,4C0,4C5 IFCLAO-2) 393,395,395 LA0TT=1 GO TG 410
395 LA81T=2 GO TO 410
400 LABTT=3 GC TO 410
387 390
392 393
c c c
1,11,12 419,415,419
405 LABTT=4 410 DO 420 I=L,7
I1=NAX-I WRI IEC2,9985) I F C I T P ' E C 1 1 ) )
4 1 5 1 2 = 1 2 + 1 IFCLAETT-I2) 430,430,420
419 12=1 LAC0N=LAC0N+1
420 CONTINUE 421 NAX=NAX-8
NXL8=0 MXL10=MAX GC TO 340
PERFORMS ROOM CHECK
430 I4=Il-LAfiTT+I 15=11 L20=3a01 IFCMXL8-31) 436,435,435
4^5 IFCT4-31) 421,^.39,439 43t IF(NXLP-12) 421,437,437 437 IFC14-12) 421,^39,439 4 39 CO 450 J=1,4C 440 RrACC2C«L2G,67 ) KTINE
DO ^45 N= I^, 15 W ! D i: C , 9 9 G 4 ) N IFCKTIM^CN)) 45C,^45,45C
4 45 CCNTINUE KEPLR=L2C-3CCl W R I T t C 2 , 9 7 C C ) KEPLR,L20 MXLe=Il GO TO 475
450 CCNTINUE MXL8=MXL8-1 GC TO 382
C C«<:«;{c**«*«*«* :&******************************************•* *C C BEGIN SCHEDULING STUDENTS C C c c c
c c c
CHECK FCR REMAINING STUDENTS TO BE SCHEDULED FOR THIS COURSE
475 IFC INDEX-NARK) 860,880,^76
LOCATE STUDENT BLOCKED TIMES
A76 L15=175*MREC(NARK) READC 15$L15,67) ITINE
p" 169
C C
C C C
c c c
c c c
WRITE(2,998 3) INDEX,MARK,MREC(MARK),ITINE
LOCATES POSITION FOR PEGINNING OF SEARCH IF(ISMWF) 481,479,481
479 IFCISTT) 49C,5CC,49C 481 K=ISMWF
SEARCHES NWF PERIODS
482
483
IFCLECT-2) 482,483,484 NENC=K GC TO 485 NEND=K+19 GO TO 485
484 NENC=K+38 485 DO 489 I=K,NEND,19
WRI TEC2,9981) I IE ( ITINEC D ) /< 8 6, 4 89, 4 86
486 1FCICCN5-1) 665,467,487 487 IFC ITIMEC I )-8) 865,489,8 489 CONTINUE
GO TO 5C0
SEARCHES TT PERIODS
490
491
492 495
496 497 499
Kl=IST T IE(LECT-2) ^91,492,492 NENC=K1 GC TC 495 NEND=K1+19 DC 499 I=K1,NENC,19 ' WRITcC2,9980) I IFC ITINF C D ) 496,499,496 IFCICCNS-D 8C5,497,497 IFCITIN^CD -E) 865,499,865 CCNTINUE GO TC 5C0
BEGINS LAB SEARCH
500 501 502 503 505 510 520
524 525
IFCNXLl) 501,505,501 IFC ITINE(NXLl) ) 502,540,502 IFCICONS-1) 87C,503,5C3 IFCITI^^ECNXLl)-8) 8 70,540,8 70 IFCNXL8) 52C,51C,52C IFCNXLIC) 52C,540,520 DC 530 1=14,15 WRITEC2,9984) I IFC ITIMEC D ) 524,530,524 IFCICCNS-1) 870,525,525 IFClTINFCI)-8) 870,530,870
170 530 CONTINUE 540 WRITFC 1C$L3C,69) NREC(MARK),IT INE
WRITEC 2,9 970) f RECCNARK ) , I T I ME,NXL1,NXL8,MYL1C 9970 FCRNATC$ STlD $,I4,$ $,4011,$ MXLl $,I4,S NXL8 $,I4,^
1 NXLIC $, 14)
C CHECK IF SECTION IS FULL C
NARK=NARK+1 JAN=JAN4l IFCJSIZE-JAN) 54 5,545,475
C (;:j(){c***«4!*«:{:*:e::f*:fr:^:t:t«:»:t:t«****^«*** * * * * * * * * * * * * * * * * * * * * * * * * * * C
C BEGIN FILE UPDATE PROCEDURES C
545 JAM=0 550 L30=l
C C TEACHER UPDATES FIRST - THEN STUDENT UPDATES C
READC1C$L3C,69) NTEA,ITIME IW0RK=L3C W R I T E C 2 , 9 9 9 2 ) N T E A , I T r ' E GO TO 552
551 JAM=JAN+l READC 1CJL3C,69) NSEQ, ITINE I/.rRK = L30 WRITEC2,999?) NSEO,ITINE IFCNSEC) 552,855,552
C 0 DETERMINING WHICH LECTURE PERIODS TC BLOCK C
552 IFCISNWF) 556,553,556 553 IFC ISTT ) 56C,565,56C 556 DO 558 I=K,NEND,19
WRITEC2,9977) I 558 ITINECI)=9
GO TO 565 560 DO 562 I=K1,NEND,19
WRITEC2,9977) I 562 ITINECI)=9
C C DETERNINING WHICH LAB PERIODS TO BLOCK C
565 IFCNXLl) 570,566,570 566 IFCNXL8) 575,567,375 567 IFCNXLIC) 575,580,575 570 ITIMECMXL1)=9
GO TC 580 575 DO 578 1=14,15
WRITEC2,9976) 1,11
w C C c
c c c
578 5 80
I T I N E C I ) = 9 IFCJAN-D 5P5,8CC,8C0
171
UPDATES TEACHER BLOCKED TIME - ON DISK
565
5B7
L2 5=1CCC+NTEA WRnEC21$L25,67) ITIME KRITEC2,9975) L25 CO 587 1=1,3 N^C I ) = r IFC ISMWF) 6CC,595,6CC
595 IFCISTT) 610,615,610 6C0 11=1
DC 6G5 I=K,NEND,19 NPC II)=I I I=II + l GO TO 615 11=1 DO 612 I=Kl,NENL,19 NPC II) = I I I=II41
605
610
612
DETERNINES LAC START AND FINISH TINES
620 625 630
634
6 38 640
645
63CT(:2C,63r r 3 4 , 6 2 5 , 6 3 1 6 3 3 , 6 A 5 , 6 3 E
6 1 5 L A S T R = C L A E C = C ir (,'XLl) I E ( ? X L E ) I F C N X L I C ) N C P E = N X L I GC TO 6^0 NCPL=NXLP GC TO 6^0 NCPE=NXL1C LASTR=N0PE-LAPTT+1 LAFN0=NCPE L25 = 2 C C C * M E A R E A D C 2 1 f L 2 5 , 1 3 1 ) ( N D ( L ) , ( L C H C L , I ) , 1 = 1 , 3 ) , C L B H C L , I ) , I = 1
1 , 4 ) , L = 1 , 3 ) L 2 5 = L 2 5 - 1 DO 6 5 5 N = l , 3 WRITEC2,9974) L25,N IFCNDCN)) 655,660,655
655 CONTINUE 660 DC 665 1=1,3
LEHC!V,D = LASTR LHHCN,2)=LAEND LBHCN,3)=K£EPR LBHCN,4)=KEFLR
665 LCHCN,I ) = NPC I) NDCN)=ICS£
w
C C C C
0 c c
172
WRITEC2l$L2 5,131) CNDCL ) ,CLCHCL,I),1 = 1,3),CLBHCL,I), 1 = 11,4),L=1,3) WRITEC 2,9798) CNOCL ) ,CLCHCL,I),1 = 1,3),CLBHCL,I),1 =
11,4),L=1,3) ^
UPDATES COURSE SECTION INFORNATION - TEACHER, STUDENTS, RCONCS), TIMES, ETC.
680 L20=KEEFT-1 WRITEC2,9973) L20 READC2C$L2C,14C) MTEA, C CLCHCL,I),1 = 1,3),CLBHCL, I ),I = l 1,2),CISECCL, - I ) , 1=1,6) , CLBHCL,!),I = 3,4),L=1,3)
685 L20=L2C-1 DC 687 N=l,3 IFCISECCN,1)) 687,688,687
6 87 CONTINUE 608 DC 69C 1=1,2
READC1C$L30,6E6) NSFQ 686 FORMATC T^) 690 ISECCN,T)=NSEC
DC 69 5 1=1,3 695 LCHCN,I)=NP(I)
LOHIN,1)^LASTR LPHCN,2)=LAENC
• LEE CN,3 )-KEf^^P L:^H{N,^ ) = K L E L R
A R IT :T C 2 Cl L 2 C , 1 'H C ) N' T E A , ( { L C H I L , I ) , I = 1, 3 ) , ( L !] H C L , 1) , I = I 1,2),C I S E C C L , -I ) , 1 = 1 , 6 ) , C l B E C L , 1 ) , 1 = 3 , 4 ) , L = 1 , 3 ) W R I T F C 2 , 9 7 9 7 ) M T E A , C C L C H C L , I ) , I = 1 , 3 ) , C L B H C L , I ) , 1 = 1
1 , 2 ) , C I S E C C L , -I ) , 1 = 1 , 6 ) , C L B H C L , I ) , 1 = 3 , 4 ) , L = 1 , 3 )
U P D A T E S R O O N I N F O R N A T I O N - ON D I S K
7 1 5 L 2 0 = 3 C C C + K E E P R R E A C C 2 C $ L 2 C , 6 7 ) I T I N E L20=L20-1 IFC ISMWF) 725,720,725
720 IFCISTT) 735,75C,735 725 DO 73C 1=K,NEND,19 73C ITINECI)=9
GO TO 745 735 DC 74C I=K1,NEND,19 740 ITINECI)=9 745 WRITEC2C$L2C,67) ITIME 750 L20=3C0C+KtPLR
REACC2CtL2C,67) ITINE L20=L2C-1 IFCMXLl) 765,755,765
C c c c c c
c c c
7 5 5 I F C N X L 8 ) 7 7 C , 7 6 C , 7 7 C 7 6 0 I F C N X L I C ) 7 7 C , 7 E 5 , 7 7 0 765 I T I N E C f ^ X L D = 9
GC TO 7 8 0 7 7 0 CO 7 7 5 1 = 1 4 , 1 5
V*R ITEC2 ,9976 ) 1 , 1 1 775 I T I N E C I ) = 9 780 W R I T E C 2 C $ L 2 C , 6 7 ) I T I M E 785 L30=IW0RK
GO TG 5 5 1
UPDATES STUDENT FILES - ON DISK
DETERMINING WHICH COURSE REQUEST TC UPDATE
800 L15 = 34DC IC*NSEG ) ITENP=L15+F WRITEC2,997l) L15
10 READC 155L15,811) C I NDC D,I NOCI),1 = 1,5) 11 F0RNATC5C2I4,2X) )
L15=L15*1 JY=l IFCJUNP-2) 825,825,820 JY=JY+1
173
8 811
820 8 25 h3C ri35 837 840 841
JY=JY+1 IF ( lCE:n-INC( JY) ) 8 3 5,830,835 IE 1 ICSE-I NO(JY) ) E3 5, E4 1,83 5 It- ( JU''P-2 ) >-' C,E -tf>,P37 IHCJY-5) t2C,E4C,8^C IFCL15-ITENP) E1C,810,8^5 T o 1 r R - o IPR0B=9 ISCH=JY L15=L15-1 WRITEC15$L15,ie6 ) IPROB,ISCH, IDEPT,ICSE , CNPCI ), 1 = 1,3), LASTR.LAErsD,
IPROB,ISCH, IDEPT,ICSE, CNPCI ), 1 = 1,3),
1LASTR,LAE!\D, -KEEPR,KEPLR WR1TEC2,9795) 1LASTR,LAE\D, -KEEPR,KEPLR
UPDATES BLOCKED TINES
L15=1754NSEC WRITEC 15$L15,67) ITIME '' 10 850 GC ._ -. _
845 WRITEC2,?46) NSEQ 846 FORMATC//,$ ****
IITICN WAS NO -T UPDATED «***$) W R 1 T L C 2 , 9 7 9 4 )
ILASTRjLAEND,
STUDENT $,I4,$ FOR THE FOLLOWING CUNU
IPROB,ISCH, IDEPT,ICSE,CMPCl ), 1=1,3),
w
c c c
c c c
850
855 856 857
860
862
863
864
- K E E P R , K E P L R L £ F T = L E F T - 1 I F C J A N - 2 ) 5 5 1 , 8 5 5 , 8 5 5 IFCNRECCNA;<K) ) E 5 7 , 8 5 6 , 8 5 7 I F C L I S T C 1 ) ) P 6 C , 1 C 2 5 , E 6 C L I S T C L A P K ) = N R E C C N A R K ) L A R K = L A R K + l MARK=MARK-H IFCINDEX-NARK) 860,860,857 DO 862 1=1,LARK MRECCI) = LISTC I ) WRITEC2,9799) NRECCI),I LISTCI)=0 L3C=1 DC 86 3 1=1,9 WRITEC1C$L3C,3 4) IZERO,IZERO,IZERO CONTINUE INDEX=LARK DO 864 I=LARK,110 NRECCI)=0 LISTC I ) = 0 GC TO 7C
174
STUDENT WAS NOT SCHEDULED THIS PASS
865 LrCON=LFCON+l GO TO 8 75
P70 L \C0N = L^CC\+1 875 LISTCLARiO^^RECCNARK)
NARK=NARK*1 LARK=LARK4l GO TO 475
CHECK FCR STUCENTS NOT REGISTERED ON PREVIOUS PASSES
880 IFCLISTCD) 885,883,885 883 1FCL3C-3) 1025,Ee4,684 884 IFCJUMP-2) 545,1025,1025 885 NARK=l
L30 = 2 2CC0 R£ACC1C$L30,686) NSEC
IFCNSEC) 2C1C,2C20,2C10 2010 NRECCMARK)=NSEG
WRIT£C2,9799) NRECCNARK),NARK NARK=NARK+1 GC TO 2CCC
2020 LARK=LARK-1 CO 2025 1 = 1,LARK MPECCNARK ) = LISTCI) WRITEC2,9799) NRECCNARK ),MARK MARK=MARK+1
1^
2C25
2030
2035
2038 2039 2041
2046
2055
LIST DC 2 LIST INDE NARK LARK JAM^ L30 = DC 2 WRIT CON I L30= IFCL IFC I IFC I ILEC LOON GC T ILEC LOON GO T LECC LACC GO T
(I) C3C CD X = = 1 = 1 0 2 C35 EC 1 INU 2 ECO SNW STT TCK = 9 0 2 TCK = 9 0 2 N = C N = C 0 2
= 0 I=LARK,11C
= 0 ' RK
175
1=1,9 C$L3C,3A) IZERO, I ZERO, I ZERO E
N-LACON) 2055,2038,2038 F) 2CA1,2039,2041 ) 2046,2C55,2046 ) = 9
2t 1)=9
26
96 C 0 OCN C c 0 c c c c c c
STRAINT UPCATES - VALUES A-^E C , l , OR 2 C OENOTcS ATTTMPT TC FIT TEACHERS AND
EAHLIEIT ^'CSSl^L- LECTURE PERIOD POSSIRLE LAE PERIOC
1 D E N O T E S ATTENPT TC FIT TEACHERS AND ANY P C S S P J L L TINE PERIOD
2 DENOTES ATTINPT TO SCHEDULE WITHOUT PRCTECTEC TINE PATTERNS OF STUDENTS OR A LAST RESORT CONDITION
STUJENTS liJTU A..' A^D LATEST
STUDENTS INTO
REGARD TO TEACHERS -
889 IFCICONS-1) 893,895,895 893 ICONS=ICONS+l
WRITEC2,6699) ICONS,ICONT 6699 FORMATC//,$ STUDENT CONSTRAINT
lONSTRAINT IS -$, 14,//) GO TO 222 IFC ICONT-I) 896,898,89 8 DO 903 1=1,50 WRITFC2 ,9CC) L A P C D I F C L A P C D ) 9 C 3 , E 9 9 , 9 0 3 LAPCI)=NTtA GO TO 1C15 CONTINUE ICONT=ICONT+1 WRI TEC2,6699) ICONS,ICONT
IS $, 14,$ AND TEACHER C
895 898
899
903 896
*; •
176 GO TC 222
C C NARKING FILES AS PROBLEM SITUATIONS OCCUR C
9 0 5 I F C J U N P - 2 ) 9 C 6 , l O l C l C l C 906 LARK=LARK-1
IPR10=8 DO 915 1 = 1,lie IFCNRECC I ) ) 9CE,101C,9C8
908 L15 = 342+C 1C=5NRECC I ) ) WRITEC15$L15,9C9) IPROB
909 FORMATC I D WRITEC2,9971) NRECC I)
915 LEFT=LEFT-1 C
C REASONS FOR NOT SCHEDULING SECTIONS C ICCC WRITEC.2,1CC1) IDEPT,ICSE ICOl FORMATC$ COURSE $,I4,1X,14,$ DID NOT NATCH $,//)
GO TO 1C25 lOlC WRITE(2,lCll) ICEPT,ICSE ICll FORf-'ATC$ OUT OF TEACHERS FOR $, 14, IX , 14 ,//)
GO TO 1025 1015 WRITE(2,1C16) NTEA, IDE^T,ICSE 1016 FORNATCS TE^*CHER $,I4,S CANNOT BE SCHEEULEP fC^ COURSE
1 T , I 4 , I X , I 1 , - / / )
GO TO 7C 1020 WRITEC2,1C21) IDEPT,ICSE 1021 FORNAIC* POTENTIAL SECTION SIZE TOO SMALL $,14,IX,14,/
1/) C C COURSES REMAINING TC BE SCHEDULED C 1025 L30=1G
WRITEC1C$L3G,686) LEFT WRITEC2,1C61) LEFT
1061 FORMATC//,2CX,$ NUMBER REMAINING EITHER UNSCHEDULED GK 1 PROBLEM FLA -GGEC IS $,1^) IFCLEFT) 1C5C,1C5C,7
1050 CCNTINUE END SUBROUTINE TENWFC I ,LIKE,ISMWF,ISTT) CONNON LECT,1C0NT,LEC0N,KEEPR,ITINEC48),ILECT(48),KTIM lEC4e) COMMON L2C
C C HANDLES MWF PERIODS - TEACHER AND ROOM SEARCH C
67 97C0 9990
249 251 252 253 255
256
257 258 259 260
264 265
280
F0RMATC48I1) FORMATCS KEEPR $,214) FORMATC$ NWF LOOP TEACHER LECT $,214) 12=1 11=1 V»RITFC2,999C) 11,12 IFCLECT-I2) 2 5 6 , 2 5 1 , 2 5 1 I F C I T I M F C I D ) 2 5 2 , 2 5 5 , 2 5 2 IFCICCNT-1) 2 6 5 , 2 5 3 , 2 5 3 IFC ITIMEC I l ) - 8 ) 2 6 5 , 2 5 5 , 2 6 5 1 1 = 1 1 + 1 9 1 2 = 1 2 + 1 GO TO 249 L2C=3CC1 DO 264. J = 1 , 4 C R E A D C 2 0 $ L 2 0 , 6 7 ) KTIME 13=1+19 14=1+38 IFCLcCT-2) 259,258,257
177
4 4
IFCKTINEC 14 ) )264,258,264 IFCKTINEC13) ) 264,259,26 IFCKTINFC I ) ) 264,260,26 KEcPR. = L2C-3CCl W.-tIT£C2,97CC) KEEPR,L20 LIKE=C I S N Vv F = I I S T I = C GO TC 2 PC CENTINUE LEC0N=LEC0N+1 ILr^CTC I ) = 9 LIKE=9 RETURN END SUBROUTINE TETTCI,LIKE,ISNWF,ISTT) CONNON LECT, ICONT,LECON,KEEPR,ITINEC48 EC48) .EC48) CONMCN L2C
),ILECTC48),KTIM
C C HANDLES TT PERIODS - TEACHER AND ROOM SEARCH C
67 97C0 9988
272 274 275 276
FORM FORM FORM 12 = 2 I 1=1 WRIT IFCL IFC I IFC I IFC I
A T C 4 e i l ) A T C $ KEEPR t,2I4) A T C $ TT LOOP T E A C H E R LECT $ , 2 1 4 )
E C 2 , 9 9 e E ) 1 1 , 1 2 E C T - I 2 ) 2 7 9 , 2 7 4 , 2 7 4 T I M E C T D ) 2 7 5 , 2 7 8 , 2 7 5 CONT-1 ) 2 9 C , 2 7 6 , 2 7 6 T I M t C l l ) - 8 ) 2 9 0 , 2 7 8 , 2 9 0
278
279
280 281 282
289 290
300
11=11+19 12=12+1 GO TU 2 72 L20=3CC1 CO 289 J=1, ,C READC2C$L2C,67) KTINE 13=1+19 IFCLECT-2) 281,280,280 IFCKTINEC 13) )2P9,2fil,289 IFCKTINEC D ) 2P9,282,289 KEEPR=L20-3CC1 WRITEC2,97C0) KEEPR,L20 LIKE=C ISTT=I ISMWF=0 GO TO 3C0 CONTINUE LEC0N=LEC0N+1 ILECTC I ) = 9 LIKE=9 RETURN END
178
END LOAD LX P25,P25 END GO P25 END DUMP ECOL , 77777,C END FIN
^ ^
179
JOB I FORTRAN/GARY,A,D,C,C DINENSICN NANEC8), ITINEC48),NDC5),NPC6),IDC5,5) ,ICC5,6 1 ),LCHC5,5) DINFNSION LEHC5,5),DAYSC13,6) DIMENSION IZER0C24),jnLKC13) CATACIZEROCI),I=1,24)/C,C,0,0,0,0,0,C,0,0,0,0,0,0,0,0, 1C,0,C,C,C,C, - C O / DATAC JPLK CD ,T=l,r3)/lH , IH , IH , IH ,1H ,1H , IH , IH ,1 IH ,1H ,1H ,1 -H ,1H /
C
C C FILE 10 IS A WORK FILE FOR SCHEDULING EACH SECTION C RECORD 1-9 CONTAINS STUDENT AND TEACHER INFU. WHICH C HAVE BEEN TENPCRARILY SCHEDULED C RECORD 10 CONTAINS THE NUMBER OF RECUESTS UNSCHFDULLO C C C FILE 23 IS A WORK FILE FOR UNCODING CLASS TINES C RECcRC 1-144 CONTAINS A TABLE FOR CONVERTING TINE C CODES FOR LECTURES TO A NQRNAL CONVENTION C RECORC 151-19h CONTAINS THE TAELE FOR LAB TIMES C c 0 READING IN TAPLE CARDS FOR LECTURE TINES AND BUILDING C TAHLE IN FILE 23 C
L35 = C 1 WR1TE(23$L35,4) JBLK 4 FCRMATC13A1)
035=150 WRITE(23$L35,4) JbLK L35=l DO 5 1=1,24 REAOC1,2) C CDAYSCL,J),L=1,13),J=1,5)
2 FGRNATC6C13A1)) DO 5 J=l,6 WRI TEC 2, 6) CDAYSCL,J),L=1,13),L35
6 FORMATCt CAYS $,13A1,B L35 $,I4) WRITEC23$L35,4) CDAYSCL,J),L=1,13)
5 CONTINUE
C READING IN LAP TIMES AND BUILDING TABLE IN FILE 35 C
L35=151 DO 8 1=1,10 READC1,2) CCD^YS(L,J),L=1,13),J=1,6) CO 8 J=l,6
180 WRI IEC2,6) CDAYSCL,J),L=1,13),L35 WRITEC23$L35,4) CDAYSCL,J ) ,L= 1,13)
8 C C N T I N U E
C STARTS PRINTOUT OF STUDENT SCHEDULES C
305 LCTR=l 306 WRITEC2,3C7) 307 FORNATC IHl ) 310 WRITcC2,311) 311 FORNATC /,^7X,$INDIVIDUAL STUDENT SCHEDULES PRINT OUT$
1,/,29X,$CCUR -S£ LECTURE HRS LECTURE ROOM LAB HRS LAB ROOM— 1-COURSE SCHE -CULED$,/)
C C WRITING 8 STUDENTS/PAGE C
313 DO 365 1=1,7 IFCLCTR-175) 315,315,375
C C READ AJND WRITE GENERAL STUDENT INFORNATION C
315 L15=LCTR READC15tLl5,3 19) NANE , 11, I 2 , I 3 • NC,NC, i«iSEO
319 E0 R '-• M C E A4 , 1 3 , I 2 , I 4 , I 3 , 1 2 , 5 X , 1 3 ) WRITE C 2 , 3 2 6 ) N A ' E , I 1 , I ? , I 3 , rC,NC,NSEC
326 Fr;>?'AT(/,$ ^ , P A^ , 5X , f-SCC . SEC. t, I 3 , t-!., I 2 , -i , I 4 , 5 < , ^ INAJOR $,I3, - 5 X , 1 C L A S S I F I C M I U N $ , I 2 , 5X , $CODE N O . $,I3)
C C READ SCHEDULED COURSES C
L15 = 342 + C 1C*NSEC) CO 364 J=I,5 R E A D C 1 5 to 1 5 , 331) I PROP,I J,JDEP,JCSE,CNPCL),L=1,3),ISTR
1,IEND,J6,K6 331 F 0 R M A T C 2 I 1 , 2 I 4 , 7 I 2 )
L15=L15+1 IFCNPCD) 3 3 2 , 3 3 2 , 3 3 3
332 K=l GO TG 345
C C D E T E R N I N E L E C T U R E PERIODS C
333 DC 335 K2=l,3 K = K2 IFCNPCK)) 335,340,335
3 35 CONTINUE GO 10 345
ji^O K=K-1
C C C
C C C
c c c c
0 c c
c c c
181
UNCODE LECTURE INFORMATION FOR COURSE OUTPUT
34*5 L 3 5 = C K - 1 ) * 4 P + NPC 1 ) R v ^ A 0 C 2 3 $ L 3 5 , 3 A 6 ) C DAYS ( K 1 , 1 ) , K 1 = 1 , 1 3 )
346 F0RNATC13A1)
UNCODE LAB INFORNATION FOR COURSE OUTPUT
IFCISTR) 35C,347,35C 347 ISTR=C
IENC=-1 GO TO 355
350 CALL CODECISTR, lEND) 355 L35=ISTR+15C
READC23$L35,356 ) NST,NDS 356 FORNATCA4,A2 )
L35=1END+151 REACC23$L35,356) NEN,NDE
360 WRITEC2,351) JDFP,JCSE,CDAYSCK1,1),K1=1,13),J6,NST,v^S 1,NEN,M0E,K6, -IJ
351 Fr^NATC5X,14,lX,14, 1CX,$LECTURE $ , 13A1,5X,$RCON $,I2,2 1 X , ? L A D < , A A , -A ? , ^ — $ , A / . ,A2,5X,fR0ON $ , I 2 , 5X , ?;CHO ICE $,I1)
3 64 C C M I N U E 365 LCT'' = LCTR+l
IFCLCTR-175) 306,306,375
STARTS PRINTOUT CF TEACHER SCHEDULES
375 LCTR=l 380 WRITEC2,3C7) 385 WRITEC2,3f6) 386 FORNATC//,47X,$INDIvrCUAL FACULTY SCHEDULES PRINT CUT$
1,/,38X,$C0UR -SE LECTURE HRS LECTURE ROOM LAB HRS LAB RGOM$, 1/) DO 425 KP=1,9
READ GENERAL TEACHER INFORNATION
L25=LCTR RcADC21$L25,391,ERR = 4 50) I DEP,NAME,NTEA
391 FORNATC 13,8A4,25X,13)
READ SCHEDULED CCURSE INFORMATION
393 L25=2CCC+NTFA REAC(2l$L2 5,396 ) CNPCI),CLCHCI,J ) ,J= 1 ,3 ) ,CLBH( I,K),K =
182 llt2), -CIDCI,L),L=1,2) ,1 = 1,3)
396 FCRNATC3C I4,7I2,6X) ) C C WRITE OUT TEACHER IDENTIFICATION C
WRITEC2,394) NANF, I CEP,NTEA 394 FORMATC$ $,1PR0FESS0R $ , 8A4 , 5X,$DEPARTNENT $,I3,5X,$CC
IDF NO. $,I3) C C UNCODING LECTURE AND LAE PERIODS FOR CCURSE OUTPUT C
DO 420 J8=l,3 IFCNPCJ8)) 397,425,397
397 IFCLCHCJ8,1) ) 399,398,399 398 K=l
GO TO 410 39 9 DO 40 0 K2=l,3
K = K2 IFCLCHCJ8,K) ) 4CC,4C5,4C0
4CC CONTINUE CO TO 410
405 K=K-1 410 L35=C CK-D*48)+LCH( J8,l)
READC23$L35,346) (DAYS(K1,I),Kl=l,13) I F C m C JF, I ) ) 412,^14,412
'il2 JON^LeH(Jc,l) JUN = L{'HC Je,2) CALL CODECJUN,JUM) GO TO 4 15
414 JUN^O JUN=-1
415 L35=15C+JUN READC23$L35,356) NST,NDS L35=1514JUN R£AC(23$L35,356) NEN,NDE WRI TEC 2,4 16) NPCJ8) ,CDAYSCK1,1),K1 = 1,13),IDCJ 8,1),NST, 1NDS,NEN,MDE, — TCCJ8 2)
416 FORNATC$ $ , 14,5X,ILFCTURE $,13A1,5X,$RDOM $,I2,5X,$LAB 1 $,A4,A2,$— -$,A4,A2,5X,$R0CN $,I2)
420 CCNTINUE 425 LCTR=LCTR+1
GO TO 380 C r4*******4*************************************************C C STARTS PRINTOUT OF NASTER CLASS SCHEDULE C
A50 WRITEC2,3C7) K0UNT=5
183 L2C=5C1 W R I T E C 2 , 4 5 6 )
456 F O R N A T C / / , 4 6 X , $ N A S T E R C L A S S S C H E D U L E 1 J , / , 1 9 X , $ C L -1STING FOR A GIVEN COURSE — EACH SECTION WITH RESPECT IIVE TEACHER -, STUDENT, TINES, AND ROGMS)$,/)
C C READS AND WRITES COURSE NUMfiER C
4 6 5 R E A C C 2 0 $ L 2 0 , 4 6 6 ) N 1 , N 2 466 F 0 R N A T C 2 I 4 )
I F C N D 4 7 G , 5 7 C , 4 7 0 470 K0UNT=K0UNT+2
IFCK0UNT-5^i ) 4 7 5,475,5 50 475 WRITEC2,476) N1,N2 476 FORMATC/,$ i, $DEPARTM£NT $,14,5X,$CGURSE $,I4)
C C READS SECTICN INFORNATION C
LOOK=C 479 IX=C 485 R!:AD(2GiL2C,486) NTE A , C I LCH C I , L ) , L= 1, 3 ) , C LBH C I , K ) ,K= 1,
12),(ICC I,J), -J=1,6),C1C(I,KD,K1 = 1,2),I = 1,3)
4 86 F0R^^TC14,3(312,2I2,6I3,2I2)) IFCNTEA) ^9G,465,49C
^90 IX=IX+1 IFCIX-3) 4g5,'«95,479
495 IFCICCIX,D) 5CC,490,5CC C C UNCODING LECTURE AND LAB PERIODS FCR OUTPUT C
500 L00K=LG0K+1 IFCLCHCIX,!)) 510,505,510
505 NOT=l GO TO 525
510 DO 515 K2=l,3 NCT=K2 IFCLCHC IX,NOT)) 515,520,515
515 CONTINUE GO TG 525
520 N0T=N0T-1 525 L35=CCNCT-1)*48 )+LCHCIX,1)
READC235L35,346) CDAYSCK1,1 ),K1 = 1,13) IFCL'IHC IX, 1) ) 530,534,530
530 JUN = LEHCIX, 1) JUM=LBHCIX,2) CALL CCD£CJUN,JLM) GO TO 535
534 JUN=0
184 JUM=-l
535 L35=JUN' + 15C REArC23$L35,356) NST,NDS L35=JUN+151 READC23*L35,356 ) \'EN,wrE K 0 U N T = K 0 U N T + 1
IFCKOUNT-54) 545,545,565 WRITEC 2, 5 36) LOOK, NTE A, C DAYS C K 1, 1) , K 1 = 1 , 1 3 ) ,IDC IX,D,N 545 1ST ,NDS,NEN,N -DE,1DCIX,2),CICCIX,K1C),K10=1,6)
36 FCRMATC$ SECTION $, I 3,2X,4TEACHER $, 14,2X,$LECTLRE $,1 13A1,2X,«RC0N
$,2CA4,$-$,A2),2X,$R00M $,I 2,2X,$STUD£NT 13A1,2X,«RC0M - $,I2,2X,$LAB IS $,6CT3,1X) - )
GO TO 490 550 WRTTEC2,3C7)
WRITEC2,456) K0UNT=7 GO TO 47 5
565 WRITEC2,3C7) WRITEC2,456) WRIIEC2,476) N1,N2 KCUNT=e GO TO 545 L3C=1G RLADC1C5L3C, F C ' f A T C I A ) W R I T : C 2 , 5 7 6 ) _ FOR? A T C / / , 2 C X ,
1 P R F B L E N FLA -GGEC IS $,I4) END
570
581
576
I) LEFT
LEFT $ NUNPER RENAINING EITHER UNSCHEDLLED OR
END FCR
10
20 25
28
30 35
TIR F3C SLBROUTINE CODEC1STR,I END) IFCISTR-11) ICC,10,20 ISTR=12 IENC=12 GO TO ICO IFCISTR-19) 25,28,30 ISTR=ISTR+2 IENC=IEND+2 GO TG ICO ISTR=22 IEND=22 GO TO ICO IFCISTR-3C) ISTR=ISTR+4 IENC=IEND+4 GO TO ICO
35,38,40
38 ISTR=35 IEND=35 GO TO ICC
40 IFCISTR-38) 45,^8,SC 45 lSTR=ISTR+6
IENC=I£ND+6 GO TG ICC
48 ISTR=45 IEND = ' 5 GO TG ICO
50 ISTR=ISTR48 IEND=IEND+8
ICO RETURN END
END LOAD LX P18,P18 END GO PIP 730- 830 M - 830- 93C N
IC N 1230- 1 13C- 2 30 M 2 3C- 3 30 M
IC f' 73 G- 9 9C0-1C3C T 1C3C-12CC T
IC T 430- 6 630- 8CC T 73C- 83C w
IC V 113C-12 12 30- 130 W 13C- 2 3C V,
iC t 6 3 0- 8 73C- 9C0 TH 9CG-1C3C TH 1C3C
IC TH 3CC- 4 430- 6CC TH 630- 8CC TH
IC F 1C3C-11 113C-123C F 123C- 13C F
10 F 430- 5 730- 830 NW 830- 93C NW
IC NW 1230- I 130- 230 MW 23C- 330 MW
10 NW 730- 9 900-1030 TTH103C-12CC TTH12CC
IC TTH 430- 6 630- 8C0 TTH 730- 83C WF 830
10 ;NF 113C-12 ' 1230- 130 WF 130- 230 WF 230
10 WF 630- 8
185
93C-1030 N 103C-1130 N 1130-123
330- 430 M
12CC- 130 T
430- 530 M 63C- 80
130- 300 T 3CC- 43
S3C- 930 W 930-1030 W 1030-113
23C- 330 W 33C- 43C W 43C- 53
-12CC TH 1200- 130 TH 130- 30
830- 930 F 93C-1C3
230- 330 F 330- 43
73C- 830 F
130- 230 F
93G-1030 NW 1C3C-1130 NW 113C-123
330- 430 MW 430- 530 MW 630- 80
- 130 TTH 130- 300 TTH 300- 43
- 930 WF 930-1030 WF 1030-113
- 330 WF 330- 430 WF 430- 53
730- 830 MWF 830- 93C MWF 930-1030 MWF103C-1130 MWF1130-123 IC MWF1230- 1 ^
130- 230 MWF 230- 33C MWF 330- 430 MWF 430- 530 MWF 630- 80 10 MWF
186
730
130
8C0
300
830
230
730
430
93C
330 E.\C FIN
N 1 N 1 N 1 T 1 W 1 W 1 TH 1 TH 1 F I F
830 1230 N
230 630 N
730 130 T
430 730 W 930
130 W 33C
8C0 W 9CC
3C0 TT 6CC
830 F 1C 3 0
230 F 430
N
N
T
T
W
w
TH
TH
F
F
930
330
900
600
1030
430
1C3C
630
inc
530
N
M
T
T
W
w
TH
TH
F
F
1030
430
1030
630
1130
530
12CC
800
123C
M
M
T
T
W
W
TH
TH
F
530
12C0
800
1230
630
130
730
13C
M
T
T
W
w
TH
F
F