Skip to content

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

Open
@jingjunL

Description

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 :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions