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 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:
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.
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
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.