Quickest - Router: Suggestions on how to tackle problem
Task
Inside of a room: Estimated Time of Arrival to a door, based on traffic/queues
Current Solution (rough)
- searching for alternate routes
- searching for pedestrians in that room in front of alternate doors
- calc ETA
- calc if current agent can break out of queue or is stuck inside
- change destination if possible
Suggestion
- create a temp polygon of (ped-Pos, Door-Point-a, Door-Point-b)
- find other pedestrian that are inside polygon
- calc ETA from mean speed
Pro
- using existing functions
- length of possible queue is respected
- similar to current solution
Con
- calculation time grows with n^2+ (peds)
- similar to current solution
Suggestion
- pedestrian have a counter
- pedestrian counter is reset when spawning or entering a new room
- while passing a door, the current counter (time-in-old-room) is stored as door-member
- estimate ETA by asking the door for last value of (time-in-old-room) of the ped that exited last
Pro
- calculation does not grow with n^2
Con
- last in queue will give door a bad rating, although queue is not there anymore.. (could be solved via door-member being a "soft"-state, that will reset after a few seconds)
Please comment and/or post other Suggestions