Round trip feature
omi-akif opened this issue · 4 comments
Did a problem you had inspire this feature request?
I was looking for a way to make the agents take alternate routes to commute between two points, not only the shortest path. I was also looking for a way to make the agent do a round trip. Is there any way I can do that?
Hi Omi,
An easy way to randomize their trip is to make it two parts: first to a random location, second to the true destination. Alternatively, you can replace the actual pathfinding method in routing.js (which uses anvaka's A*) with a stochastic one.
Similarly, to do a round trip, you'd just schedule a trip from A to B, and another one from B to A.
Thank you for the answer. My apologies for my bad choice of words. By round trip, what I really meant was the agent will take a route to commute between point A to B. But, from point B to A, the agent will not take the same route, but a different route. I went through the web and I really could not find any solution to the issue, or maybe I overlooked it. I had been searching for this solution for four days in a row. Please help me. By the way, the agentmap is a really great tool for agent-based modeling. Thank you so much for this.
To get a different route on the way back, you’d just randomize it using one of those methods.
Thank you Omi, I really appreciate that.
Thank you so much. Got it working. The trick was to make the agent take a random route to a third random unit (point C) in between point A and point B.