Question: Overview: This assignment requires you to simulate a bank queue system Using c + + where customers arrive at random intervals and are served by
Overview:
This assignment requires you to simulate a bank queue system Using c where customers arrive at random intervals and are served by bank tellers. Unlike uniform service times, this simulation introduces variability in service durations based on predefined probabilities. Your primary objectives are to compute the average waiting time for customers, identify the number of customers who endure any waiting, and determine the average idle time of the tellers
Objectives:
Average Customer Waiting Time: Calculate the average time customers spend waiting in the queue before being served.
Count of Waiting Customers: Determine the total number of customers who experience any waiting time.
Average Teller Idle Time: Calculate the average time that tellers spend without serving, indicating periods of inactivity.
Detailed Requirements
Customer Arrival Times: Customers should arrive at the bank based on a uniform distribution between to minutes.
Service Times with Probabilities:
minutes service time with a probability of
minutes service time with a probability of
minutes service time with a probability of
Simulation Scope: The simulation should cover the arrival and service of customers.
Simulation Steps
Initialization:
Prepare your simulation environment, setting initial conditions including the simulation clock, customer queue, and teller status busy or idle
Simulating Arrivals:
Generate customer arrivals using a uniform distribution for interarrival times to minutes
Assigning Service Times:
For each customer, assign service times based on the defined probabilities for minutes, for minutes, and for minutes
Processing Customers:
For each arriving customer, determine if they can be served immediately or must wait in the queue.
Calculate the service start time, end time, and waiting time for each customer.
Update the simulation clock and teller status accordingly.
Metrics Calculation:
Average Waiting Time: Total waiting time divided by the number of customers.
Count of Waiting Customers: Total number of customers who had to wait.
Average Teller Idle Time: Total idle time divided by the duration of the simulation or the number of idle periods.
Implementation Guidance
Choose an appropriate programming language that supports random number generation and basic statistical operations eg C
Use loops and conditionals to manage the simulation flow and to implement the logic for service time selection based on probabilities.
Maintain counters and accumulators for calculating the required metrics.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
