I need to write a Python program that simulates the queuing and service of bank customers. The program should read the number of tellers, process customer data from an input file (a2-sample.txt), and manage a queue where customers are prioritized by both their arrival times and priority levels. The simulation must run three times with different numbers of tellers (1, 2, and 4) and output statistics for each run, including the number of customers served, total simulation time, average service and waiting times, maximum and average queue lengths, and the idle rate of each teller.
The issue I'm facing is calculating the total simulation time when the number of tellers increases. With 1 teller, the output is correct at 1282.57. However, for 2 tellers, the expected output should be 653.311, and for 4 tellers, it should be 531.161. My current output is showing discrepancies with these values, and I need help diagnosing and resolving this problem.
The code: https://paste.pythondiscord.com/TJCA
The text file (data): https://paste.pythondiscord.com/CUFA
How the text file is interpreted: arrival time, service time, and priority (1 for low, 2 for normal, 3 for high)