weekly homework solution 13.2, Assignments of Engineering Analysis

weekly homework solution 13.2 weekly homework solution 13.2 weekly homework solution 13.2

Typology: Assignments

2022/2023

Uploaded on 04/28/2023

tianyi-zhu
tianyi-zhu 🇺🇸

5 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Question 13.2
In this problem, you can simulate a simplified airport security system at a busy airport. Passengers arrive
according to a Poisson distribution with λ1 = 5 per minute (i.e., mean interarrival rate
1 = 0.2 minutes) to
the ID/boarding-pass check queue, where there are several servers who each have exponential service
time with mean rate
2 = 0.75 minutes. [Hint: model them as one block that has more than one
resource.] After that, the passengers are assigned to the shortest of the several personal-check queues,
where they go through the personal scanner (time is uniformly distributed between 0.5 minutes and 1
minute).
Use the Arena software (PC users) or Python with SimPy (PC or Mac users) to build a simulation of the
system, and then vary the number of ID/boarding-pass checkers and personal-check queues to determine
how many are needed to keep average wait times below 15 minutes. [If you’re using SimPy, or if you
have access to a non-student version of Arena, you can use λ1 = 50 to simulate a busier airport.]
Here’s one possible solution. Please note that a good solution doesn’t have to try all of the possibilities
in the code; they’re shown to help you learn, but they’re not necessary.
These solutions show both an ARENA model and a SimPy model; I suggest you look at both, just to get
familiar with the two of them.
ARENA VERSION
The file solution 13.2.doe contains the ARENA model for this problem. In the picture below:
(1) A “Create” block is used to model passenger arrivals to the system; they’re created as entities
that will go through the security system.
(2) From the passenger arrival block, they go to the ID and boarding pass check – because it’s a
queue, it’s a “Process” block. The line above the block is the queue where passengers wait until
it’s their turn if it’s animated.
(3) After the ID and boarding pass check, passengers go to the rhombus-shaped “Decide” block,
where they identify the scanner with the shortest queue, and go there.
(4) The four scanner “Process” blocks are queues, like the ID and boarding pass check.
(5) After finishing at a scanner, passengers leave the system. That’s a “Dispose” block; it tells the
system that it can dispose of the entity so it doesn’t need to track it anymore. (That’s especially
important if you have the student or trial version of Arena that can only handle 150 entities at a
time.)
pf3
pf4
pf5
pf8

Partial preview of the text

Download weekly homework solution 13.2 and more Assignments Engineering Analysis in PDF only on Docsity!

Question 13. In this problem, you can simulate a simplified airport security system at a busy airport. Passengers arrive according to a Poisson distribution with λ 1 = 5 per minute (i.e., mean interarrival rate1 = 0.2 minutes) to the ID/boarding-pass check queue, where there are several servers who each have exponential service time with mean rate2 = 0.75 minutes. [Hint: model them as one block that has more than one resource.] After that, the passengers are assigned to the shortest of the several personal-check queues, where they go through the personal scanner (time is uniformly distributed between 0.5 minutes and 1 minute). Use the Arena software (PC users) or Python with SimPy (PC or Mac users) to build a simulation of the system, and then vary the number of ID/boarding-pass checkers and personal-check queues to determine how many are needed to keep average wait times below 15 minutes. [If you’re using SimPy, or if you have access to a non-student version of Arena, you can use λ 1 = 50 to simulate a busier airport.] Here’s one possible solution. Please note that a good solution doesn’t have to try all of the possibilities in the code; they’re shown to help you learn, but they’re not necessary. These solutions show both an ARENA model and a SimPy model; I suggest you look at both, just to get familiar with the two of them. ARENA VERSION The file solution 13.2.doe contains the ARENA model for this problem. In the picture below: (1) A “Create” block is used to model passenger arrivals to the system; they’re created as entities that will go through the security system. (2) From the passenger arrival block, they go to the ID and boarding pass check – because it’s a queue, it’s a “Process” block. The line above the block is the queue where passengers wait until it’s their turn if it’s animated. (3) After the ID and boarding pass check, passengers go to the rhombus-shaped “Decide” block, where they identify the scanner with the shortest queue, and go there. (4) The four scanner “Process” blocks are queues, like the ID and boarding pass check. (5) After finishing at a scanner, passengers leave the system. That’s a “Dispose” block; it tells the system that it can dispose of the entity so it doesn’t need to track it anymore. (That’s especially important if you have the student or trial version of Arena that can only handle 150 entities at a time.)

