Package ptolemy.domains.sdf.optimize
Class OptimizingSDFDirector
- java.lang.Object
-
- ptolemy.kernel.util.NamedObj
-
- ptolemy.kernel.util.Attribute
-
- ptolemy.actor.Director
-
- ptolemy.actor.sched.StaticSchedulingDirector
-
- ptolemy.domains.sdf.kernel.SDFDirector
-
- ptolemy.domains.sdf.optimize.OptimizingSDFDirector
-
- All Implemented Interfaces:
java.lang.Cloneable
,Executable
,Initializable
,PeriodicDirector
,Changeable
,Debuggable
,DebugListener
,Derivable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
public class OptimizingSDFDirector extends SDFDirector
Director for the synchronous dataflow (SDF) model of computation which finds an optimized schedule according to a defined criterion.Class comments
An OptimizingSDFDirector is the class that controls execution of actors under the SDF domain, while using an optimal schedule. For this it uses the OptimizingSDFScheduler class.See
SDFDirector
,SDFScheduler
andOptimizingSDFScheduler
for more information.The optimizationCriterion parameter of this director selects the optimization criterion.
- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- Marc Geilen
- See Also:
SDFScheduler
,SDFDirector
,OptimizingSDFScheduler
- Pt.AcceptedRating:
- Red ()
- Pt.ProposedRating:
- Red (mgeilen)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OptimizingSDFDirector.OptimizationCriteria
Enumeration type to define the supported optimization criteria.-
Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description Parameter
optimizationCriterion
Parameter defining the optimization criterion.-
Fields inherited from class ptolemy.domains.sdf.kernel.SDFDirector
_iterationCount, _periodicDirectorHelper, allowDisconnectedGraphs, allowRateChanges, AUTO_INTTOKEN, AUTO_NAME, constrainBufferSizes, iterations, ITERATIONS_NAME, period, synchronizeToRealTime, UNBOUNDED_INTTOKEN, UNBOUNDED_NAME, vectorizationFactor
-
Fields inherited from class ptolemy.actor.sched.StaticSchedulingDirector
_postfireReturns, _prefire
-
Fields inherited from class ptolemy.actor.Director
_actorsFinishedExecution, _aspectForActor, _aspectsPresent, _defaultMicrostep, _executionAspects, _finishRequested, _initializables, _nextScheduleTime, _stopRequested, _tokenSentToCommunicationAspect, _zeroTime, localClock, startTime, stopTime
-
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
-
Fields inherited from interface ptolemy.actor.Executable
COMPLETED, NOT_READY, STOP_ITERATING
-
-
Constructor Summary
Constructors Constructor Description OptimizingSDFDirector(CompositeEntity container, java.lang.String name)
Construct on OptimizingSDFDirector in the given container with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
attributeChanged(Attribute attribute)
React to a change in an attribute.void
fire()
Calculate the current schedule, if necessary, and iterate the contained actors in the order given by the schedule.-
Methods inherited from class ptolemy.domains.sdf.kernel.SDFDirector
clone, createSchedule, fireAt, getIterations, getModelNextIterationTime, initialize, newReceiver, periodValue, postfire, prefire, preinitialize, suggestedModalModelDirectors, supportMultirateFiring, transferInputs, transferOutputs
-
Methods inherited from class ptolemy.actor.sched.StaticSchedulingDirector
_setScheduler, addDebugListener, getScheduler, invalidateSchedule, isScheduleValid, removeDebugListener, resumeActor, setScheduler
-
Methods inherited from class ptolemy.actor.Director
_actorFinished, _consultTimeRegulators, _description, _isEmbedded, _isTopLevel, _schedule, _transferInputs, _transferOutputs, addInitializable, defaultDependency, delayDependency, elapsedTimeSinceStart, finish, fireAt, fireAt, fireAtCurrentTime, fireContainerAt, fireContainerAt, getCausalityInterface, getCurrentTime, getDeadline, getEnvironmentTime, getExecutionAspect, getGlobalTime, getModelStartTime, getModelStopTime, getModelTime, getNextIterationTime, getStartTime, getStopTime, getTimeResolution, implementsStrictActorSemantics, initialize, invalidateResolvedTypes, isEmbedded, isFireFunctional, isStopRequested, isStrict, iterate, mutexLockObject, notifyTokenSentToCommunicationAspect, preinitialize, removeInitializable, requestInitialization, resume, scheduleContainedActors, setContainer, setCurrentTime, setEmbedded, setModelTime, setTimeResolution, stop, stopFire, suspend, terminate, transferOutputs, wrapup
-
Methods inherited from class ptolemy.kernel.util.Attribute
_checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_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
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.actor.Executable
isFireFunctional, isStrict, iterate, stop, stopFire, terminate
-
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, removeInitializable, wrapup
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
Methods inherited from interface ptolemy.actor.util.PeriodicDirector
isEmbedded
-
-
-
-
Field Detail
-
optimizationCriterion
public Parameter optimizationCriterion
Parameter defining the optimization criterion.
-
-
Constructor Detail
-
OptimizingSDFDirector
public OptimizingSDFDirector(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Construct on OptimizingSDFDirector in the given container with the given name. The container argument must not be null, or a NullPointerException will be thrown. If the name argument is null, then the name is set to the empty string. Increment the version number of the workspace. The OptimizingSDFDirector will have a default scheduler of type OptimizingSDFScheduler.- Parameters:
container
- Container of the director.name
- Name of this director.- Throws:
IllegalActionException
- If the director is not compatible with the specified container. May be thrown in a derived class.NameDuplicationException
- If the container is not a CompositeActor and the name collides with an entity in the container.
-
-
Method Detail
-
fire
public void fire() throws IllegalActionException
Calculate the current schedule, if necessary, and iterate the contained actors in the order given by the schedule. method copied from super class SDFDirector. Modifies only the firing by firing the BufferingProfile if the interface is defined. Factoring out difference might be a good idea.- Specified by:
fire
in interfaceExecutable
- Overrides:
fire
in classSDFDirector
- Throws:
IllegalActionException
- If any actor executed by this actor return false in prefire.InvalidStateException
- If this director does not have a container.
-
attributeChanged
public void attributeChanged(Attribute attribute) throws IllegalActionException
React to a change in an attribute. If the changed attribute matches a parameter of the director, then the corresponding local copy of the parameter value will be updated.- Overrides:
attributeChanged
in classSDFDirector
- Parameters:
attribute
- The changed parameter.- Throws:
IllegalActionException
- If the parameter set is not valid.
-
-