Class AbstractATCDirector

    • Constructor Detail

      • AbstractATCDirector

        public AbstractATCDirector​(CompositeEntity container,
                                   java.lang.String name)
                            throws IllegalActionException,
                                   NameDuplicationException
        Create a new director in the specified container with the specified name. The name must be unique within the container or an exception is thrown. The container argument must not be null, or a NullPointerException will be thrown.
        Parameters:
        container - The container.
        name - The name of this actor within the container.
        Throws:
        IllegalActionException - If this actor cannot be contained by the proposed container (see the setContainer() method).
        NameDuplicationException - If the name coincides with an entity already in the container.
    • Method Detail

      • handleRejectionWithDelay

        public abstract double handleRejectionWithDelay​(Track track)
                                                 throws IllegalActionException
        Return an additional delay for a track to keep an aircraft in transit.
        Parameters:
        track - The track.
        Returns:
        An additional delay, or -1.0 to indicate that a rerouting is possible.
        Throws:
        IllegalActionException - Not thrown in this base class.
      • handleTrackAttributeChanged

        public abstract void handleTrackAttributeChanged​(Track track)
                                                  throws IllegalActionException
        Update _stormyTracks array because of a change in condition of a track.
        Parameters:
        track - The track.
        Throws:
        IllegalActionException - Not thrown in this base class.
      • handleInitializedTrack

        public abstract void handleInitializedTrack​(Track track)
                                             throws IllegalActionException
        Put an entry into _neighbors , _stormyTrack and _inTransit for the initialized track.
        Parameters:
        track - The track.
        Throws:
        IllegalActionException - Not thrown in this base class.
      • routing

        public abstract RecordToken routing​(Token aircraft,
                                            Token trackId)
                                     throws IllegalActionException
        Routing an aircraft based on its flight map.
        Parameters:
        aircraft - (this token is a record of "aircraftId","aircraftSpeed","flightMap" and "priorTrack"and ...)
        trackId - The trackid.
        Returns:
        A RecordToken representing the routing.
        Throws:
        IllegalActionException - Not thrown in this base class.
      • returnTrackStatus

        public abstract boolean returnTrackStatus​(Token trackId)
        Return status of the track.
        Parameters:
        trackId - The trackid.
        Returns:
        The status of the track.
      • setInTransitStatusOfTrack

        public abstract void setInTransitStatusOfTrack​(Token trackId,
                                                       boolean trackStatus)
                                                throws IllegalActionException
        Update inTransit status of a track.
        Parameters:
        trackId - The trackid
        trackStatus - The status
        Throws:
        IllegalActionException - Not thrown in this base class.
      • rerouteUnacceptedAircraft

        public abstract java.util.Map<java.lang.String,​Token> rerouteUnacceptedAircraft​(Token aircraft)
                                                                                       throws IllegalActionException
        Reroute an aircraft.
        Parameters:
        aircraft - The aircraft
        Returns:
        a Map of rerouted aircraft.
        Throws:
        IllegalActionException - Not thrown in this base class.
      • handleAirplaneColor

        public abstract ArrayToken handleAirplaneColor​(int id)
                                                throws IllegalActionException
        Return airplane's color. If the airplane has not color, set a color for that and store it.
        Parameters:
        id - id of the airplane
        Returns:
        The color of the airplane.
        Throws:
        IllegalActionException - Not thrown in this base class.
      • handleInitializedAirport

        public abstract void handleInitializedAirport​(Airport airport)
                                               throws IllegalActionException
        Handle initializing of an airport.
        Parameters:
        airport - The airport
        Throws:
        IllegalActionException - Not thrown in this base class.
      • handleInitializedDestination

        public abstract void handleInitializedDestination​(DestinationAirport destinationAirport)
                                                   throws IllegalActionException
        Handle initializing of a destination airport. This function stores airport id in _airportsId
        Parameters:
        destinationAirport - The destination.
        Throws:
        IllegalActionException - Not thrown in this base class.