public class QSSVectorIntegrator extends TypedAtomicActor
| Red (cxh) |
| Yellow (eal) |
Entity.ContainedObjectsIterator| Modifier and Type | Field and Description |
|---|---|
(package private) boolean[] |
_firstFiring
The flag to indicate first firing.
|
(package private) boolean[] |
_inputReceived
The flag to indicate input received.
|
protected static double |
_SMALL
A small number, below which the slope is considered to be zero.
|
Parameter |
initialState
Initial value of the state.
|
protected static java.lang.String |
LS
System dependent line separator.
|
Parameter |
quantum
Quantum.
|
_typesValid_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKSCOMPLETED, NOT_READY, STOP_ITERATING| Constructor and Description |
|---|
QSSVectorIntegrator(CompositeEntity container,
java.lang.String name)
Construct a quantized-state vector integrator.
|
| Modifier and Type | Method and Description |
|---|---|
protected double[] |
_getDoubleArray(Parameter t,
int n)
Get a double array from the Parameter.
|
protected void |
_minNextCrossingTime()
Compute from the vector of nextOutputTime
the minimal time to produce the next output.
|
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,
double dq)
Return the argument quantized to a multiple of quantum given by
the
quantum parameter. |
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, declareDelayDependency, 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, workspaceequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortListisFireFunctional, iterate, prefire, stop, stopFire, terminateaddInitializable, preinitialize, removeInitializable, wrapupdescription, getContainer, getDisplayName, getFullName, getName, getName, setNamegetDerivedLevel, getDerivedList, propagateValuepublic Parameter initialState
public Parameter quantum
protected static final double _SMALL
protected static final java.lang.String LS
boolean[] _inputReceived
boolean[] _firstFiring
public QSSVectorIntegrator(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 void fire()
throws IllegalActionException
fire in interface Executablefire in class AtomicActor<TypedIOPort>IllegalActionException - If sending an output fails.public void initialize()
throws IllegalActionException
initialize in interface Initializableinitialize in class AtomicActor<TypedIOPort>IllegalActionException - If a derived class throws it.public boolean isStrict()
isStrict in interface ExecutableisStrict in class AtomicActor<TypedIOPort>public boolean postfire()
throws IllegalActionException
postfire in interface Executablepostfire in class AtomicActor<TypedIOPort>IllegalActionException - If reading inputs or parameters fails.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,
double dq)
throws IllegalActionException
quantum parameter.x - The value to quantize.dq - The quantum.IllegalActionException - If the quantum parameter cannot
be evaluated.protected void _minNextCrossingTime()
protected double[] _getDoubleArray(Parameter t, int n) throws IllegalActionException
t - the parameter which must be a type that can be converted to an ArrayTokenn - the size of the parameterIllegalActionException - if the base class throws it.