cs293 elevators simulation demonstration
TRANSCRIPT
-
8/12/2019 CS293 Elevators Simulation Demonstration
1/16
SimulatingElevators
Ankush Das
Nivvedan
This presentation is a part of the CS293 course
project demonstration
-
8/12/2019 CS293 Elevators Simulation Demonstration
2/16
Simulationis the imitation of some real thing available, stateof affairs, or process. The act of simulating somethinggenerally entails representing certain key characteristics orbehaviours of a selected physical or abstract system.
- Wikipedias definition (Dont worry if you didnt get it! We didnt either :P)
To find something about a real system, you can use asimulation. To simulate is to let things play themselves out
and your job is to just stand there and observe whatever you
wanted to! Easy enough, Right?
So, What is a Simulation?
-
8/12/2019 CS293 Elevators Simulation Demonstration
3/16
FOR THE USER, YEAH!!
Simulation is a lazy mans alternative to actually gettinginto the nitty-gritties of mathematical analysis of asystem.
Granted that it wont give you an equation for yourcharacteristic of interest, but it sure will give younumbersnumbers that you can analyse and makesense of.
Its not just the lazy people! Simulations can be used toverify theories too and are in fact used all the time!!
-
8/12/2019 CS293 Elevators Simulation Demonstration
4/16
WHOLE DIFFERENT STORY FOR A
PROGRAMMER!
Imitating real life is probably the hardest thing for aprogrammer to do! (Ironical, right?)
I bet every programmer who has attempted to
simulate a reasonably complicated system will agree
on that. (And, yes. Elevators qualify as reasonably
complicated)
-
8/12/2019 CS293 Elevators Simulation Demonstration
5/16
Why the hell would anyone ever want tosimulate Elevators?
Could be used by building planners to determine the number ofelevators required for a building based on requirements such asthe number of floors, flow of people and the waiting timerequirements.
As an interesting studyIntellectual Curiosity
Just for the heck of it!
-
8/12/2019 CS293 Elevators Simulation Demonstration
6/16
Taken the case of a building with M floors and N elevators.
Users arrive at random times at random floors, wanting to
go to random floors. (Too random, huh? :P)
Two buttons to call an elevator on each floor (Except on
the Ground and the top floors)One Up and one Down.
Assumed a constant elevator speed and implemented an
elevator scheduling algorithm (Our own!Thats what
makes this a bit more challenging than other simulations.
The simulator also had an algorithm to implement.)
We try to play things out based on the input parameters
including inter-arrival times, elevator speed, etc..
What we have done
-
8/12/2019 CS293 Elevators Simulation Demonstration
7/16
What we give you
Just Numbers for you to
crunch!
Were sorry to disappoint you but
theres not going to fancy, flashyvisuals or any elevators actuallymoving around.
If anyone of you is AWESOME invisual designs, please contact one ofus immediately!
-
8/12/2019 CS293 Elevators Simulation Demonstration
8/16
BUT THERES A BEAUTY IN THEM
AND SO IS A LOT OF INFORMATIONWe can customize the simulator for a variety of
inputs:
Number of Floors in the building
Number of Elevators in the building
Number of Successful departures to Simulate
MaximumMinimum of the inter-arrival times
Speed of the elevator
Whether the users can be assumed to know that the
UP button is to go up (Youd be surprised to know
how many dont! We call this the Sane factor :D)
-
8/12/2019 CS293 Elevators Simulation Demonstration
9/16
-
8/12/2019 CS293 Elevators Simulation Demonstration
10/16
NOW FOR THEDEMONSTRATION
-
8/12/2019 CS293 Elevators Simulation Demonstration
11/16
Design of the Program
Real Objects Elevator
Customer
Elevator System
Abstract Classes Object
Event
Task Timer
Event Buffer
The Simulator
The Simulator follows a complete Object oriented
design and has the following objects, both real and
abstract interacting with each other
-
8/12/2019 CS293 Elevators Simulation Demonstration
12/16
FLOW OF PROGRAM
SimulatorThe
Master of all
other Objects
Event Buffer
Elevator System
All the Elevators
Customer
-
8/12/2019 CS293 Elevators Simulation Demonstration
13/16
-
8/12/2019 CS293 Elevators Simulation Demonstration
14/16
THE ELEVATOR SCHEDULING
ALGORITHM
This is kept under consideration when adding
tasks to the task list Once this is done, the time calculated to perform
this task is calculated for each elevator.
The minimum of all these times are taken, and
then, this particular task is given to the elevator
corresponding to the minimum time.
-
8/12/2019 CS293 Elevators Simulation Demonstration
15/16
WORK DISTRIBUTION
Ankush
Broadly responsible for - Algorithmic part of the program and
Maintaining the performance metrics.
Nivvedan
Broadly responsible for - Program Design, Class Structures, Flow of
Control in the program and other ascpects
Lines of code contributedApproximately 1300 lines of code each.Work distribution was also roughly 50% as we worked together forthe better part of the project.
-
8/12/2019 CS293 Elevators Simulation Demonstration
16/16
AND THANK YOU!