public class ATCDirector extends AbstractATCDirector
NamedObj.ContainedObjectsIterator
_actorsFinished, _actorsInExecution, _disabledActors, _eventQueue, _eventQueueLock, _isInitializing, _microstep, _noMoreActorsToFire, _stopFireRequested, binCountFactor, enforceMicrostepSemantics, isCQAdaptive, minBinCount, stopWhenQueueIsEmpty, synchronizeToRealTime
_actorsFinishedExecution, _aspectForActor, _aspectsPresent, _defaultMicrostep, _executionAspects, _finishRequested, _initializables, _nextScheduleTime, _stopRequested, _tokenSentToCommunicationAspect, _zeroTime, localClock, startTime, stopTime
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
ATCDirector(CompositeEntity container,
java.lang.String name)
Create a new director in the specified container with the specified
name.
|
Modifier and Type | Method and Description |
---|---|
ArrayToken |
handleAirplaneColor(int id)
Return airplane's color.
|
void |
handleInitializedAirport(Airport airport)
Handle initializing of an airport.
|
void |
handleInitializedDestination(DestinationAirport destinationAirport)
Handle initializing of a destination airport.
|
void |
handleInitializedTrack(Track track)
Put an entry for neighbors, stormyTrack and inTransit for the initialized track.
|
double |
handleRejectionWithDelay(Track track)
Return an additional delay for a track to keep an aircraft in
transit.
|
void |
handleTrackAttributeChanged(Track track)
Update _stormyTracks array because of a change in condition of a track.
|
void |
initialize()
Initialize the state of this director.
|
Receiver |
newReceiver()
Return a new ATCReceiver.
|
java.util.Map<java.lang.String,Token> |
rerouteUnacceptedAircraft(Token aircraft)
Reroute an aircraft.
|
boolean |
returnTrackStatus(Token trackId)
Return status of the track.
|
RecordToken |
routing(Token aircraft,
Token trackId)
Routing an aircraft based on its flight map.
|
void |
setInTransitStatusOfTrack(Token trackId,
boolean trackStatus)
Update inTransit status of a track.
|
_actorFired, _checkForNextEvent, _disableActor, _enqueueEvent, _enqueueTriggerEvent, _fire, _getDepthOfActor, _getDepthOfIOPort, _getNextActorToFire, _issueExecutionAspectWarning, _noActorToFire, _requestFiring, _schedule, addDebugListener, attributeChanged, cancelFireAt, cancelFireAt, clone, describePriorities, fire, fireAt, fireAt, fireAtCurrentTime, fireAtRelativeTime, getCausalityInterface, getIndex, getMicrostep, getModelNextIterationTime, getNextEventTime, getStartTime, getStopTime, invalidateSchedule, mutexLockObject, postfire, prefire, preinitialize, removeDebugListener, resumeActor, setIndex, stop, stopFire, suggestedModalModelDirectors, transferInputs, wrapup
_actorFinished, _consultTimeRegulators, _description, _isEmbedded, _isTopLevel, _transferInputs, _transferOutputs, addInitializable, createSchedule, defaultDependency, delayDependency, elapsedTimeSinceStart, finish, fireAt, fireContainerAt, fireContainerAt, getCurrentTime, getDeadline, getEnvironmentTime, getExecutionAspect, getGlobalTime, getModelStartTime, getModelStopTime, getModelTime, getNextIterationTime, getTimeResolution, implementsStrictActorSemantics, initialize, invalidateResolvedTypes, isEmbedded, isFireFunctional, isStopRequested, isStrict, iterate, notifyTokenSentToCommunicationAspect, preinitialize, removeInitializable, requestInitialization, resume, scheduleContainedActors, setContainer, setCurrentTime, setEmbedded, setModelTime, setTimeResolution, supportMultirateFiring, suspend, terminate, transferOutputs, transferOutputs
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateExistence, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
public ATCDirector(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this actor within the container.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.public ArrayToken handleAirplaneColor(int id) throws IllegalActionException
handleAirplaneColor
in class AbstractATCDirector
id
- id of the airplaneIllegalActionException
- If thrown while creating an ArrayToken.public void handleInitializedAirport(Airport airport) throws IllegalActionException
handleInitializedAirport
in class AbstractATCDirector
airport
- The airport.IllegalActionException
- If the id is invalid.public void handleInitializedDestination(DestinationAirport destinationAirport) throws IllegalActionException
handleInitializedDestination
in class AbstractATCDirector
destinationAirport
- The destination airport.IllegalActionException
- If the id is invalid, the id is
a duplicate of the idea of another airport or if the airport
id is the same as the a track id.public void handleInitializedTrack(Track track) throws IllegalActionException
handleInitializedTrack
in class AbstractATCDirector
track
- The track.IllegalActionException
- If there track is invalid.public double handleRejectionWithDelay(Track track) throws IllegalActionException
handleRejectionWithDelay
in class AbstractATCDirector
track
- The trackIllegalActionException
- Not thrown in this method.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class DEDirector
IllegalActionException
- If thrown by the parent method.public void handleTrackAttributeChanged(Track track) throws IllegalActionException
handleTrackAttributeChanged
in class AbstractATCDirector
track
- The trackIllegalActionException
- If the entry for the track has
not been set in the the stormyTrack array.public RecordToken routing(Token aircraft, Token trackId) throws IllegalActionException
routing
in class AbstractATCDirector
aircraft
- (this token is a record of "aircraftId","aircraftSpeed","flightMap" and "priorTrack"and ...)trackId
- the track id.IllegalActionException
- If there is a routing problem.public boolean returnTrackStatus(Token trackId)
returnTrackStatus
in class AbstractATCDirector
trackId
- The track Id.public void setInTransitStatusOfTrack(Token trackId, boolean trackStatus) throws IllegalActionException
setInTransitStatusOfTrack
in class AbstractATCDirector
trackId
- The track idtrackStatus
- The track statusIllegalActionException
- If thrown while getting the track Id.public java.util.Map<java.lang.String,Token> rerouteUnacceptedAircraft(Token aircraft) throws IllegalActionException
rerouteUnacceptedAircraft
in class AbstractATCDirector
aircraft
- The aircraftIllegalActionException
- If thrown while getting the flightMap or setting parameters.public Receiver newReceiver()
newReceiver
in class DEDirector