文件名称:airport
-
所属分类:
- 标签属性:
- 上传时间:2013-07-25
-
文件大小:181.08kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
【问题描述】假设机场有一条跑道,每架飞机需花费一定时间着陆,花费一定时间起飞,飞机的起降满足一定的概率。一般来讲,机场存在两个队列,一个等待着陆的飞机队列和一个等待起飞的飞机队列,同样等待时间下,等待着陆的飞机比准备起飞的飞机具有更高的优先级。试编写程序模拟这个机场的运行。
【基本要求】使用队列或优先队列实现;要求可以变换起飞和着陆频率来模拟一天中的飞行高峰期和空闲期;要求可以改变着陆和起飞时间以模拟不同的效果。
【实现提示】可以假设有一个每次前进一分钟的模拟时钟,对于每一分钟,产生两个随机数:如果第一个随机数小于landingRate/60,那么一个“着陆到达”将发生并被添加到着陆队列中;如果第二个随机数小于takeOffRate/60,那么一个“起飞到达”将发生并被添加到起飞队列中。接着,检查跑道是否空闲。若空闲,首先检查着陆队列是否为非空,如果是,允许第一架飞机着陆;否则,处理起飞队列。
-Descr iption of the problem the assumption that the airport has one runway, each aircraft landing takes a certain period of time, take some time to take off, taking off and landing of aircraft to meet a certain probability. Generally speaking, the airport there are two queues, a queue waiting for the aircraft landing, and a waiting for takeoff the aircraft queue, the same wait time, waiting for the landing of the aircraft has a higher priority than the aircraft ready to take off. Try to write a program to simulate the operation of the airport.
Requirements】 queue or priority queue implementation requirements can transform the frequency of take-off and landing day to simulate the flight peak periods and the idle period requirements can change the landing and take-off time in order to simulate different effects.
[Tip] can be assumed to have an analog clock forward one minute at a time, every minute, resulting in two random numbers: If the first random number is less than landingRate/6
【基本要求】使用队列或优先队列实现;要求可以变换起飞和着陆频率来模拟一天中的飞行高峰期和空闲期;要求可以改变着陆和起飞时间以模拟不同的效果。
【实现提示】可以假设有一个每次前进一分钟的模拟时钟,对于每一分钟,产生两个随机数:如果第一个随机数小于landingRate/60,那么一个“着陆到达”将发生并被添加到着陆队列中;如果第二个随机数小于takeOffRate/60,那么一个“起飞到达”将发生并被添加到起飞队列中。接着,检查跑道是否空闲。若空闲,首先检查着陆队列是否为非空,如果是,允许第一架飞机着陆;否则,处理起飞队列。
-Descr iption of the problem the assumption that the airport has one runway, each aircraft landing takes a certain period of time, take some time to take off, taking off and landing of aircraft to meet a certain probability. Generally speaking, the airport there are two queues, a queue waiting for the aircraft landing, and a waiting for takeoff the aircraft queue, the same wait time, waiting for the landing of the aircraft has a higher priority than the aircraft ready to take off. Try to write a program to simulate the operation of the airport.
Requirements】 queue or priority queue implementation requirements can transform the frequency of take-off and landing day to simulate the flight peak periods and the idle period requirements can change the landing and take-off time in order to simulate different effects.
[Tip] can be assumed to have an analog clock forward one minute at a time, every minute, resulting in two random numbers: If the first random number is less than landingRate/6
(系统自动生成,下载前可以参看下载内容)
下载文件列表
airport/airport.cpp
airport/数据结构大型实验报告—机场航空管制模拟.doc
airport
airport/数据结构大型实验报告—机场航空管制模拟.doc
airport
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.