ElevatorAction

 

Intro

 

ElevatorAction is a Java-Applet designed for simulating a House with its Elevators and Passengers. The Project was created for a IT lecture called Object-orientated-Programming.    

 

A bank of lifts is a physical system whose behaviour can greatly affect the day-to-day lives of many individuals. If it is possible to model this behaviour, the provision of a simulation that can be used to examine the effects of different scheduling policies becomes feasible. This applet describes a prototype that was developed to demonstrate that such a simulation can be created.


The program is a simulation of a bank of lifts containing a number of variables what the user can specify. The user can choose the number of lifts, the number of floors and the traffic in the house. The routing policy consists of 2 main procedures, liftsearch and addfloor. Liftsearch searches the best lift for the calling man at the moment and afterwards addfloor insert the floornumber in the right queue at the right position there. Then a move function let the elevator travel to the floors saved in the queues.

 

The Liftsearch function:

Calling the best elevator is a difficult problem. Especially when there are more than 2 elevators. A good elevator steering can deliver a lot of people very fast.

4 cases can happen in a elevator system:

Case 1:

           This is the fastest way a elevator can arrive. The direction of the person is the same as the direction from the elevator and the elevator is on the way to you.


 

Case 4:

           The Opposite of case1 is case4 and is the worst case. This time elevator and the person has the same direction, but the elevator has already passed the floor of the person. So it will take until the elevator will return with the same direction again

 

Case 2:

          

In this case the elevator can be exptected soon, because it travels currently in the opposite way, but will return soon with the right direction. 
 

 

Case 3:

          

This is similar to case2, except that the elevator hasnt arrived the person´s floor. So it will take a little bit longer, than case2.

 

 

 

 

If a passsenger calls a elevator, the liftsearch function will check all this cases for all elevators. The one with the best case (lowest number) will be choosen to server that floor. Of course you can imagine a situation where an elevator with worse case number arrives earlier. In that situation a person would normally enter the first elevator.


 
The elevator itself is controlled by a queueing algorithm with an up- and a downqueue. Once surfing a floor stored in one of the queues, it will travel each floor of the this queue until its empty. Then it will switch to the other. Meanwhile the inactive queue can be filled with new foor requests.

A big problem in this algorithms is that a request for an elevator in a floor with a lot more people than a lift can serve, the remaining persons have to call another one. In real life this is done by waiting until the full elevator is away and then pressing the button for the wished direction. Normally a new elevator will come. So there is an additional function in that applet that finds such situations and let calls a new lift after a while. There must be a waiting time elsewhere the elevator wouldnt come away from this floor.


 
 
 
 

The Simulation don´t show the best solution for the transportation of Passengers. For small houses it shows a good Performance, but the programmed method isnt effective with skyscrapers with more than 30 floors and 6 elevators. Nevertheless you have the option to build a house with so many Elevators and Floors you want.
 


Manual:

First of all on the left frame you have 4 buttons and 2 list boxes. The 3 buttons from the top show informations on this applet like this manual. The 4. button creates the applet on the right frame of the html page. The 2 list boxes beneath let you control the size of the applet depend of the amount of floors (left listbox) and amount of elevators (right box).

A detailed manual can be found under the applet.
 
 

Now to the applet itself:

The applet offers you various preferences of traffic generation.Traffic generation means the amount and distribution of the upcoming people.

The simpliest way is to click one of the Move in oder Move out buttons. This will spawn either a few people in the first floor with the target anywhere in the upper floors (for Move In) or a small group of people in each floor except the first with target to the first (Move out). This is only for creating fast a large amount of traffic.

The button "Rock da House" is for more realistitc traffic distribution. Its default values are max 40 people in the house in the same time and a delay of 5. If you want to alter this values you have to click the update button to take the new values in effect. And now "rock da house".
 

Finally the objects floors, elevtrs and Create/Rebuild doing the same as the list boxes on the left frame except that they dont rescale the applet. So for large values the whole house will be greater than the shown area.