Sie sind auf Seite 1von 12

In the name of Allah most marciful and banificient

Group members: Waseem sajjad Abdul wahhab Department of Electronics

Airport Simulation

This problem is to simulate an airport landing and takeoff pattern. The airport has 3 runways, runway1, runway 2, and runway 3. There are 4 landing holding patterns, two for each of the first two runways. Arriving planes will enter one of the holding pattern queues, where the queues are to be as close to the same size as possible.

When a plane enters a holding queue, it is given an integer id and an integer representing the number of time units that the plane can remain in the queue before it must land (because of low fuel level). There is also a queue of takeoffs for each of the three runways. Planes arriving at an output queue are also assigned an integer id.

At each time, 0-3 planes may arrive at the landing queue and 0-3 planes may arrive at the takeoff queues. Each arriving plane has from 0 to 20 time untis of fuel remaining. Each runway can handle one takeoff or landing at each time slot. Runway 3 is to be used for takeoffs, except when a plane is low on fuel. At each time unit, planes in any landing queue whose remaining air time (fuel level) has reached 0 must be given priority over other takeoffs and landings. If one one plane is in this category, Runway 3 is to be used. If more than one, then the other runways are also used (at each time at most 3 planes can be handled in this way).

Use successive even (odd) numbers for id's of planes arriving at takeoff (landing) queues. At each time unit assume that arriving planes are entered into queues before takeoff or landing occur. Try to design your algorithm so that neither takeoff or landing queues grow excessively. However arriving planes must be placed at the end of queues.

The output should clearly indicate what occurs at each time unit. Periodically output (a) then contents of each queue, (b) the average takeoff waiting time, (c) the average landing waiting time, (d) the average flying time remaining on landing, and (e) the number of planes landing with no fuel reserve. (b) and (c) are for planes that have taken off and landed respectively. Use a random number generator to generate the inputs.

((((((((((((((((((((((( ))))))))))))))))))))))))))))))))))) ((((((((((((((((((((( NeW Time ))))))))))))))))))))))))))))))))) ((((((((((((((((((( ))))))))))))))))))))))))))))))))))) The unit time: 66 The number of plane crashed : 15 The number of plane Landed : 35 The number of plane takeoff : 0 ------------------------------ Landing Queue ----------------------------- The number of arriving planes are .... 2 The is insersted 1259 The is insersted 1261

((((((((((((((((((((( NeW Time ))))))))))))))))))))))))))))))))) ((((((((((((((((((( ))))))))))))))))))))))))))))))))))) The unit time: 66 The number of plane crashed : 15 The number of plane Landed : 35 The number of plane takeoff : 0 ------------------------------ Landing Queue -----------------------------The number of arriving planes are .... 2 The is insersted 1259 The is insersted 1261 Runway - Plane ID --- Fuel --- Arrival Time --- Landing Time unit 1 1255 --- 1 -- 62 --- 67

1 1259 --- 22 -- 66 --- 71 2 1253 --- 55 -- 61 --- 66 2 1257 --- 26 -- 63 --- 68 2 1261 --- 56 -- 67 --- 72 ----------------------------------------------------------------------------------------------------------- Take Off ------------------------------The Number of New Planes for Takeoff Queue ....... 0 Runway - Plane ID --- Fuel --- Arrival Time --- TakeoffTime unit 11 1258 --- 50 -- 64 --- 69 11 1260 --- 4 -- 64 --- 69 -----------------------------------------------------------------------------The Plane ID is Landed 1255 The Plane ID is Landed 1253 The Plane ID is Landed 1257 The plane ID is crashed: 1260

Thank you

Das könnte Ihnen auch gefallen