Introduction - If you have any usage issues, please Google them yourself
With a queue to achieve airport takeoff and landing queue. A queue is a linked list structure encapsulates later achieve. Consider a one-minute time forward analog clock, for every minute, generates two random numbers within 0-99: If the first random number is less than landingRate* 100, then a " landing reaches the" will occur and are Add the landing queue if the second random number is less than takeOffRate* 100, then a " Arr" will occur off and added to the queue. Then, check the runway is free. When idle, first check whether the non-empty queue landing, if so, to allow the first aircraft landing Otherwise, the process takeoff q