schdutil allows you to schedule a student or reschedule a students requests. It requires that all users have 'schdutil.i DEFINE' and that the module who instantiated schdutil cleans up with 'schdutil.i CLEAN_UP'.
DEFINE {NEW}
Defines the context of schdutil. The 'NEW' instantiates a new instance
of the schdutil toolset. If you do a 'DEFINE NEW', you must have code
to call 'CLEAN_UP' as well.
CLEAN_UP
Deallocates storage and releases shared resources when use of the
schdutil tools is complete. You must call this before your code
ends or you will leave a great deal of resources commited.
SET SCHOOL_YEAR yearid
Associate a school year that we'll be using for scheduling. This must
be done before anything else is.
SET STUDENT stuseq
Associates a student to be scheduled. 'stuseq' is a student to be
processed for the most recently set school year. Any previous
data about students is cleared out.
SET ADD_DROP_DATE date
Sets the passed 'date' as the effective date for all scheduled course
adds and drops. If you do not use this service, the effective date
used will be the system date.
SET SORT_REQUESTS_BY order
Indicates which way requests should be sorted when determining the order
to process them in. 'order' can be 'REQUEST_PRIORITY' or 'FEWEST_SECTIONS'
to control which requests are tried first. The default is 'REQUEST_PRIORITY'.
SET RETAIN_MANUAL_SCHD flag
Indictes whether manually entered schedule requests should be dropped
before the student is scheduled or left alone. 'flag' is TRUE to cause
the manually schedulled courses to remain, FALSE to cause all courses
to be dropped before scheuduling. The default is FALSE.
SET PURGE_DROPPED_SCHD flag
Indicates whether the scheduler should purge (delete) any courses which
have been marked 'dropped' after completing the scheduling run. TRUE
indicates the dropped courses should be deleted while FALSE indicates
they should be retained. When scheduling the district, you generally want
to purge unneeded, dropped schedules. When scheduling individuals (especially
in the school year), you don't want to purge the entries as you'd loose the
audit trail for things like the Add/Drop lists.
SET OVERRIDE_SEAT_LIMITS flag
Indicates whether the scheduler should pay attention to seat limits
or not. If 'flag' is passed TRUE, seat limits are ignored and students
will be scheduled based on time conflicts only. If 'flag' is FALSE,
then the scheduler will consider seat limits as a reason to not use
a given section of a course. The default is FALSE (seat limits are
enforced).
SET ENABLE_ALTERNATES flag
Indicates whether the scheduler should support trying to use alternate
courses for a request when the originally requested course can't
be scheduled. If 'flag' is passed TRUE, then alternates are enabled,
when needed. If passed FALSE, then alternates are not enabled and
if the original course for a request cannot be scheduled, the request
is considered failed. The default is TRUE (alternates are enabled).
SET ENABLE_BALANCING flag
Indicates whether the scheduler should pay attention to the balance
options in the master schedule when making decisions about what
sections a student should get. If 'flag' is TRUE, then the grade,
sex, age and retake balancing options are enabled for sections that
have them. If FALSE, then balancing options are ignored and seat
counts are used as the deciding factor. The default is TRUE.
SET MAX_TRIES #maxtries
Indicates the maximum number of times the scheduler will retry a
failed request before giving up on a student. The default is 30000.
SET BULK_SCHD_COMMIT flag
Indicates whether the bulk schedule commit logic should be used or not. By
default, this option is disabled and schedules are committed normally,
one course at a time. If enabled, schedules are committed in bulk,
without actually updating the statistics in the master schedule. Then,
after the bulk commit is complete, the master schedule statistics are
completely rebuilt.
When processing more than a few students at a time, enabled the bulk commit may save upto 1/2 the time it takes to commit as compared to leaving bulk commit disabled. However, for a single student scheduling run, the additional time to rebuild the master schedule statistics isn't worth it.
GET TRY_COUNT count
Return the number of tries that were made for the last scheduled student.
GET REQUEST_COUNT count
Return the number of requests processed for the last scheduled student.
GET SCHD_REQUEST_COUNT count
Return the number of schedule requests for the last scheduled student.
GET REQUEST_STATUS req# req-seq schdflag status tries altrntflag
Return the final status of a given request. 'req#' is the number of the request (from 1 to the number returned by 'REQUEST_COUNT').
'req-seq' is the 'request-seq' value of the request. This can be used to lookup the request in the stu-request file and extract the course or other info.
'schdflag' is a LOGICAL set TRUE if this request was scheduled.
'status' is a CHARACTER variable with the requests status code.
'tries' is the number of scheduler attempts made on behalf of this request.
'altrnteflag' is a LOGICAL set TRUE if the request was fufilled by a request/course/group alternate.
GET TIMED_OUT_FLAG flag
Return 'flag' as TRUE if the last scheduling attempt timed out or
FALSE if it didn't.
GET CLOSED_INFO courses sections
Returns the number of courses and sections closed as a result of the
last scheduling attempt.
PRELOAD_BLDG bldgbuff courses
This call, while optional, will pre-load all the courses and related
data for a given building. 'bldgbuff' is a buffer of the building
to load. 'courses' is an integer passed back with the number of
courses loaded.
REBUILD_SCHD_STATS bldgbuff
This services will quickly zero all master schedule statistics out
and then rebuild them from the currently existing student schedules. You should
not normally need to call this service, though it is generally harmless.
UNSCHEDULE
This will cause either all scheduled courses for a student to be
dropped or just the computer scheduled courses (as last set by the
'SET RETAIN_MANUAL_SCHD' call. This is used mostly when deapply an
entire scheduling run before starting a new one. When scheduling an
individual student, all courses (subject to retaining manually schedule
courses per above) are dropped anyway, so this does not need to be done
for single-student schedule runs (won't hurt, but it's waster time).
SCHEDULE
Attempts to schedule a student. The students requests are loaded as
set by 'SET REQUEST_TO_SCHD' and the results are written back to
the students record. You can check on the success of the scheduling
attempt using some of the 'GET xxxx' services.
COMMIT_SCHEDULES [interactive-flag]
Writes the cached schedule entries to the database. Until this is
done, the results of the entire scheduling process are 'ephemeral'. If
you do not commit the schedules, then it will be as if nothing ever
happened.
If the optional 'interactive-flag' is passed set to TRUE, a status message regarding the process of the commit procedure will be displayed and periodically updated at lines 15 through 17 on the screen. This is a %age of the commit process completed. The message is automatically hidden when the commit process is complete.
REPORT SCHEDULE_RESULTS_BY_GRADE writeProc writeProcHandle
This will produce a report of the scheduling result up to the time of the call,
broken down by grade. The report includes the number of requests, the number of
students, the success of the requests and students and info on how the scheduler
processed problems during the run.
'writeProc' is an internal procedure that accepts a single CHARACTER INPUT parameter and will write the parameter to the log file. After the procedure writes the data in the passed parameter, it must advance to the next line. 'writeProcHandle' is the handle to the procedure the internal procedure described by 'writeProc' is in.