Class AbstractLinkBasedGTU

    • Constructor Detail

      • AbstractLinkBasedGTU

        public AbstractLinkBasedGTU​(String id,
                                    GTUType gtuType,
                                    OTSNetwork network)
                             throws GTUException
        Parameters:
        id - String; the id of the GTU
        gtuType - GTUType; the type of GTU, e.g. TruckType, CarType, BusType
        network - OTSNetwork; the network in which this GTU is (initially) registered
        Throws:
        GTUException - when the construction of the original waiting path fails
    • Method Detail

      • getNetwork

        public final OTSNetwork getNetwork()
        Returns:
        the network in which the GTU is registered
      • setNetwork

        public final void setNetwork​(OTSNetwork network)
        Parameters:
        network - OTSNetwork; change the network this GTU is registered in
      • getLink

        public abstract Link getLink()
        Return the link on which the REFERENCE position of the GTU currently is on. Returns null if the GTU is not on a link with its reference position.
        Returns:
        Link; the link on which the REFERENCE position of the GTU currently is on