码迷,mamicode.com
首页 > 编程语言 > 详细

电梯调度算法——思考题

时间:2015-11-20 20:04:35      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:

Final Project

We encourage you to simulate a lift system with 100 stops (100 floors). We assume every customer takes 1 second to enter the lift and 1 second to leave. The lift’s occupation space is 13 people with no weight limit. It takes 10 seconds for the lift to travel between two nearby floors without discrimination for going up or going down. An input file will be given to you which simulates the coming customer randomly. Here is a DEMO inputs:

 

Customer ID

Coming time

Age

Source floor

Destination floor

Leaving time

21

123

65

2

9

 

2

16

45

80

5

 

4

382

14

1

99

 

 

The customer coming time is not sorted, so you need to sort them first. Also one rule need to be noted is that for those customer whose “age” larger than 60, they will get the highest privilege to enter and leave the lift without waiting in the queue. We encourage you to use different data structures at different floors. The sorting algorithm will be appointed to use during the free time. The output will be a file similar to the input file with calculated/simulated leaving time filled in (to the last column).

Question:

1.Class design

2.Relationship of classes

3.Algorithm of lift scheduling

Good luck.

 

 

电梯调度算法——思考题

标签:

原文地址:http://blog.csdn.net/laoduan_78/article/details/49949133

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!