Class AbstractLaneBasedIndividualGTU

    • Constructor Detail

      • AbstractLaneBasedIndividualGTU

        public AbstractLaneBasedIndividualGTU​(String id,
                                              GTUType gtuType,
                                              Length length,
                                              Length width,
                                              Speed maximumSpeed,
                                              OTSSimulatorInterface simulator,
                                              OTSRoadNetwork network)
                                       throws GTUException
        Construct a new AbstractLaneBasedIndividualGTU.
        Parameters:
        id - String; the id of the GTU
        gtuType - GTUType; the type of GTU, e.g. TruckType, CarType, BusType
        length - Length; the maximum length of the GTU (parallel with driving direction)
        width - Length; the maximum width of the GTU (perpendicular to driving direction)
        maximumSpeed - Speed; the maximum speed of the GTU (in the driving direction)
        simulator - OTSSimulatorInterface; the simulator
        network - OTSRoadNetwork; the network that the GTU is initially registered in
        Throws:
        GTUException - when a parameter is invalid
    • Method Detail

      • getLength

        public final Length getLength()
      • getWidth

        public final Length getWidth()
      • getMaximumSpeed

        public final Speed getMaximumSpeed()
      • setNoLaneChangeDistance

        public final void setNoLaneChangeDistance​(Length distance)
        Set distance over which the GTU should not change lane after being created.
        Parameters:
        distance - Length; distance over which the GTU should not change lane after being created
      • laneChangeAllowed

        public final boolean laneChangeAllowed()
        Returns whether a lane change is allowed.
        Returns:
        whether a lane change is allowed