Class PtMatrix


  • public final class PtMatrix
    extends Object
    Calculates travel times and distances from Coord to Coord based on a file containing transit stops with coordinates, and, optionally, two files containing travel times and distances between each pair of stops. If files for travel times and distances are not provided, they are calculated based on the teleportedModeSpeed of the pt mode, and the beelineDistanceFactor.
    Author:
    thomas
    • Method Detail

      • createPtMatrix

        public static PtMatrix createPtMatrix​(org.matsim.core.config.groups.PlansCalcRouteConfigGroup plansCalcRoute,
                                              BoundingBox bb,
                                              MatrixBasedPtRouterConfigGroup ippcm)
        Creates an instance of this class. The config group contains the input file names, and whether speed/distance matrices are provided or not. Speed and beeline distance factors are taken from the router configuration. A bounding box must be provided, which is used to filter the transit stop file while reading it. It is mandatory. If you just want to read the file, take the bounding box of your study area. The transit stop file must always be provided, although it technically should not be necessary when you provide distance and speed matrices. It seems to be used only to give out warnings if transit stops are encountered which are not in the transit stop file. The calculated access/egress times are used without beeline distance correction, even though the pt travel times and distances are. Even though the parameters are taken from the teleportation router config, the teleportation router is not actually used to calculate times and distances. I think this would be the more correct thing to do.
      • getTotalTravelTime_seconds

        public double getTotalTravelTime_seconds​(org.matsim.api.core.v01.Coord fromFacilityCoord,
                                                 org.matsim.api.core.v01.Coord toFacilityCoord)
        total travel times (origin location > pt > destination location) in seconds. the travel times are composed as follows: (O)-------(PT)===========(PT)--------(D) O = origin location D = destination location PT= next pt station total travel times = walk travel time from origin O to next pt stop + pt travel time + walk travel time from destination pt stop to destination D
        Parameters:
        fromFacilityCoord -
        toFacilityCoord -
        Returns:
      • getTotalWalkTravelTime_seconds

        public double getTotalWalkTravelTime_seconds​(org.matsim.api.core.v01.Coord fromFacilityCoord,
                                                     org.matsim.api.core.v01.Coord toFacilityCoord)
        returns the total walk travel times in seconds including - walk travel time from given coordinate to next pt stop - walk travel time from destination pt stop to given destination coordinate
        Parameters:
        fromFacilityCoord -
        toFacilityCoord -
        Returns:
      • getPtTravelTime_seconds

        public double getPtTravelTime_seconds​(org.matsim.api.core.v01.Coord fromFacilityCoord,
                                              org.matsim.api.core.v01.Coord toFacilityCoord)
      • getTotalTravelDistance_meter

        public double getTotalTravelDistance_meter​(org.matsim.api.core.v01.Coord fromFacilityCoord,
                                                   org.matsim.api.core.v01.Coord toFacilityCoord)
        total travel distance (origin location > pt > destination location) in seconds. the travel distances are composed as follows: (O)-------(PT)===========(PT)--------(D) O = origin location D = destination location PT= next pt station total travel distance = walk travel distance from origin O to next pt stop + pt travel distance + walk travel distance from destination pt stop to destination D travel distances in meter
        Parameters:
        fromFacilityCoord -
        toFacilityCoord -
        Returns:
      • getTotalWalkTravelDistance_meter

        public double getTotalWalkTravelDistance_meter​(org.matsim.api.core.v01.Coord fromFacilityCoord,
                                                       org.matsim.api.core.v01.Coord toFacilityCoord)
      • getPtTravelDistance_meter

        public double getPtTravelDistance_meter​(org.matsim.api.core.v01.Coord fromCoord,
                                                org.matsim.api.core.v01.Coord toCoord)
      • asPathCalculator

        public org.matsim.core.router.util.LeastCostPathCalculator asPathCalculator​(org.matsim.core.config.groups.PlanCalcScoreConfigGroup planCalcScoreConfigGroup)