Interface InfrastructurePerception

    • Method Detail

      • updateInfrastructureLaneChangeInfo

        void updateInfrastructureLaneChangeInfo​(RelativeLane lane)
                                         throws GTUException,
                                                org.opentrafficsim.base.parameters.ParameterException
        Updates the infrastructural lane change info. It starts at the given lane and moves downstream over the network. Whenever a point is encountered where lane changes are required, this information is saved.
        Parameters:
        lane - RelativeLane; relative lateral lane
        Throws:
        GTUException - if the GTU was not initialized or if the lane is not in the cross section
        org.opentrafficsim.base.parameters.ParameterException - if a parameter is not defined
      • updateSpeedLimitProspect

        void updateSpeedLimitProspect​(RelativeLane lane)
                               throws GTUException,
                                      org.opentrafficsim.base.parameters.ParameterException
        Updates the speed limit prospect.
        Parameters:
        lane - RelativeLane; relative lateral lane
        Throws:
        GTUException - if the GTU was not initialized or if the lane is not in the cross section
        org.opentrafficsim.base.parameters.ParameterException - if a parameter is not defined
      • updateLegalLaneChangePossibility

        void updateLegalLaneChangePossibility​(RelativeLane lane,
                                              LateralDirectionality lat)
                                       throws GTUException,
                                              org.opentrafficsim.base.parameters.ParameterException
        Updates the distance over which lane changes remains legally possible.
        Parameters:
        lane - 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 or if the lane is not in the cross section
        org.opentrafficsim.base.parameters.ParameterException - if a parameter is not defined
      • updatePhysicalLaneChangePossibility

        void updatePhysicalLaneChangePossibility​(RelativeLane lane,
                                                 LateralDirectionality lat)
                                          throws GTUException,
                                                 org.opentrafficsim.base.parameters.ParameterException
        Updates the distance over which lane changes remains physically possible.
        Parameters:
        lane - 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 or if the lane is not in the cross section
        org.opentrafficsim.base.parameters.ParameterException - if a parameter is not defined
      • updateCrossSection

        void updateCrossSection()
                         throws GTUException,
                                org.opentrafficsim.base.parameters.ParameterException
        Updates a set of relative lanes representing the cross section. This set consists of all lanes on the current link, and an additional lane on the left and/or right side in case of a merge that is sufficiently nearby.
        Throws:
        GTUException - if the GTU was not initialized
        org.opentrafficsim.base.parameters.ParameterException - if a parameter is not defined
      • getInfrastructureLaneChangeInfo

        SortedSet<InfrastructureLaneChangeInfo> 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
      • getSpeedLimitProspect

        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

        Length getLegalLaneChangePossibility​(RelativeLane fromLane,
                                             LateralDirectionality lat)
        Returns the distance over which a lane change remains legally possible. Negative values indicate the distance over which a lane change is legally not 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

        Length getPhysicalLaneChangePossibility​(RelativeLane fromLane,
                                                LateralDirectionality lat)
        Returns the distance over which a lane change remains physically possible. Negative values indicate the distance over which a lane change is physically not 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

        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