Assignment about elevators
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
So I did not start working on this assignment, but I'm having a hard time planning it out.
So the assignment is to program the elevator system (2 coordinated elevators) of a 10 floor apartment.
Can someone give me a general tip on how should i make it?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Campbell Ritchie wrote:We don't give out complete solutions, but please show us what you have achieved so far.
Oh I am not asking for complete solutions. Just a general idea of with which tools and how should i start working on it.
I am not at home but I will insert it here when i start working on it
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Can you come up with a list of rules that will govern your elevators?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Carey Brown wrote:Well, some solutions would be terrible and some would be great. What criteria is going to be used to judge the success of your assignment?
Can you come up with a list of rules that will govern your elevators?
The teacher did not state any specifics except the number of elevators and the floors. That is one reason why am I stuck at how to build it up. He also said the more complex but efficient it is, the better will be the results.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Are the speeds of the elevators specified? Do you take acceleration and deceleration into account? The distance between floors?
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Carey Brown wrote:I'm assuming "results" has something to do with the "time" it takes to get various passengers to their destinations. So far there are too many unknowns beyond the algorithm that you choose.
Are the speeds of the elevators specified? Do you take acceleration and deceleration into account? The distance between floors?
i was thinking about 40 miles per hour at max speed. I will also add an emergency stop with instant stop. Acceleration and Deceleration would be logical and cool, but i really have no idea how to implement that. I think each floor will be 14 ft.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Carey Brown wrote:Can a door be held open when it is at a stop?
Hmm I did not think about that. This is getting more and more complicated. I'm not sure I could solve that though.
Carey Brown wrote:"Emergency stop"? Didn't think of that. Is that a requirement?
Nope, I just wanted to add as I can implement it and it adds to the depth of the whole assignment.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
-
2 -
-
Number of slices to send:Optional 'thank-you' note:
-
-
If so then I'd recommend simplifying things as much as possible and model time in steps and your elevator as a sequence of states where the transition from one state to another takes 1 step of time. For example: Given elevators A and B and floors 1 to 10
| Time | Action | Elevator A | Elevator B |
|---|---|---|---|
| 0 | Call to level 3 | 1 | 1 |
| 1 | Call to level 4 | 1 | 2 |
| 2 | 2 | 3 | |
| 3 | Elevator B occupant selects 2 | 3 | 3 |
| 4 | 4 | 2 | |
| 5 | Elevator A occupant selects 3 | 4 | 2 |
| 6 | 3 | 2 |
In this example I have made up some rules:
Your rules may be different but this is how I would start thinking about it.
Tim Driven Development | Test until the fear goes away
| You learn how to close your eyes and tell yourself "this just isn't really happening to me." Tiny ad: Paul Wheaton's 16th Kickstarter: Gardening playing cards for gardeners and homesteaders https://coderanch.com/t/889615/Paul-Wheaton-Kickstarter-Gardening-playing |











