-
Notifications
You must be signed in to change notification settings - Fork 179
faq 88440838
by Tom Tim on 2016-10-05 08:56:16
Hello, I am working through the dvrp-extension and am trying to modify the "dynAgent"-example in a way, so that I can set the destination of an agent, once a given condition is fullfilled (e.g. after passing 10 links → set destination link to link 5).
So far i can only change the exact next link by modifying the "doRandomChoice()"-method in the "RandomDynActivity"-class. Where do I have to tell the agent to stop driving around randomly and start driving to the new destination?
by Joschka Bischoff on 2016-10-05 09:27:16
Hi Tom,
you need to change the RandomDynLeg-class for this. Here you can set an condition on when to end a leg, the Activity will then come next.
For getting from link 10 to link 5, you may need to include some sort of routing into the DynLeg.
I'm working with the DynAgent package to include parking search into a scenario. For the time being, this is only in my playground, but it will move to the Parking contrib eventually:
Have especially a look at the ParkingDynLeg and the ParkingAgentLogic.
Hope this helps,
Joschka
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq