Question
ABC Corporation has an old office building with out of date elevators, which need to be modernized or replaced. You have been hired to evaluate
ABC Corporation has an old office building with out of date elevators, which need to be modernized or replaced. You have been hired to evaluate the current use of the elevators so they can make an appropriate decision. You decide a computer simulation would be the best strategy to evaluate the use of the elevator, so you go to the office building to collect some actual data on the use of the elevator. You record actual usage (see input file) and observe the following facts:
There are two elevators which each hold five people. One elevator is very small, so the limit is closely followed. The second elevator seems to be permanently broken.
The elevator is very narrow so people have to get off to let out anyone that is behind them.
The building has 5 floors serviced by the elevator.
People always get on the elevator if there is room, even if it is going in the wrong direction, i.e. they may get on to go down even if they really want to go up.
You decide to use stacks. In the simulation, at each floor, you do the following:
Remove people scheduled to get off on that floor
Print the name of people exiting; along with the number of times each person had to exit temporarily during their trip
Restore people who got off temporarily
Load people waiting to get on.
If the elevator is full or empty, print that out. Identify people who are waiting to get on but are unable to do so, if the elevator is full. Assume that people unable to get on the elevator will take the stairs.
Print the name of each person getting on along with their destination floor.
Proceed to the next floor, which is the next floor selected by a current passenger or the next floor selected by a person waiting to get on, whichever is sooner.
After your simulation is finished, print out the total number of people who rode, the number of time someone could not ride because it was full, the number of empty occasions, etc.
The input you collected is in a separate file. Since you did not know the name of the people working at ABC Corporation, you amused yourself by making up names for them. The data is the name followed by the entrance floor, followed by the exit floor. You end up going back a second time to collect addition data (student generated)
Summarize your findings and recommendations in a report to ABC Corporation. Explain your strategy and the program you wrote in detail. Explain what you learned about elevator use at ABC and make recommendations. Be sure to consider the second elevator. As an addendum, you write report for in-house use, in which you justify your
simulation design choices and why a stack is an appropriate choice. Defend your implementation decisions. Discuss what you leaned, and what you would change going forward with the simulation. Be sure to consider efficiency consideration (both time and space)
MUST USE named files to handle I/O. There will be a penalty for hardcoded file names.
Here is input data:
//elevator input data - collected by a Go Pro Camera you mount on the elevator ceiling. //Name floor entered elevator floor exited. Eli 1 5 Babs 1 3 Fred 1 2 Tom 1 4 Ian 2 3 Tip 2 4 Barb 3 5 Tina 5 2 Joe 5 1 Hal 4 2 Ted 3 1 Deb 2 1 Ann 1 3 Jim 1 3 Sal 1 3 Vic 1 4 Flo 1 5 Ada 1 5 Dina 2 3 Bob 2 5 Lee 5 3 Wil 4 3 Gia 4 1 Isa 3 1 Abe 1 3 Lou 1 3 Yul 1 4 Al 1 4 Lew 2 5 Nan 2 3 Ina 3 4 Bif 3 5 Moe 3 5 Jan 5 1 Mia 1 3 Lisa 1 4 Cal 2 5 Pat 4 5 Tess 4 2 Nora 3 1 Don 2 1 Sam 1 5 Liv 5 4 Nina 1 3 Mary 5 2 Ed 1 2 Tad 2 3 Ali 3 4 Sue 4 5
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