A schedule is simply an ordered set of closed, non-overlapping intervals.
Each interval is represented by two endpoints,
[a_i, b_i]called the left and right endpoints respectively.
Because the intervals are ordered, it is always true that
a_i < b_i -Because the intervals do not overlap, it is always true that
b_i < a_(i+1)The following collections of intervals are all schedules.
[1, 2] [3.14, 3.14159] [1.D5, 1.D6] [-4, 4] [7, 7.000000000001], [7.000000000002, 8] [1.1, 1.1] [2.2, 3.3] [17.17, 19.19]Note that an interval may contain a single point. Such an interval is called a `singleton interval' and has length zero.
The points of a schedule that are not endpoints of one of its intervals are called the schedules interior points. Singleton intervals contain no interior points.
Although a schedule can contain intervals of any kind, PERCY uses them to
keep track of intervals of time. In particular, a single schedule typically
contains intervals during which some combination of constraints is satisfied.
The various FIND commands, for instance, create schedules containing
intervals during which certain geometric constraints are met. These schedules
are then changed and combined with other schedules, each operation resulting
in the creation of a new schedule, until the final set of intervals reflects
some combination of constraints.
This strategy offers two main benefits.
Schedule names may be upto 32 characters in length. This gives you a lot of
room to make up meaningful names for schedules. However, sometimes schedules
require more description than can be deduced from a name. In such cases, you
may attach up to 800 characters of text to a schedule. This text is called
the schedule's annotation. All find commands attach default annotation to a
schedule as do most unary and binary operations. However, if you wish to
attach more meaningful annotation you may do so with the ANNOTATE command.
The annotation of a schedule is stored and restored along with the intervals
of the schedule whenever you EXPORT or IMPORT a schedule to or from disk.
You can define up to 50 schedules at one time. Schedules can contain up to
10000 intervals. (A single schedule is large enough to hold severa Each has a
name, which is assigned to the schedule at the time it is created.
Because the number of schedules is limited, and because the number of schedules used grows quickly as a session wears on, it is usually prudent to remove schedules (using the FORGET command) as soon as they are no longer needed. In particular, temporary schedules created by a procedure should be dropped by the procedure.
You must give a name to every schedule that you create. There is also a
default schedule, which has no name and which contains a single interval,
called the `default interval'.
This default interval is used by the schedule COMPLEMENT command, and defines the default search interval for the various FIND commands. You may change the bounds of the default interval with the SET BOUNDS command.
Occasionally, the execution of a schedule command may result in more
intervals than will fit within the space provided for a schedule. This
condition is called a schedule overflow. When a schedule overflow occurs, the
results of the search are lost and cannot be recovered.
The schedule management commands assist you in keeping track of the schedules
that you create and use during your Percy sessions.
Schedule management commands do not affect the intervals in schedules; use the schedule manipulation commands (described in the following section) to do that. The complete set of schedule management commands is summarized below.
Each schedule manipulation command changes the intervals contained in an
existing schedule in some systematic way in order to create a new schedule.
All of the commands have the form:
LET name = <expression>where the ''expression'' indicates the operation to be performed and the operand(s) of that operation.
The commands come in two flavors: unary and binary.
Unary commands operate on the intervals contained in a single schedule,
called the input schedule.
Binary commands combine the intervals in two separate input schedules to form
a third schedule.
The syntax of every unary command looks like
LET @name = @name <operator> [arguments]The first word is always LET followed by the name of the schedule that will be the result of the operation. The name of the result is followed by the equal sign `=' and the name of the schedule is to be manipulated---the operand. Unless the command is a simple assignment the operation follows the operand together with any arguments needed to complete the operation specification. to be performed: COMPLEMENT, CONTRACT, and so on.
The operand must exist before the command is executed. The result schedule may already exist, in which case it is overwritten; otherwise it is created by the command.
The result of the command is always created in a temporary schedule, which is copied to the output schedule after the operation has been completed successfully. Thus, the output schedule may overwrite the input schedule, as in the following example.
LET TEST = TEST FILL 30 seconds;The result of this operation will be the schedule TEST with gaps of 30 or fewer seconds filled in.
The syntax of every binary command looks like
LET @name = @name <operator> @nameAs with unary operations, the first word is always LET followed by the name of t schedule that will be the result of the operation and an equal sign. This introductory phrase is followed by the names of the two schedules to be combined separated by the operation used to combine them.
The allowed operators are: UNION, INTERSECT, DIFFERENCE, SIFT INSIDE, SIFT THROU the abbreviations `+', `*', `-', `<', `<=', `>' respectively.
Both input schedules must exist before the command is executed. The output schedule may already exist, in which case it is overwritten; otherwise it is created by the command.
The output schedule may overwrite either of the input schedules, as in the following examples.
LET GOOD = BETTER + GOOD; LET GOOD = GOOD + BEST;
Some of the schedule manipulation commands are redundant. For example, the
CONTRACT and SHIFT operations can be implemented by judicious choice of
inputs to the EXPAND command. In these cases, the extra commands are provided
because their names are more straightforward.
The description of each command is illustrated by a graphical description of
the operation performed by the command, similar to the one shown below.
Input schedule : --- --------- --------- - Input schedule : - ----- ----- ----- Output schedule : - --- --------- ---------- -----Adjacent dashed lines are considered to be continuous intervals. The example above illustrates the union of two schedules, each of which contains four intervals. The resulting schedule contains five intervals.