124k views
1 vote
In this assignment, we continue with the parking-simulator theme established in Assignments 1 and 2. Our goal in Assignment 3 (A3) is as follows: knowing a priori the car arrival rate and how long cars stay in the lot, we would like to determine the minimum number of spots that the parking lot should have to avoid excessive queue buildup at the entrance. What we do in A3 represents a real-world application for simulation: when a real parking lot is being designed, an informed decision needs to be made about how many spots are needed. If there are too few spots, the parking lot will be overwhelmed; in our simulation, such a situation manifests itself as an unacceptably large queue buildup at the parking entrance. Just as having too few spots is problematic, having too many is problematic too! If the capacity of the parking lot exceeds demand by a large margin, the lot will be under-utilized. If this happens, the operational costs of the lot may exceed the revenue that the lot generates, potentially making the lot financially unviable. Finding a balance between supply and demand is therefore essential.

What we aim to calculate in A3 is "just the right number of spots", given an hourly car arrival rate and the probability distribution for how long a car stays parked once it has entered the lot. For simplicity, like in A2, we assume that the probability distribution for departures is fixed. The code that you develop in A3 therefore has only one user-defined parameter: the hourly car arrival rate. Provided with this parameter, your implementation should simulate the parking lot for different numbers of spots and determine the lowest number of spots that meets demand (we discuss what we mean by "meeting demand" a bit later).
Like in A2, a simulation run spans 24 (simulated) hours. However, in contrast to A2, we need to run the simulation numerous times rather than just once. Specifically, we need to progressively try larger numbers of spots 1,2,..., all the way to the number of spots that would meet demand. For example, suppose we set the hourly rate to 3 cars per hour. To determine how large our lot should be for this level of demand, we start by simulating a lot that has only one spot, then a lot that has only two spots, then a lot that has only three spots, and so on. Let us assume that, through this process, we determine that our lot needs 15 spots to meet demand. This means that we will have simulated the parking lot 15 times, each time for 24 (simulated) hours.
The question that now arises is whether we can trust a single simulation run? For example, if we run the simulation only once with 15 spots and somehow we see that there is no queue buildup at the entrance, can we have reasonable confidence that 15 spots would be sufficient? The answer is No! Why? Because our simulation is probabilistic. Like in every probabilistic process, we need to mitigate random variation, that is, the chances of being too lucky or too unlucky in a single run. And, how do we mitigate random variation? By repeating the simulation process several times. A common strategy is to have 10 repetitions and consider the average results. Going back to our example in the previous paragraph, to account for random variation, we need to run the simulation 10 times for a lot that has one spot, 10 times for a lot that has two spots, and so on. This means that we will have simulated the parking lot 150 times (as opposed to merely 15 times) in the scenario described earlier where we found 15 spots would meet demand.
In A3, what we want to obtain from an individual simulation run is the number of cars left in the entrance queue after 24 (simulated) hours. To accept a number of spots as meeting demand, we repeat for 10 times the simulation with it spots. If the average queue size (across 10 runs) is below a given threshold, we can be reasonably confident that having spots is sufficient. For this assignment, we define "meeting demand" as yielding an average entrance queue length of ≤ 5 across 10 simulation runs. In other words, if we repeat the simulation with n spots for 10____

User DJhon
by
7.9k points

1 Answer

4 votes

Final answer:

The question involves using simulations based on probability distributions to determine the minimum required parking lot capacity, ensuring queue lengths remain below a specified threshold through multiple simulation iterations.

Step-by-step explanation:

The subject matter presented in the question deals with probabilistic simulations as applied to a parking lot capacity scenario. The task involves using a given car arrival rate to simulate various parking lot sizes and determining the optimal number of spots by limiting the average queue length to a maximum threshold. To ensure reliability of the simulation results and account for random variation, multiple iterations of the simulation are required.

  1. First, simulate the parking scenario with an incrementally increasing number of spots, starting from one.
  2. For each number of spots, repeat the simulation 10 times to average out the randomness and get a stable result.
  3. If the average queue after 24 hours in 10 simulations is less than or equal to 5 cars, the current number of spots is considered adequate.

The information provided uses probability distributions such as normal, uniform, and exponential to model various aspects of the parking and arrival process, highlighting the importance of understanding these concepts in simulation studies.

User Michael Welburn
by
8.2k points