文件名称:ElevatorSimulation
介绍说明--下载内容来自于网络,使用问题请自行百度
模拟程序包含一个时钟(Clock),初始值设为零,每秒钟自增1秒。模拟程序还包含一个调度器(Scheduler),它通过随机设置两个时间开始每一天:第一个时间是一个人首次走到1层,并按下楼层按钮召唤电梯时间,第二个时间是一个人首次走到2层,并按下按钮召唤电梯时间。每个时间都是随机数在5~20之间。电梯每天在1层关门等待。
假设电梯和楼层载客量为1。调度器先查实一个楼层未被占据,然后创建一个人,让其走进相应的层。假如楼层已被占据,调度器将推迟1秒创建人。人走进电梯后,调度器将创建下一个随机时间。
电梯抵达一个楼层时将重置电梯按钮,并让电梯铃响。然后电梯向楼层发出抵达信号。作为响应,楼层重置楼层按钮,并显示电梯已到达指定楼层的灯。然后电梯开门。随后,电梯中的乘客离开电梯,正在等电梯的人进入电梯。尽管每个楼层只能容纳一个人,但我们假定每一层都有人等待,同时有人离开电梯。
一个人进入电梯后,按下电梯按钮,指示灯变亮。另外,等电梯到达另一楼,并重置电梯按钮后,等就会熄灭。接着电梯关门,开始一项另一层。电梯到达另一层后,假如没有人进入电梯,而且另一个楼层上的楼层按钮没有按下,就关门等待,直到楼层按钮被按下。
-The simulation program including a clock (Clock), the initial value is set to zero, the second self-energizing one second. The simulation program also includes a scheduler (Scheduler), it is set by random two time begin each day: the first time is a person come to a layer for the first time, and press the floor button calls the elevator time, the second time is a person for the first time come to layer 2, and press the button to summon the elevator time. Each time a random number is between 5 to 20. Elevator every day in a layer of closed waiting for.
Assumptions elevators and floors patronage. The scheduler first found a floor unoccupied and then create a allowed into the corresponding layer. If the floors have been occupied, the scheduler will be delayed one second founder. The man walked into the elevator, the scheduler will create a random time.
Will reset the elevator button elevator arrived in a floor and let the elevator bell rang. The eleva
假设电梯和楼层载客量为1。调度器先查实一个楼层未被占据,然后创建一个人,让其走进相应的层。假如楼层已被占据,调度器将推迟1秒创建人。人走进电梯后,调度器将创建下一个随机时间。
电梯抵达一个楼层时将重置电梯按钮,并让电梯铃响。然后电梯向楼层发出抵达信号。作为响应,楼层重置楼层按钮,并显示电梯已到达指定楼层的灯。然后电梯开门。随后,电梯中的乘客离开电梯,正在等电梯的人进入电梯。尽管每个楼层只能容纳一个人,但我们假定每一层都有人等待,同时有人离开电梯。
一个人进入电梯后,按下电梯按钮,指示灯变亮。另外,等电梯到达另一楼,并重置电梯按钮后,等就会熄灭。接着电梯关门,开始一项另一层。电梯到达另一层后,假如没有人进入电梯,而且另一个楼层上的楼层按钮没有按下,就关门等待,直到楼层按钮被按下。
-The simulation program including a clock (Clock), the initial value is set to zero, the second self-energizing one second. The simulation program also includes a scheduler (Scheduler), it is set by random two time begin each day: the first time is a person come to a layer for the first time, and press the floor button calls the elevator time, the second time is a person for the first time come to layer 2, and press the button to summon the elevator time. Each time a random number is between 5 to 20. Elevator every day in a layer of closed waiting for.
Assumptions elevators and floors patronage. The scheduler first found a floor unoccupied and then create a allowed into the corresponding layer. If the floors have been occupied, the scheduler will be delayed one second founder. The man walked into the elevator, the scheduler will create a random time.
Will reset the elevator button elevator arrived in a floor and let the elevator bell rang. The eleva
(系统自动生成,下载前可以参看下载内容)
下载文件列表
ElevatorSimulation.docx
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.