Package org.ptolemy.qss
Class QSSIntegrator
- java.lang.Object
-
- All Implemented Interfaces:
java.lang.Cloneable
,Actor
,Executable
,FiringsRecordable
,Initializable
,TypedActor
,Changeable
,Debuggable
,DebugListener
,Derivable
,Instantiable
,ModelErrorHandler
,MoMLExportable
,Moveable
,Nameable
@Deprecated public class QSSIntegrator extends TypedAtomicActor
Deprecated.UseQSSIntegrator
instead.A quantized-state integrator.- Since:
- Ptolemy II 10.0
- Version:
- $Id$
- Author:
- David Broman, Edward A. Lee, Thierry Nouidui, Michael Wetter
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Yellow (eal)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ptolemy.kernel.Entity
Entity.ContainedObjectsIterator
-
-
Field Summary
Fields Modifier and Type Field Description protected static double
_SMALL
Deprecated.A small number, below which the slope is considered to be zero.TypedIOPort
q
Deprecated.Output (the quantized state).Parameter
quantum
Deprecated.Quantum.TypedIOPort
u
Deprecated.Input (the derivative).Parameter
xInit
Deprecated.Initial value of the state.-
Fields inherited from class ptolemy.actor.TypedAtomicActor
_typesValid
-
Fields inherited from class ptolemy.actor.AtomicActor
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
-
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 QSSIntegrator(CompositeEntity container, java.lang.String name)
Deprecated.Construct a new instance of this integrator.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected double
_derivative(double input)
Deprecated.Return the derivative (slope) at the current time with the given input value.protected Time
_nextCrossingTime(double slope, double start, double reference, double quantum, Time currentTime)
Deprecated.Return the next time at which a line with the given slope will rise or fall from the specified starting point to the specified reference plus or minus the specified quantum.protected double
_nextOutputValue(double slope, double reference, double quantum)
Deprecated.Return the next output value, which is the reference plus the quantum if the slope is positive, and the reference minus the quantum otherwise.protected double
_quantize(double x)
Deprecated.Return the argument quantized to a multiple of quantum given by thequantum
parameter.void
declareDelayDependency()
Deprecated.Declare that the output does not depend on the input in a firing.void
fire()
Deprecated.If it is time to produce a quantized output, produce it.void
initialize()
Deprecated.Initialize this actor to indicate that no input has yet been provided.boolean
isStrict()
Deprecated.Return false, indicating that this actor can fire even if its input is unknown.boolean
postfire()
Deprecated.Update the calculation of the next output time and request a refiring at that time.-
Methods inherited from class ptolemy.actor.TypedAtomicActor
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
-
Methods inherited from class ptolemy.actor.AtomicActor
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, iterate, newReceiver, outputPortList, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup
-
Methods inherited from class ptolemy.kernel.ComponentEntity
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
-
Methods inherited from class ptolemy.kernel.Entity
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
-
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
-
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ptolemy.actor.Actor
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
-
Methods inherited from interface ptolemy.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
-
Methods inherited from interface ptolemy.actor.Executable
isFireFunctional, iterate, prefire, stop, stopFire, terminate
-
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, preinitialize, removeInitializable, wrapup
-
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
-
-
-
-
Field Detail
-
u
public TypedIOPort u
Deprecated.Input (the derivative).
-
q
public TypedIOPort q
Deprecated.Output (the quantized state).
-
xInit
public Parameter xInit
Deprecated.Initial value of the state.
-
quantum
public Parameter quantum
Deprecated.Quantum.
-
_SMALL
protected static final double _SMALL
Deprecated.A small number, below which the slope is considered to be zero.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
QSSIntegrator
public QSSIntegrator(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
Deprecated.Construct a new instance of this integrator.- Parameters:
container
- The container.name
- The name.- Throws:
IllegalActionException
- If setting up ports and parameters fails.NameDuplicationException
- If the container already contains an object with this name.
-
-
Method Detail
-
declareDelayDependency
public void declareDelayDependency() throws IllegalActionException
Deprecated.Declare that the output does not depend on the input in a firing.- Overrides:
declareDelayDependency
in classAtomicActor<TypedIOPort>
- Throws:
IllegalActionException
- If the causality interface cannot be computed.- See Also:
AtomicActor.getCausalityInterface()
-
fire
public void fire() throws IllegalActionException
Deprecated.If it is time to produce a quantized output, produce it. Otherwise, indicate that the output is absent.- Specified by:
fire
in interfaceExecutable
- Overrides:
fire
in classAtomicActor<TypedIOPort>
- Throws:
IllegalActionException
- If sending an output fails.
-
initialize
public void initialize() throws IllegalActionException
Deprecated.Initialize this actor to indicate that no input has yet been provided.- Specified by:
initialize
in interfaceInitializable
- Overrides:
initialize
in classAtomicActor<TypedIOPort>
- Throws:
IllegalActionException
- If a derived class throws it.
-
isStrict
public boolean isStrict()
Deprecated.Return false, indicating that this actor can fire even if its input is unknown.- Specified by:
isStrict
in interfaceExecutable
- Overrides:
isStrict
in classAtomicActor<TypedIOPort>
- Returns:
- False.
-
postfire
public boolean postfire() throws IllegalActionException
Deprecated.Update the calculation of the next output time and request a refiring at that time. If there is a new input, read it and update the slope.- Specified by:
postfire
in interfaceExecutable
- Overrides:
postfire
in classAtomicActor<TypedIOPort>
- Returns:
- True if the base class returns true.
- Throws:
IllegalActionException
- If reading inputs or parameters fails.
-
_derivative
protected double _derivative(double input)
Deprecated.Return the derivative (slope) at the current time with the given input value. In this base class, the input is assumed to be the derivative, so this method just returns its argument. Derived classes may provide some other function to provide a derivative.- Parameters:
input
- The input value.- Returns:
- The current derivative.
-
_nextCrossingTime
protected Time _nextCrossingTime(double slope, double start, double reference, double quantum, Time currentTime)
Deprecated.Return the next time at which a line with the given slope will rise or fall from the specified starting point to the specified reference plus or minus the specified quantum. If the specified slope is smaller than the value of_SMALL
, then return Time.POSITIVE_INFINITY. If the starting point has already hit or crossed the specified reference plus or minus the specified quantum, then return the current time.- Parameters:
slope
- The derivative.start
- The starting point.reference
- The reference point.quantum
- The quantum.currentTime
- The current time.- Returns:
- The next event time.
-
_nextOutputValue
protected double _nextOutputValue(double slope, double reference, double quantum)
Deprecated.Return the next output value, which is the reference plus the quantum if the slope is positive, and the reference minus the quantum otherwise.- Parameters:
slope
- The slope.reference
- The reference.quantum
- The quantum.- Returns:
- The reference plus or minus the quantum.
-
_quantize
protected double _quantize(double x) throws IllegalActionException
Deprecated.Return the argument quantized to a multiple of quantum given by thequantum
parameter.- Parameters:
x
- The value to quantize.- Returns:
- A quantized value.
- Throws:
IllegalActionException
- If the quantum parameter cannot be evaluated.
-
-