-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Put passengers on trains #5
Comments
There are still some problems... Search algos usually require iteration over all the out-edges of a vertex, but we really can't provide all of them - technically there could be an infinite number of them - so we must do something to trick the search algorithm. My first ideaHave dummy nodes with high cost that are returned at some point that are the same node, but are some time later (wherever we decided to cut it off). The search algos then would only come back to this node after looking at all the other ones, in which case the same thing would happen - a few would be returned, then a node that doesn't go anywhere, but does increase time. Second ideaOut-edges of a vertex could be defined as where the trains that leave now go next and the next time interval (but at the same location). This has problems if we want to use a real number for time - would have to do intervals, which I guess is OK. Also, this would greatly increase the number of vertices, which is kinda bad. Finally, with intervals, it's really the same idea as the first idea, except that the intervals would be really small. Other TODOs
|
partial fix for #5 No heuristic for now... The implicit graph is determined from the Schedule & the TrackNetwork. Each "vertex" is a pair of TrackNetwork::IDs and a time. Out edges are determined from trains that leave in the future, and a corrisponding "vertex" is the pair of the next ID the train goes to, and the time it gets there. Still has some problems: the search algorithm needs to iterate all the out-edges of a vertex, but this technically will be an infinite number. Need to come up with a way to "hide" all except a small finite number.
partial fix for #5 No heuristic for now... The implicit graph is determined from the Schedule & the TrackNetwork. Each "vertex" is a pair of TrackNetwork::IDs and a time. Out edges are determined from trains that leave in the future, and a corrisponding "vertex" is the pair of the next ID the train goes to, and the time it gets there. Still has some problems: the search algorithm needs to iterate all the out-edges of a vertex, but this technically will be an infinite number. Need to come up with a way to "hide" all except a small finite number. code loosely based off of http://stackoverflow.com/a/9782649/2256231
right now nothing decides what passengers go on which trains.
Also nothing in the animation shows this. :P
The text was updated successfully, but these errors were encountered: