Home [ Intro | Images | Simulator | Synopses | Links | Books | Glossary ]

Understanding The Computer Program (PSim)

On this page:
How the Program Works
[ Introduction | Data | Program Walk-through ]
Data Format
[ Stations | Plays ]

How the Program Works


During the University of Toronto graduate course she was teaching in the summer of 1993, "The York Cycle and Its Context," Professor Alexandra Johnston passed out slips of paper, on which were written play titles and numbers indicating how long each play was. Chairs were arranged in a circle and the slips of paper were passed out. The first person stood in front of the first chair, and counted aloud in order to represent the length of the first play. When the first person finished, and moved on to the second chair, the second person began at the first chair. The chairs, of course, represented the stations; we students were the pageant wagons.

Only after that labor-intensive event, about a third of the way into this graduate-level course, when I heard everybody counting aloud simultaneously and saw the big gaps that resulted when faster plays ran on ahead of slower ones, did I finally "get" what the whole processional was about. That classroom experience wasn't entirely accurate -- not until halfway through the demonstration did one student communicate to the rest of us the idea that when she was finished counting off the numbers for her play, she could clear her station to make room for the person behind her by getting in line behind the person ahead of her (see discussion of Nelson's 3 (b) condition, above). Yet another problem was that there were only 12 of us -- and in the York production there would have frequently been more than 12 pageant wagons bunched up between the first station and the last station.

PSim improves upon the "musical chairs" approach. The math involved is quite simple -- any spreadsheet program would allow the user to make the calculations and modify the data easily. However, PSim allows the user to present the information visually, in a manner suitable for helping neophytes grasp the processional concept easily.

I based my computer program on Margaret Rogerson's 1974 study, and tested my program by using her estimates for individual run-times and comparing my results to hers. Her paper-and-pencil results are the same as my computer-generated results, which leads me to conclude that my programming technique is accurate. The following description (which pertains mostly to the stand-alone PSim 1.0, not to the internet-deliverable version -- although both share the same operating principles) will hopefully demystify the program's inner workings and allow non-computer experts to examine (and to suggest improvements to) the programming method. 


I began by using a color scanner to zoom in on Speed's inset map of the walled city of York (Arlot, John, ed.John Speed's England, vol. 4. London: Phoenix House, 1953.) and convert it into a digital image.

A data structure which I named "Play" represents one of the individual plays which make up the cycle. A "Play" comprises the following variables:

Another data structure named "Station" represents each station. Each "Station" includes the following data: Still another structure named "PSimApp" (for PSim Application) models the whole cycle. It contains the following variables: The user can select one of several pre-determined configurations. These pre-determined configurations are stored as files; using any word processor that can save and load in the DOS text format, the user can easily modify the data [note: the internet complicates the file transfer procedure; for the time being, then, the Java version only allows the user to chose from among several preset files]. See Data Format (below) for an explanation of sample data files.

Program Walk-through

The following walk-through describes how the computer program models the pageant, as Rogerson modified its ground rules from Nelson's "free advance" method.

When the simulation begins, before the first performance has begun at the first station, the plays are all invisibly "BACKED_UP_AT" the first station. All the performance stations are labeled "EMPTY," the clock is set to display either the simulated time of day or to record the lapsed time, and the computer enters an instruction loop that will continue until the total performance has ended.

The computer begins the loop by checking the status of the first play in its list. In this case, the first play is ready to move into the first station. The computer then checks to see whether the first station is empty. Since at this stage it will be empty, a message is sent to the first play informing it to begin its performance at the first Station. For the purposes of this simulation, we will assume that the first play can begin at the first station immediately (with no travel time from the "greenroom" area at Toft Green). Its status is set to "RUNNING_AT." As long as the play performs, a label bearing the title of the first play (e.g. "Creation 1") appears on the map next to the station, and a dot appears at the appropriate station. Once having launched the first play, the computer then checks the status of the second play. It and all the other plays are all "BACKED_UP_AT" the first station. Because the first station is by now "OCCUPIED," nothing further happens as the program continues checking the status of each play. Finished with its first run-through of all the plays, the program advances the clock time by one user-definable unit (perhaps five seconds), updates the clock (if necessary), and then returns to the beginning of its instruction loop.

The clock advances minute by minute on the screen until enough time has passed for the first play to end. If, after the last five-second advance, the program determines that the play should have finished three seconds ago, those three orphan seconds are subtracted from the time required for whatever event the play will perform next -- either "DOWNTIME_AT" the current station (if such time is required) or for "MOVING_TO" the next one. As soon as the program determines that the first play has cleared the station, the station's status returns to "EMPTY." The label bearing the play's title and the large dot disappear. A small dot, representing a moving wagon, begins to move from the first station to the next station. The computer then instructs the second play to begin performing at the first station.

