Activity: The Airport Model with Stations

Discrete-Event Modeling Activities

Author

Manuel D. Rossetti, PhD P.E.

We rebuild the model together: the instructor types the code, and you type along. Before each run, write down a prediction; then run and check it.

The situation. The extended airport checkpoint of the previous activity, with paperwork and X-ray, unchanged. This time we build it with the KSL’s station package, which provides queues, servers, and delays as ready-made stations that send each passenger on to a next receiver.

Setup. Get the starter file AirportStations.kt from the code/ folder beside this activity, and put it in src/main/kotlin/student/activities. It holds the random variables that are not part of a station, and the responses; the stations and the routing, marked TODO, are what we write.

1. Map the model onto stations

  1. Which parts of the previous activity’s model become a SingleQStation, which an ActivityStation, and which stay as code we write? What, if anything, is not a station at all?

  2. In the previous activity, the end-of-inspection event decided where a passenger went next. Where does that decision go now?

2. Code along

  1. TODO 1. We create the arrivals as an EventGenerator and the three stations. Which of the previous activity’s responses do the stations collect for us?

  2. TODO 2. We connect the stations with nextReceiver and write the decision after inspection. Where does a passenger go after paperwork, and how is that written?

3. Run and compare

  1. Before you run, predict: with the same random number streams and the same logic, will the results equal the previous activity’s exactly, closely, or only roughly? Then run and check.

  2. Which version of the model would you rather extend with a third station? Why?