Below, we’ll go through each step in more detail. (1) Passengers arrive at the airport according to a Poisson distribution with rate 5 persons/minute. The interarrival time is thus 0.2 minutes. To simulate these arrivals, we can use a Create block in Arena (found under Basic Process) to create entities. In this model, the entities will be simulated people; for other models they can be other things – for example, phone calls if simulating a call center. Here is the Create block dialog box: In the box, we can set the name of the block, the type of arrivals (Exponential, with interarrival time 0.2 minutes), and that there’s just 1 entity created at a time – if we had a more-complex simulation, we could model families arriving together, but we won’t do that here. (2) The first step entities undergo after arriving at the airport is to get in line and get their boarding passes checked. There are multiple personnel (resources) doing the checking. For each

(3) After the boarding pass checking station, the passengers proceed to the scanners. There are several scanners for the passengers to choose from. Each passenger will prefer to go to the scanner with the shortest queue. To represent this decision in Arena, we use the Decide block in Arena and add IF THEN conditions in it. One example condition is – If the length of queue 2 is less than the minimum length of the queues 1,3,4 and 5, then the passenger goes to queue 2. As we are making a decision with multiple outcomes, this is an “N-way by Condition”. (4) Once the decision is made, the passenger goes to one of the scanners. Scanning time is uniformly distributed with a minimum of 0.5 minutes and maximum of 1 minute. In Arena, this is again defined in a Process block with a single resource (there is only 1 scanner in each line) with a Uniform delay type. Once again, the action is Seize Delay Release as only one passenger can use a scanner at a time.

(5) Once these processes are carried out, passengers leave for their respective flights. In the simulation, this means passengers exit the system. Thus, for this we use a Dispose block in Arena that removes the entities from the system and also keeps a count of the entities that exited. After the process flow is set up, we specify for how long we want to run our simulation and how many times we want to run the simulation (we should always run simulations multiple times to account for randomness). In Arena, this can be done by selecting Setup.. in the Run dropdown menu at the top. In our model, we chose 100 replications. Next, we decide how long each replication is. In this case, we run the model for 12 hours each replication. If you’re watching it run, you’ll notice that it takes a long time. That’s because the animation slows it down a lot. Watching the animation is very useful to make sure the model is doing what you want it to, but for running 100 replications of 12 hours each, even for a small simulation like this, it can really be slow. So, you can turn the animation off: go to Run…Run Control…Batch Run (No Animation) to run it quickly, without watching the animation. Once all replications have run, we can look at the result reports. These can be found under the Reports section on the left, below basic processes. For our current problem, we only want to evaluate our wait times. To look at the wait times for all the replications, go to the Category Overview Report. To look at the wait times per replication, we can look at the Entities Report or the Queues Report.

