public class QSSIntegrator extends TypedAtomicActor
Red (cxh) |
Yellow (eal) |
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected static double |
_SMALL
A small number, below which the slope is considered to be zero.
|
TypedIOPort |
q
Output (the quantized state).
|
Parameter |
quantum
Quantum.
|
TypedIOPort |
u
Input (the derivative).
|
Parameter |
xInit
Initial value of the state.
|
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_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 |
---|
QSSIntegrator(CompositeEntity container,
java.lang.String name)
Construct a new instance of this integrator.
|
Modifier and Type | Method and Description |
---|---|
protected double |
_derivative(double input)
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)
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)
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)
Return the argument quantized to a multiple of quantum given by
the
quantum parameter. |
void |
declareDelayDependency()
Declare that the output does not depend on the input in a firing.
|
void |
fire()
If it is time to produce a quantized output, produce it.
|
void |
initialize()
Initialize this actor to indicate that no input has yet been provided.
|
boolean |
isStrict()
Return false, indicating that this actor can fire even if its
input is unknown.
|
boolean |
postfire()
Update the calculation of the next output time and request
a refiring at that time.
|
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_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
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, iterate, prefire, stop, stopFire, terminate
addInitializable, preinitialize, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public TypedIOPort u
public TypedIOPort q
public Parameter xInit
public Parameter quantum
protected static final double _SMALL
public QSSIntegrator(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name.IllegalActionException
- If setting up ports and parameters fails.NameDuplicationException
- If the container already contains an object with this name.public void declareDelayDependency() throws IllegalActionException
declareDelayDependency
in class AtomicActor<TypedIOPort>
IllegalActionException
- If the causality interface
cannot be computed.AtomicActor.getCausalityInterface()
public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class AtomicActor<TypedIOPort>
IllegalActionException
- If sending an output fails.public void initialize() throws IllegalActionException
initialize
in interface Initializable
initialize
in class AtomicActor<TypedIOPort>
IllegalActionException
- If a derived class throws it.public boolean isStrict()
isStrict
in interface Executable
isStrict
in class AtomicActor<TypedIOPort>
public boolean postfire() throws IllegalActionException
postfire
in interface Executable
postfire
in class AtomicActor<TypedIOPort>
IllegalActionException
- If reading inputs or parameters fails.protected double _derivative(double input)
input
- The input value.protected Time _nextCrossingTime(double slope, double start, double reference, double quantum, Time currentTime)
_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.slope
- The derivative.start
- The starting point.reference
- The reference point.quantum
- The quantum.currentTime
- The current time.protected double _nextOutputValue(double slope, double reference, double quantum)
slope
- The slope.reference
- The reference.quantum
- The quantum.protected double _quantize(double x) throws IllegalActionException
quantum
parameter.x
- The value to quantize.IllegalActionException
- If the quantum parameter cannot
be evaluated.