Click here to Skip to main content
12,501,486 members (48,890 online)

Algorithms

 
GeneralRe: Puzzle 8 Solving with bfs Pin
Alan Balkany26-Sep-12 5:09
memberAlan Balkany26-Sep-12 5:09 
GeneralRe: Puzzle 8 Solving with bfs Pin
mohammadkaab26-Sep-12 21:36
membermohammadkaab26-Sep-12 21:36 
QuestionBit Interleaver Pin
Skippums24-Sep-12 16:07
memberSkippums24-Sep-12 16:07 
QuestionImage processing Pin
fabio_antonio23-Sep-12 8:25
memberfabio_antonio23-Sep-12 8:25 
AnswerRe: Image processing Pin
Alan Balkany24-Sep-12 4:46
memberAlan Balkany24-Sep-12 4:46 
QuestionChecking the network Pin
en41115-Sep-12 7:24
memberen41115-Sep-12 7:24 
AnswerlinkRe: Checking the network Pin
YvesDaoust21-Sep-12 0:11
memberYvesDaoust21-Sep-12 0:11 
Questionan optimal elevator-use algorithm Pin
BillWoodruff13-Sep-12 3:38
memberBillWoodruff13-Sep-12 3:38 
Note: I see an interesting "resonance" between this question, and Roger Wright's question below: "A Modelling Question;" which I had not read before I made notes today about this "problem space," to post later on CP, when I got home !

For some reason today, while riding the elevators in a shopping mall that has three sets of two public-use elevators: in one end of the mall; in the other end of the mall; and in the middle of the mall ...

The idea came to me that it would be an interesting programming challenge (of a type I had never taken on before) to create an elevator use optimization solution: note that I have never studied differential equations, and I am not familiar with queue optimzation algorithms, etc.

Here's how I framed the problem:

1. Given #n sets of elevators, where the number in each set can vary from #1 to #n:

a. defining "set" to mean elevators that are adjacent, and that any button press on a floor that requests an elevator to go up, or down: simultaneously shares that request with every other elevator in its set that is not in use currently: i.e., stopped at one floor with the door closed, and no requests pending (that might be an unrealistic constraint ?).

2. Assuming all elevators serve the same the number of floors:

3. Assuming that the following time-stamped data, tagged with a unique ID for each elevator, is generated and sent to a central computer:

a. for every elevator the time it starts moving, and what floor it starts moving from.

b. for every elevator the time it stops moving, after being in motion, and the floor it stops on.

c. on every floor of the building, when someone presses an elevator up, or down, button (from outside the elevator) to request service:

d. data tagged by unique elevator ID containing the time of request-service button press, and the requested direction, up, or down.

e. inside the elevator: when any floor choice button is pressed: data tagged by unique elevator ID containing the time of floor-choice button press, and the destination floor chosen. So any one moment in time you have a complete list of all floors to be stopped-at by elevator #n.

3. when any elevator starts or stops moving is recorded tagged and time-stamped as in the above.

So, imagining we have all this incoming time-stamped information, and that some, or all, elevators are in use, some moving up, or down, some stopped.

The problem to be solved:

1. given a new request for service, up, or down, on floor #n of elevator #n:

2. and, given the context of pending requests and states of every other elevator in the set of which elevator #n is contained:

The desired result: to dispatch the elevators most efficiently, so they serve the most number of people in the smallest amount of time.

I'm not looking for "answers" by asking the question here: I am just looking for a few "pointers" to direct my initial study of the type of scheduling optimization this particular example represents.

Frankly, I don't have a clue about how to approach this kind of problem right now (no formal computer science courses for me, unfortunately).

Obviously could make this example much more complex by taking into real-world factors like most requests may originate from the ground-floor before based on some pattern (like, in a hotel: most request originate from the ground and/or check-in floor up to and a certain amount of time past, check-in time).

You could consider recording the exact times of elevator #n's door opening and closing, and figure out that if it's a short enough interval that no-one could have gotten on or off, so someone hit the close-door button immediately for whatever reason.

But all that type of complexity I don't want to even consider until I reach some understanding of basic optimization problems.

thanks, Bill

p.s. A difference I think I see between Roger Wright's simulation problem (if I can even begin to interpret it correctly), and the one I've described here is:

There are "unknowns" (see Roger's response here describing his inability to monitor pump-states in real-time):[^]) in Roger's complex system of pumps, wells, and flows; while, in the problem described here, there are no similar "unknowns:"

For every elevator #n: its current position; whether it is idle stopped on one floor; or moving up or down to some other floor; and, the number of floors it must stop at before reaching the top or bottom floor depending on which way its moving: is known precisely.

AnswerRe: an optimal elevator-use algorithm Pin
Alan Balkany13-Sep-12 4:41
memberAlan Balkany13-Sep-12 4:41 
GeneralRe: an optimal elevator-use algorithm Pin
BillWoodruff19-Sep-12 4:35
memberBillWoodruff19-Sep-12 4:35 
QuestionPlease, poke holes in my cryptographic function... Pin
SixOfTheClock13-Sep-12 0:52
memberSixOfTheClock13-Sep-12 0:52 
QuestionWhat kind of checksum can this be? Pin
GrooverFromHolland9-Sep-12 9:18
memberGrooverFromHolland9-Sep-12 9:18 
AnswerRe: What kind of checksum can this be? Pin
Alan N9-Sep-12 11:55
memberAlan N9-Sep-12 11:55 
GeneralRe: What kind of checksum can this be? Pin
GrooverFromHolland9-Sep-12 22:15
memberGrooverFromHolland9-Sep-12 22:15 
QuestionLinear Regression Most Efficient algorithm calc Line of Best Fit Pin
A*****4-Sep-12 19:24
memberA*****4-Sep-12 19:24 
AnswerRe: Linear Regression Most Efficient algorithm calc Line of Best Fit Pin
Peter_in_27804-Sep-12 20:17
memberPeter_in_27804-Sep-12 20:17 
QuestionRunning out of Memory - Maths Check Pin
Mike-MadBadger3-Sep-12 7:52
memberMike-MadBadger3-Sep-12 7:52 
AnswerRe: Running out of Memory - Maths Check Pin
Andrei Straut3-Sep-12 9:03
memberAndrei Straut3-Sep-12 9:03 
GeneralRe: Running out of Memory - Maths Check Pin
Mike-MadBadger3-Sep-12 10:11
memberMike-MadBadger3-Sep-12 10:11 
GeneralRe: Running out of Memory - Maths Check Pin
Andrei Straut3-Sep-12 10:56
memberAndrei Straut3-Sep-12 10:56 
GeneralRe: Running out of Memory - Maths Check Pin
Mike-MadBadger3-Sep-12 11:18
memberMike-MadBadger3-Sep-12 11:18 
GeneralRe: Running out of Memory - Maths Check Pin
harold aptroot3-Sep-12 21:54
memberharold aptroot3-Sep-12 21:54 
GeneralRe: Running out of Memory - Maths Check Pin
Mike-MadBadger4-Sep-12 0:26
memberMike-MadBadger4-Sep-12 0:26 
AnswerRe: News Page Pin
Mike-MadBadger3-Sep-12 21:12
memberMike-MadBadger3-Sep-12 21:12 
AnswerRe: Running out of Memory - Maths Check Pin
YvesDaoust3-Sep-12 23:21
memberYvesDaoust3-Sep-12 23:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 20 Sep 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid