Object Oriented design for Elevator in a multi-storied apartment
Below is the design for an elevator in a multi-storied building.
A typical lift has buttons(Elevator buttons) inside the cabin to let the user who got in the lift to select his/her desired floor.Similarly each floor has buttons (Floor buttons) to summon the lift to go floors above and floor below respectively. The buttons illuminate indicating the request is accepted. And the lift reaches the requested floor the button stops illuminating.
Use cases:
User
Floor Button/Elevator Button
Button is abstract class defining common behavior like illuminate, doNotIlluminate. FloorButton, ElevatorButton extend Button type and define placeRequest() which is invoked when the button is pressed. Both the floor button presses and elevator button presses adds requests at a common place.
ElevatorController runs the show by reading the next request to process and instructing the elevator what to do.
How can we extend this to multiple elevators in a sky scraper
In the single elevator scenario, there is an elevator and an elevator controller and a common area where the floor requests and the elevator button request are stored and processed as per the scheduling algorithm.
To extend this to multiple elevators, each elevator will have a corresponding elevator controller. Floor based requests can be served by any elevator where as elevator button requests will be served by the elevator in which the button is pressed.
FloorButton's placeRequest adds a request to the common area which is accessible to all controller. ElevatorButton's placeRequest adds a request to the controller's internal queue as only one elevator is supposed to serve it.
Each elevator controller runs as a separate thread and checks on if it can process a floor request along with processing requests made by its own elevator button presses.
Below is the design for an elevator in a multi-storied building.
A typical lift has buttons(Elevator buttons) inside the cabin to let the user who got in the lift to select his/her desired floor.Similarly each floor has buttons (Floor buttons) to summon the lift to go floors above and floor below respectively. The buttons illuminate indicating the request is accepted. And the lift reaches the requested floor the button stops illuminating.
Use cases:
User
- presses the floor button to summon the lift
- presses the elevator button to make the lift move to the desired floor
Floor Button/Elevator Button
- illuminates when pressed
- places a elevator request when pressed
Elevator
- Moves up/down as per instruction
- Opens/closes the door
Each button press results in an elevator request which has to be served. Each of these requests is tracked at a global place. ElevatorRequests, the class which stores elevator requests can use different strategies to schedule the elevator requests. The elevator is controlled by a controller class which we call ElevatorController. The elevator controller instructs the elevator what to do and also can shutdown/start up the elevator of the building. The elevator controller reads the next elevator request to be processed and serves it.
Button is abstract class defining common behavior like illuminate, doNotIlluminate. FloorButton, ElevatorButton extend Button type and define placeRequest() which is invoked when the button is pressed. Both the floor button presses and elevator button presses adds requests at a common place.
ElevatorController runs the show by reading the next request to process and instructing the elevator what to do.
How can we extend this to multiple elevators in a sky scraper
In the single elevator scenario, there is an elevator and an elevator controller and a common area where the floor requests and the elevator button request are stored and processed as per the scheduling algorithm.
To extend this to multiple elevators, each elevator will have a corresponding elevator controller. Floor based requests can be served by any elevator where as elevator button requests will be served by the elevator in which the button is pressed.
FloorButton's placeRequest adds a request to the common area which is accessible to all controller. ElevatorButton's placeRequest adds a request to the controller's internal queue as only one elevator is supposed to serve it.
Each elevator controller runs as a separate thread and checks on if it can process a floor request along with processing requests made by its own elevator button presses.
Good summary. Have one question: for multiple elevators scenario, where the common queue and internal queue should be added?
ReplyDeleteI thought the common queue is added in ElevatorRequest, and the internal queue is added in controller for each elevator.
DeleteNice schemes and idea, you should try to do some innovations in lift configurator
ReplyDeletevery nice and useful blog.
ReplyDeleteHome Lifts in Chennai
Residential Lifts in Chennai
I am glad to find amazing information from the blog. Thanks for sharing the information.
ReplyDeleteHydraulic Goods Lift Manufacturers in Bangalore | Goods Lift Manufacturers in Bangalore
lift buttonsWe provide the best lift buttons maintenance & manufacturing service in China. We are famous manufacturers, offering quality and cheap elevator panel parts.
ReplyDeleteThis is really nice to read content of this blog.
ReplyDeleteWe ate manufactures and suppliers Lift manufacturer company in Delhi NCR.
http://www.spaceelevators.org
mcafee.com/activate registered trademarks, company names, product names and brand names are the property of their respective owners, and mcafee.com/activate disclaims any ownership in such third-party marks. The use of any third party trademarks, logos, or brand names is for informational purposes only, and does not imply an endorsement by mfmcafee.com or vice versa or that such trademark owner has authorized mfmcafee.com to promote its products or services.
ReplyDeleteoffice.com/setup is an independent support and service provider for the most secure remote technical services for all Office products. Our independent support services offer an instant support for all software related errors in the devices, laptops, desktops and peripherals. We have no link or affiliation with any of the brand or third-party company as we independently offer support service for all the product errors you face while using the Office. If your product is under warranty, then you may also avail our support services for free from manufacturer’s official website office.com/setup.
mcafee.com/activate is an independent support and service provider for the most secure remote technical services for all norton products. Our independent support services offer an instant support for all software related errors in the devices, laptops, desktops and peripherals. We have no link or affiliation with any of the brand or third-party company as we independently offer support service for all the product errors you face while using the norton. If your product is under warranty, then you may also avail our support services for free from manufacturer’s official website norton.com/setup.
Awesome post. It was so informative and keep sharing. You organise it very well. Home lifts India
ReplyDeleteCivil Lab Equipment Manufacturer is the leading Manufacturer, Supplier and Exporter of Civil Engineering Lab Equipments or instruments. Established in 2005.
ReplyDeleteMob: +91-9891445495, +91-8448366515, +918587026175
Phone : +91-11-23657121
Website : http://setestindia.com, http://civillabequipmentmanufacturer.com/
Nice thoughts. Keep Sharing. Home lifts in India
ReplyDeleteNice Post. Thanks for sharing.
ReplyDeleteLift manufacturers in chennai
Home lift manufacturers in chennai
Hospital lift manufacturers in chennai
Automatic lift manufacturers in chennai
Hydraulic lift manufacturers in chennai
Are you tired of taking hundreds of stairs every day to reach your office or apartment? Do you want to install high-quality Automatic lifts Pakistan? Are you looking for different kinds of lifts at one reliable place? Well, then you have landed at the right place. Our company has been working for years to supply top-quality and reliable Home elevators in Pakistan.
ReplyDeleteCivil Lab Equipment Manufacturer offer a comprehensive range of oil and petroleum testing lab equipments, which are widely used in Schools, Colleges and
ReplyDeleteUniversities. We offer a wide range of Civil Engineering Lab Equipments Manufacturers and Civil Engineering Lab Equipments Exporters in India.
Website : http://civillabequipmentmanufacturer.com, http://www.setestindia.com
Mob: +91-9891445495, +91-8448366515, +91-8587026175
This is such a great resource that you are providing and you it away for free. I love seeing blog that understand the value.
ReplyDeleteLifts Installation & Modification Services in Ghaziabad
Lifts Installation & Modification Services in Delhi NCR
Great Blog, there is so much reality written in this content and everything is something which is very hard to be argued. Top notch blog having excellent content. Elevator Cabin
ReplyDeleteThanks for sharing your information
ReplyDeleteElevator Manufacturers in India
Top Elevator Companies
Elevator Parts Manufacturer
Top Ten Elevator Company in World
Elevator Manufacturers Near Me
We are a quality conscious parts manufacturer, based in Narol area of Ahmedabad, Gujarat, India. We manufacture un-machined and machined grey cast iron castings from 200 grams to 120 kilograms.
ReplyDeleteWe have a full fledged machine shop having CNC lathes and vertical machining centres for precision machining of parts from various types of engineering materials like CI, alloy steels, stainless steel, engineering plastics, non ferrous metals.
Elevator Parts manufacturing in Ahmedabad
Nice post! This is very informative and knowledgeable article that's way i would like to say thanks for your efforts you have made in this post
ReplyDeleteElevator Company in Dubai | Elevator Company in UAE
ReplyDeleteYes, this is a good post without any doubt. You really do a great job. I am inspired by you, so keep it up!
elevator companies in uae
Thanks for sharing such a wonderful information with us about elevator
ReplyDeleteRead Also
Industrial Goods Lift Manufactured in Delhi
loading lift in Delhi
factory lift in Delhi
customized lifts in Delhi
Great Post. Please Keep sharing useful information.
ReplyDeletePassenger Lift Manufacturers & Service in Chennai | Liftech India
Lift Manufacturers in Chennai
Great post thanks for sharing this.I was looking this kind of info.
ReplyDeleteGoods Passenger Lift In Delhi
Article Was Nice.
ReplyDeleteTamilnadu Building lifting Services in Chennai
Lift service provider, Lift maintenance
ReplyDeleteMany home lift manufacturers and suppliers in Delhi but i would like to recommend Hybon Elevators. Hybon has lots of varition of lits like home lifts, capsule lifts, stretcger lifts, food lift, goods lift, and etc.
ReplyDeleteHybon is the best home lift company in Delhi NCR, and they have a lot of space in their home elevators. Hydraulic lifts are larger than other models of elevator. Call 9138262626 to speak with Hybon experts about installing a home elevator.
ReplyDeleteNice post! Thank you for sharing this insightful object-oriented design for elevators in a multi-storied building. It's crucial to ensure efficient and reliable vertical transportation systems.
ReplyDeleteIf you need expert advice or top-quality elevator solutions in Riyadh, Saudi Arabia, don't hesitate to contact MELSA (Mitsubishi Electric Saudi Ltd.) . We specialize in elevators that prioritize safety, performance, and modern design. Elevate your building's vertical transportation with MELSA. For more details: https://www.melsa.com.sa/products/elevators/