Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use C++: Description: The goal of this project is to design and develop C++ code and algorithms to control a bank of elevators, which services
Use C++:
Description:
The goal of this project is to design and develop C++ code and algorithms to control a bank of elevators, which services many floors and transports people "efficiently ", that is, as per the given specifications. A second goal is to effectively employ object oriented design, through appropriate use of classes, data structures and Standard Template Libraries (STLs).
Problem Specifications The elevator bank has m elevators and services n floors. As an example, you may choose m 3 and n 10 Each elevator can stop at every floor The direction of an elevator has three states up, doum and standing. Each elevator can carry up to a max of N maz persons. The program loops through discrete time steps t 1.2 Tstop, where Tstop is an input parameter. At each time step, either 0,1 or 2 persons arrive at a floor. This information can be read from an input data file, as described in 1.3. An elevator takes k time step to move up or down by k floors, if it doesn't stop. For example, to move from floor 4 to floor 5 requires one time step. And to move from floor 7 to floor 3 requires 4 time steps. When an elevator stops at a floor, for either passenger pick up or drop off, it does so for one time step. When a person arrives on a floor, they are assigned the "nearest "elevator. Here nearest is defined in the number of time steps. For example, let us say a person arrives on floor 5, and wants to go up. Elevator E1 on floor 2, moving in the up direction, with no stops, is 3 time steps away. Elevator E2 on floor 6, moving in the dowm direction and headed for floor 3 is 6 time steps away. Therefore, the person is assigned elevator E1. Each arriving person has an arrival floor, destination floor and the assigned elevator as its data members. When a person is assigned an elevator, their arrival floor and destination floor go in the queue or the list of the elevator stops
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started