-
Notifications
You must be signed in to change notification settings - Fork 180
faq 115965953
by Jishnu Narayan on 2017-10-18 10:38:10
Hi all! I am currently working on a model which combines pt and drt in a single trip for an agent. For doing this I am overriding the binding to the existing pt router and using my own code instead (which is based on a path size logit model). So for all agents who choose pt, I want the program to visit the modified part for each iteration. But, this is not happeneing now. I guess once an agent have a detailed pt route in an iteration, all the subsequent iterations use that particular plan without actually going to the pt router code. Is there a way I could change this so that for each iteration the pt routing occurs according to the modified part ?
by Kai Nagel on 2017-10-18 15:22:01
Assuming you have done something similar to RunPluggablePlanStrategyInCodeExample.java (used to be in "tutorial", now in https://github.com/matsim-org/matsim-code-examples), then you could make this strategy the only used one, with a weight larger than zero. Then they should be re-routed in very time step.
If you don't want to do this for your whole population, you could define this 100% pt/drt re-routing only for a sub-population (RunSubpopulationsExample.java, at same place).
by Jishnu Narayan on 2017-11-13 10:43:52
Dear Kai,
Thank you for the reply. I am not exactly implementing it as a plan strategy but am trying to replace the existing pt router with a more sophisticated one. And as a stating point, I am working with the RunTaxiPTIntermodalExample.java. Basically I do no want agents to follow the already existing detailed pt route in the plans file, but instead should make new pt routes for every iteration based on the code i have.
I ran a simulation with one agent and 10 iterations with a single mode of pt. I also had print statements in the modified pt router code. So during the entire simulation run, I was expecting to get 10 print statements from he log file. But instead I am getting only one which means that the modified part of the code is only being visited once. I suppose for all the other iterations, the already existing plan is being simulated without actually visiting the code. Is there a way to change this?
You are viewing an archive of the previous MATSim Q&A site. The real site is now at https://matsim.org/faq