Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to calculate PT travel time via transitRouter (by ActivityFacilityImpl)? #1201

Open
jingjunL opened this issue Jan 29, 2025 · 0 comments

Comments

@jingjunL
Copy link

I am writing a Listener to calculate the PT travel time during a specific second in the last iteration of my MATSim run.

I understand it needs to use router, so what I did was I first use: TransitRouter transitRouter = event.getServices().getInjector().getInstance(TransitRouter.class);;

However, different from the router for car (which just needs the Coord of origin and destination), the method: transitRouter.calcRoute() need to use the RoutingRequest as input variables.

I tried to find some types that can probably be used in this situation, and I found ActivityFacilityImpl.

However, the ActivityFacilityImpl needs to insert a Coord and linkID.

I have two questions:

  1. Am I still on the right track for calculating the PT congested travel time?
  2. If so, what are the differences between Coord and linkID in ActivityFacilityImpl. If I insert a coord and linkID that are very far away from each other, which attribute will be used in MATSim PT routing?

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant