next up previous contents
Next: Calibration Up: Model Implementation Previous: Scheduler.

Sequence of Events

Figure [*] presents the flow of the simulation in pseudocode. The listing of the actual code used for the simulation is presented in appendix C.2. The simulation is represented as a series of discrete events. An outline of the various steps that the simulation follows is presented here:

1.
Initialize parameters of simulation: Set kind of day (weekend/holiday or weekday) and initial tidal condition.
2.
Create and initialize scheduler: An empty schedule is created which will be filled in step 3.

3.
Poll each boat for trip itineraries: In a loop that tests every boat in the simulation, test if the boat is going to embark. If it embarks, find the boat's trip time and destination. Write boat, time of departure, length of trip, origin, and destination to a trip itinerary report.

4.
Insert trip itinerary of each boat into schedule: Write each boat itinerary report to a file. Sort this file by trip times to produce a list of trips in order of execution.

5.
Find trip paths: For each trip in the itinerary, find the path that the boat takes from its origin to its destination.

6.
Cartographic representation of paths: Write the paths to a map showing simulated boat activity for the time period. The cartographic output presents a summary of the simulated boat activity for the time period in question. (Analysis of the simulated output will provide insights into the best way to monitor recreational boat traffic.)

Two parts of this sequence warrant some further discussion at this point.

In item 3, polling a boat to see whether it embarks is conducted in two steps: 1), assigning a probability of embarkation, and 2) drawing a random number to see if embarkation occurs. Assignation of embarkation probabilities is done through fitting a continuous probability function to empirical embarkation data (see section 4.3 for details), and using the inverse transformation method to draw a random sample from that distribution.[*] Assignation of destinations is done by determining a list of possible destinations from empirical data (see section 4.3 and appendix A for details) and using the table-lookup method to assign a specific destination.[*] Both of these methods are described in standard mathematical handbooks and textbooks; the forms used here are as described in Råde and Westergren (1995).

In item 6, a raster-based GIS is used to determine the path taken by each boat in the schedule created in step 3. The details of the least-cost path procedure used to determine these paths can be found in section 4.3.4.


next up previous contents
Next: Calibration Up: Model Implementation Previous: Scheduler.
Paul Box
3/11/1998