Class ToledoPerception

    • Constructor Detail

      • ToledoPerception

        public ToledoPerception​(LanePerception perception)
        Parameters:
        perception - LanePerception; perception
    • Method Detail

      • updateInfrastructureLaneChangeInfo

        public void updateInfrastructureLaneChangeInfo​(RelativeLane lane)
                                                throws GTUException
        Updates the infrastructural lane change info.
        Parameters:
        lane - RelativeLane; relative lateral lane
        Throws:
        GTUException - when GTU is not initialized
      • getInfrastructureLaneChangeInfo

        public final SortedSet<InfrastructureLaneChangeInfoToledo> getInfrastructureLaneChangeInfo​(RelativeLane lane)
        Returns infrastructure lane change info of a lane. A set is returned as multiple points may force lane changes. Which point is considered most critical is a matter of driver interpretation and may change over time. This is shown below. Suppose vehicle A needs to take the off-ramp, and that behavior is that the minimum distance per required lane change determines how critical it is. First, 400m before the lane-drop, the off-ramp is critical. 300m downstream, the lane-drop is critical. Info is sorted by distance, closest first.
         _______
         _ _A_ _\_________
         _ _ _ _ _ _ _ _ _
         _________ _ _ ___
                  \_______
             (-)        Lane-drop: 1 lane change  in 400m (400m per lane change)
             (--------) Off-ramp:  3 lane changes in 900m (300m per lane change, critical)
             
             (-)        Lane-drop: 1 lane change  in 100m (100m per lane change, critical)
             (--------) Off-ramp:  3 lane changes in 600m (200m per lane change)
         
        Parameters:
        lane - RelativeLane; relative lateral lane
        Returns:
        infrastructure lane change info of a lane
      • getTimeStampedInfrastructureLaneChangeInfo

        public final TimeStampedObject<SortedSet<InfrastructureLaneChangeInfoToledo>> getTimeStampedInfrastructureLaneChangeInfo​(RelativeLane lane)
        Returns time stamped infrastructure lane change info of a lane. A set is returned as multiple points may force lane changes. Which point is considered most critical is a matter of driver interpretation and may change over time. This is shown below. Suppose vehicle A needs to take the off-ramp, and that behavior is that the minimum distance per required lane change determines how critical it is. First, 400m before the lane-drop, the off-ramp is critical. 300m downstream, the lane-drop is critical. Info is sorted by distance, closest first.
         _______
         _ _A_ _\_________
         _ _ _ _ _ _ _ _ _
         _________ _ _ ___
                  \_______
             (-)        Lane-drop: 1 lane change  in 400m (400m per lane change)
             (--------) Off-ramp:  3 lane changes in 900m (300m per lane change, critical)
             
             (-)        Lane-drop: 1 lane change  in 100m (100m per lane change, critical)
             (--------) Off-ramp:  3 lane changes in 600m (200m per lane change)
         
        Parameters:
        lane - RelativeLane; relative lateral lane
        Returns:
        time stamped infrastructure lane change info of a lane
      • updateLegalLaneChangePossibility

        public final void updateLegalLaneChangePossibility​(RelativeLane fromLane,
                                                           LateralDirectionality lat)
                                                    throws GTUException,
                                                           ParameterException
        Updates the distance over which lane changes remains legally possible.
        Parameters:
        fromLane - RelativeLane; lane from which the lane change possibility is requested
        lat - LateralDirectionality; LEFT or RIGHT, null not allowed
        Throws:
        GTUException - if the GTU was not initialized
        ParameterException - if a parameter is not defined
      • updatePhysicalLaneChangePossibility

        public final void updatePhysicalLaneChangePossibility​(RelativeLane fromLane,
                                                              LateralDirectionality lat)
                                                       throws GTUException,
                                                              ParameterException
        Updates the distance over which lane changes remains physically possible.
        Parameters:
        fromLane - RelativeLane; lane from which the lane change possibility is requested
        lat - LateralDirectionality; LEFT or RIGHT, null not allowed
        Throws:
        GTUException - if the GTU was not initialized
        ParameterException - if a parameter is not defined
      • getSpeedLimitProspect

        public final SpeedLimitProspect getSpeedLimitProspect​(RelativeLane lane)
        Returns the prospect for speed limits on a lane (dynamic speed limits may vary between lanes).
        Parameters:
        lane - RelativeLane; relative lateral lane
        Returns:
        prospect for speed limits on a lane
      • getLegalLaneChangePossibility

        public final Length getLegalLaneChangePossibility​(RelativeLane fromLane,
                                                          LateralDirectionality lat)
        Returns the distance over which a lane change remains legally possible.
        Parameters:
        fromLane - RelativeLane; lane from which the lane change possibility is requested
        lat - LateralDirectionality; LEFT or RIGHT, null not allowed
        Returns:
        distance over which a lane change remains possible
        Throws:
        NullPointerException - if lat == null
      • getPhysicalLaneChangePossibility

        public final Length getPhysicalLaneChangePossibility​(RelativeLane fromLane,
                                                             LateralDirectionality lat)
        Returns the distance over which a lane change remains physically possible.
        Parameters:
        fromLane - RelativeLane; lane from which the lane change possibility is requested
        lat - LateralDirectionality; LEFT or RIGHT, null not allowed
        Returns:
        distance over which a lane change remains possible
        Throws:
        NullPointerException - if lat == null
      • getCrossSection

        public final SortedSet<RelativeLane> getCrossSection()
        Returns a set of relative lanes representing the cross section. Lanes are sorted left to right.
        Returns:
        set of relative lanes representing the cross section
      • getTimeStampedSpeedLimitProspect

        public final TimeStampedObject<SpeedLimitProspect> getTimeStampedSpeedLimitProspect​(RelativeLane lane)
        Returns the time stamped prospect for speed limits on a lane (dynamic speed limits may vary between lanes).
        Parameters:
        lane - RelativeLane; relative lateral lane
        Returns:
        time stamped prospect for speed limits on a lane
      • getTimeStampedLegalLaneChangePossibility

        public final TimeStampedObject<Length> getTimeStampedLegalLaneChangePossibility​(RelativeLane fromLane,
                                                                                        LateralDirectionality lat)
        Returns the time stamped distance over which a lane change remains legally possible.
        Parameters:
        fromLane - RelativeLane; lane from which the lane change possibility is requested
        lat - LateralDirectionality; LEFT or RIGHT, null not allowed
        Returns:
        time stamped distance over which a lane change remains possible
        Throws:
        NullPointerException - if lat == null
      • getTimeStampedPhysicalLaneChangePossibility

        public final TimeStampedObject<Length> getTimeStampedPhysicalLaneChangePossibility​(RelativeLane fromLane,
                                                                                           LateralDirectionality lat)
        Returns the time stamped distance over which a lane change remains physically possible.
        Parameters:
        fromLane - RelativeLane; lane from which the lane change possibility is requested
        lat - LateralDirectionality; LEFT or RIGHT, null not allowed
        Returns:
        time stamped distance over which a lane change remains possible
        Throws:
        NullPointerException - if lat == null
      • getTimeStampedCrossSection

        public final TimeStampedObject<SortedSet<RelativeLane>> getTimeStampedCrossSection()
        Returns a time stamped set of relative lanes representing the cross section. Lanes are sorted left to right.
        Returns:
        time stamped set of relative lanes representing the cross section