# Goal: Write a Python program to implement an airport take-offldeparture simulator Proiect: Consider the following tables...

###### Question:

Goal: Write a Python program to implement an airport take-offldeparture simulator Proiect: Consider the following tables which contain, for each airline, a queue of flights boarded and ready to take-off from BWI. Airline Flight  Destination Gate  American 127 American 322 American 233 American 742 American 112 American 437 DCA BUF 10 12 13 14 15 CAE LGA Airline Flight  1 Destination Gate  Delta 221 SFO DET CVG SAN 20 21 Delta 348 Delta 765 Delta 612 23 24 Delta 148 Airline Flight  Destination Gate  Southwest 345 Southwest65 Southwest 211 Southwes 324 Southwest 367 Southwest 311 Southwest 375 LGA PHL BOS SFO SAN 40 41 42 43 45 Tables of Departing Flights from BWI for American, Delta and Southwest Airlines
From the above three queues (one for each airline), flights will be added to a separate runway queue as aircraft exit their gates and enter a single runway according to the following schedule 1. Every 2 seconds, generate a random number,'x', to decide which flight will be added to the runway queue a. If 0x33, add the next flight from the American Airlines queue b. If .33 <x.67, add the next flight from the Delta queue c. If .67 <= x <= 1, add the next flight from the Southwest queue d. Output a message stating which flight was added to the runway queue e. Make sure you include the possibility of an empty queue as follows i. Once an airline gate queue is empty, decide between the remaining two airlines 1. If 0 <-x <-.5, add the next flight from remaining airline 1 2. If .5 x 1, add the next flight from remaining airline 2 2. Every 4 seconds, generate a random number 'y' to testor a takeoff a. If 0y.5, a flight takes off from the runway queue b. If .5 < y <-1, an arriving flight is landing, no takeoff is allowed and the runway queue must wait another 4 seconds c. Output a message stating which flight took off or must wait d. Output a table containing the current queue of flights waiting at each airline gate e. Output a list of all flights currently in the runway queue f. Output a message when all flights have taken off. 3. After each takeoff test (i.e. every 4 seconds), generate a random number, 'z', to test for a flight cancellation a. If 0 <=z .1, remove a flight from the American queue using randint' b. If.50 z60, remove a flight from the Delta queue using 'randint c. If .80 <= z <= .90, remove a flight in the Southwest queue using randint' d. Output a message stating which flight was cancelled e. Make sure you include the possibility of an empty airline queue(i.e. if an airline queue is empty, there is no need to cancel a flight)
All four queues (American, Delta, Southwest and the runway) MUST be implemented using a linked list . You may work individually or in groups of two students if desired . Your program must be well-organized and well-documented. Your program must work and you must demonstrate project completion by including program output of a run of your simulation. Project Grading System: 10% program comments and documentation 20% program organization 70% working program output o The following commands may prove useful: import random import time import random library import time library random.random0 generate a uniform random number between 0 and 1 random.randint(1,n) generate a random integer between 1 and n time.sleep(seconds) temporarily stop program execution filename "filename.txt" filehandle-open (filename, "w") open a file for simulation output file is kept open until simulation terminates filehandle.write(text on line 1in" filehandle.write('text on line 2n) filehandle.close) close the file after simulation terminates when #no more output is required

#### Similar Solved Questions

##### The 3.0-kg collar is released from rest at A and slides down the inclined fixed rod...
The 3.0-kg collar is released from rest at A and slides down the inclined fixed rod in the vertical plane. The coefficient of kinetic friction is 0.42. Calculate (a) the velocity v of the collar as it strikes the spring and (b) the maximum deflection x of the spring 3.0 kg 0.55 m 0.42 54 k- 3.2 kN/m...
##### 5. Calculate the y coordinate of the centroid the hatched area shown. 10 cm 10 cm...
5. Calculate the y coordinate of the centroid the hatched area shown. 10 cm 10 cm 16 cm 6 cm 6 20 cm...
##### Events A and B are mutually exclusiv probability 0.33. e. Suppose event A occurs with probability....
Events A and B are mutually exclusiv probability 0.33. e. Suppose event A occurs with probability. 0.61 and event B occurs with a. Compute the probability that A does not occur or B does not occur b. Compute the probability that either A occurs without B occurring or A and B both occur....
##### The A-frame is being hoisted into an upright position by the vertical force of F-80 lb....
The A-frame is being hoisted into an upright position by the vertical force of F-80 lb. Determine the moment of this force about the y axis passing through points A and B when the frame is in the position shown. 52 6 ft 309 6 ft...
##### 1. [30 points) Let y be maximum bench press and x be the number of 60-pound...
1. [30 points) Let y be maximum bench press and x be the number of 60-pound bench presses for 65 athletes. The prediction equation is û = 60.2+1.53x. The sum of squared error equals 4212.9. (a) (15 points) Find the standard error of û when x = 11 (the mean of the x-value). (b) (5 points]...
##### For which of the following substances is the standard free energy of formation not equal to...
For which of the following substances is the standard free energy of formation not equal to zero at 298 K.? A) Cr(s) B)Kr(g) C)Ce(s) D)Na(g) E)O2(g)...