When the first play reaches the second station, the program confirms that the second station is "EMPTY," and instructs the first play to begin performing again. When play 2 finishes performing at the first station, play 3 moves into place, and play 2 begins its journey to the second station. If play 2 arrives at the second station before play 1 has cleared it, the status of the second play is set to "BACKED_UP_AT" the second station. New plays join the procession as space opens up in the first station. When play 1 finally clears the final station, the program labels that play "DONE," and the loop continues until all plays are "DONE." Vintage computers with sluggish graphics chips may slow down noticeably when many wagons are moving at once. The varying time required to update the graphics has no effect on the numerical results of the simulation, however. 

Data Format

As with the program itself, the nature of the data has changed slightly for the Java version, but the data meet the same needs. This section illustrates the data utilized by the non-Java version.

Sample data file for stations

     0.16, 0.82, 0:00, 5;
     0.23, 0.75, 3:00, 7;
     0.30, 0.73, 2:00, 8;
     0.39, 0.72, 2:00, 3;
     0.56, 0.59, 5:00, 7;
     0.51, 0.52, 2:00, 7;
     0.43, 0.39, 3:00, 7;
     0.38, 0.33, 5:00, 7;
     0.44, 0.21, 3:00, 7;
     0.51, 0.07, 4:00, 3;
     0.64, 0.19, 4:00, 3;
     0.69, 0.45, 5:00, 3;

The first number in each line represents a value for the X coordinate, with 0 being all the way to the left and 1 being all the way to the right. The second number represents the Y coordinate with 0 at the top and 1 at the bottom. The third number, in minutes and seconds, represents travel time from the previous station to the present station. Note that the first station has a travel time of 0:00. The last number instructs the program where to place the label bearing the title of the play when a play is performing at a station, according to the following pattern:

Sample data file for plays

     1, "CREATION/LUCIFER", 12:15, 0:00; 
     4, "EDEN", 4:30, 0:00; 
     5, "FALL OF MAN", 7:45, 0:00; 
     6, "EXPULSION", 7:40, 0:00; 
     7, "CAIN & ABEL", 18:30, 0:00; 
     10, "ABRAHAM & ISAAC", 18:45, 0:00; 
     12, "ANNUNC. IVISIT.", 17:30, 0:00; 
     13, "JOSEPH'S TROUBLE", 15:40, 0:00; 
     16, "MAGI & HEROD", 21:20, 0:00; 
     20, "INNOCENTS", 14:30, 0:00; 
     21, "CHRIST/DOCTORS", 15:25, 0:00; 
     22, "BAPTISM", 10:20, 0:00; 
     24, "TEMPTATION", 15:00, 0:00; 
     25, "TRANSFIGURATION", 14:00, 0:00; 
     27, "WOMAN/LAZARUS", 14:15, 0:00; 
     29, "JERUSALEM ENTRY", 23:30, 0:00; 
     30, "CONSPIRACY", 16:45, 0:00; 
     31, "LAST SUPPER", 13:55, 0:00; 
     33, "AGONY & BETRAYAL", 18:10, 0:00; 
     34, "PETER/CAIAPHAS", 21:15, 0:00;
     35, "PILATE 1/WIFE", 28:50, 0:00; 
     36, "TRIAL BY HEROD", 31:15, 0:00; 
     39, "PILATE 2/CONDEMN", 32:25, 0:00; 
     43, "CRUCIFIXION", 15:30, 0:00; 
     45, "DEATH OF CHRIST", 23:45, 0:00; 
     46, "HARROWING OF HELL", 22:00, 0:00; 
     47, "RESURRECTION", 21:30, 0:00; 
     49, "ROAD TO EMMAUS", 9:20, 0:00; 
     52, "PENTECOST", 10:10, 0:00; 
     53, "DEATH OF MARY", 14:25, 0:00; 
     55, "ASSUMPTION/THOMAS", 22:40, 0:00; 
     57, "JUDGMENT DAY", 25:15, 0:00; 
This is the data file for the listing of plays from the 1535 listing, using the times taken from the University of Toronto production. The first number is the index taken from table 5, pages 22-23. The title of the play (20 characters or less) appears in quotation marks. The run time, in minutes and seconds, and the down time (including both set-up and break-down times -- set to zero in this example) follow.