But so what? Once the model is built, we need to use it to determine how many scanners and how many boarding- pass checkers are required. To do that, we can vary the numbers in the simulation, run each, and see what the results are. There’s also a shortcut, in this case. With an average of 5 arrivals per minute, we need enough capacity to check at least 5 boarding passes per minute, and to scan at least 5 passengers per minute. If 1 boarding-pass checker takes 0.75 minutes/person (or 4 people every 3 minutes), having 3 isn’t enough – they could only process 4 passengers/minute. [You can verify this by running with a resource capacity of 3; you’ll find that the queue at the boarding pass check gets bigger and bigger, and if you have a student/trial version the simulation will eventually stop and tell you that it has more than 150 entities in the system.] So we need at least 4 boarding-pass checkers, which is 16/3 people per minute, slightly more than 5. The calculation is the same for scanners: each scanner takes an average of 0.75 minutes/person, so again we need at least 4. So, a first attempt could be 4 boarding-pass checkers and 4 scanners. Here are the results, with 100 replications: Average wait time in queue: 3.76 minutes Average total time through system: 5.25 minutes But… do we have enough replications to be sure the average is really less than 15 minutes? We’ll see how to test whether the median is less than 15 minutes later in the course, but for now we can verify in a different way. Out of 100 replications, the highest average wait time was 13.5 minutes, less than 15. So it’s very likely that the average wait time is less than 15 minutes (think about this binomial trials, with 0 “successes” [average wait time over 15 minutes] in 100 trials). For total time in the system (wait time and processing time), just 1 of the 100 replications had an average over 15 minutes. So, the solution seems to be that we need 4 boarding-pass checkers and 4 scanners. By the way, you can try adding more checkers and/or more scanners, but in this case it doesn’t have much effect. Because this is such a simple system, the basic calculation works well. SimPy VERSION The file solution 13.2.py shows a SimPy model for this system. As you can see, there’s much more coding rather than Arena’s drag-and-drop^1. (^1) Historical note: back when I first learned simulation in college, we didn’t have the nice drag-and-drop Arena interface; instead, we used a simulation programming language called SIMAN. SIMAN is still around, in the background in Arena; if you want to see what the SIMAN code looks like, you can open solution 13.2.doe in Arena and go to Run…SIMAN…View.

The analysis is pretty much the same, though. Once the model is built, we need to use it to determine how many scanners and how many boarding-pass checkers are required. To do that, we can vary the numbers in the simulation, run each, and see what the results are. There’s also a shortcut, in this case. With an average of 5 arrivals per minute, we need enough capacity to check at least 5 boarding passes per minute, and to scan at least 5 passengers per minute. If 1 boarding-pass checker takes 0.75 minutes/person (or 4 people every 3 minutes), having 3 isn’t enough – they could only process 4 passengers/minute. [You can verify this by running with a resource capacity of 3; you’ll find that the wait times get very large, because the queues get longer and longer.] So we need at least 4 boarding-pass checkers, which is 16/3 people per minute, slightly more than 5. Here are the average wait times for different numbers of boarding pass checkers and scanners: Boarding-pass checkers Scanners Avg wait time

replications

over 15 min avg wait time Avg system time

replications

over 15 min avg system time 3 3 78.79 100 80.30 100 3 4 73.30 100 74.80 100 4 3 72.30 100 73.80 100 4 4 3.92 0 5.42 0 4 5 2.92 0 4.42 0 5 4 3.38 0 1.88 0 5 5 0.79 0 2.29 0 As we saw above, it looks like we need 4 boarding-pass checkers and 4 scanners; passengers will need to wait on average about 4 minutes. If we add a 5th^ of each, passengers will wait on average less than 1 minute. This question used a passenger arrival rate of 5 passengers/minute. But what if the arrival rate was an order of magnitude bigger, like the busy times at a very busy airport? The student/trial versions of Arena can’t handle that – the model might have more than 150 entities at a time, beyond the student/trial version limits (the full version of Arena would have no problem). But SimPy can do it. Here’s the average wait time (across 100 replications) for each combination of boarding-pass checkers and scanners between 35 and 40: AVERAGE WAIT TIME (MINUTES) Number of scanners 35 36 37 38 39 40 Number of boarding- pass checkers

Based on these runs, it looks like 37 boarding-pass checkers and 37 scanners is sufficient to get average waiting time below 15 minutes (all the way down to 8 minutes). The code for this is in the file solution 13.2-50.py.