PathFinding.js icon indicating copy to clipboard operation
PathFinding.js copied to clipboard

Q: Search depth and one way routes

Open noiv opened this issue 12 years ago • 1 comments

I use PathFinding.js within a simulation with a population and try to optimize it a bit. There is kind of a counter and sometimes a queue of clients build up, which is expected, because one is handled at time. However, everyone in the queue searches the whole board for a route through the only door which is blocked by another client and consumes a lot of cpu cycles. How can I limit search depth to let's say a distance of 10?

In the same example I want to make the door only work in one way, let's say North to South, so that the clients do not try to reach the counter that way. That way I could implement exit doors and entrances of a building.

I do not expect a ready to go solution, but a an educated guess where to start would be really helpful.

noiv avatar Dec 03 '13 06:12 noiv

Hi @noiv

You might want to take a look at this issue https://github.com/qiao/PathFinding.js/issues/75. It has similar requirements as you.

imor avatar Nov 22 '14 14:11 imor