Package org.ptolemy.qss.solver
Class QSS3Fd
- java.lang.Object
-
- org.ptolemy.qss.solver.QSSBase
-
- org.ptolemy.qss.solver.QSS3Fd
-
public final class QSS3Fd extends QSSBase
Implement the QSS3 method for solving ordinary differential equations.Fd: When handling a rate-event, select the time at which to estimate the second derivative for the internal, continuous state model using a standard finite-difference perturbation procedure.
- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- David M. Lorenzetti, Contributor: Thierry S. Nouidui
- Pt.AcceptedRating:
- red (reviewmoderator) // FIXME: Fill in.
- Pt.ProposedRating:
- red (dmlorenzetti)
-
-
Field Summary
-
Fields inherited from class org.ptolemy.qss.solver.QSSBase
_cStateModels, _currSimTime, _derivFcn, _dqs, _evtIndCt, _exactInputs, _ivCt, _ivModels, _qStateModels, _quantEvtTimeMax, _stateCt
-
-
Constructor Summary
Constructors Constructor Description QSS3Fd()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
_initializeWorker()
Initialize object fields (QSS-specific).protected Time
_predictQuantizationEventTimeWorker(int stateIdx, Time quantEvtTimeMax)
Get the predicted quantization-event time for a state (QSS-specific).protected void
_triggerQuantizationEventWorker(int stateIdx)
Form a new external, quantized state model (QSS-specific).protected void
_triggerRateEventWorker()
Form new internal, continuous state models (QSS-specific).protected void
_triggerRateEventWorkerEventDetection()
Form new internal, continuous state models (QSS-specific).int
getStateModelOrder()
Get the order of the external, quantized state models exposed by the integrator.-
Methods inherited from class org.ptolemy.qss.solver.QSSBase
_predictQuantizationEventDeltaTimeQSS2General, _predictQuantizationEventDeltaTimeQSS2QFromC, _predictQuantizationEventDeltaTimeQSS3General, _predictQuantizationEventDeltaTimeQSS3QFromC, advanceToTime, evaluateStateModel, evaluateStateModelContinuous, findQuantum, getCurrentSimulationTime, getEventIndicatorCount, getExactInputs, getInputVariableCount, getInputVariableModel, getStateCount, getStateModel, initialize, initializeDerivativeFunction, initializeDerivativeFunction, initializeSimulationTime, minimumTime, needInputVariableModelIndex, needQuantizationEventIndex, needQuantizationEventIndexes, needRateEvent, predictQuantizationEventTime, predictQuantizationEventTimeEarliest, predictQuantizationEventTimeEarliest, setCurrentSimulationTime, setExactInputs, setInputVariableModel, setNumberOfEventIndicators, setQuantizationEventTimeMaximum, setQuantizationTolerance, setQuantizationTolerances, setStateValue, stepToTime, stepToTime, stringifyStateModel, stringifyStateModelContinuous, triggerQuantizationEvent, triggerQuantizationEvents, triggerRateEvent, triggerRateEvent, validate
-
-
-
-
Method Detail
-
getStateModelOrder
public final int getStateModelOrder()
Get the order of the external, quantized state models exposed by the integrator.- Specified by:
getStateModelOrder
in classQSSBase
- Returns:
- Order of the external, quantized state models.
-
_initializeWorker
public final void _initializeWorker()
Initialize object fields (QSS-specific).- Specified by:
_initializeWorker
in classQSSBase
-
_predictQuantizationEventTimeWorker
protected final Time _predictQuantizationEventTimeWorker(int stateIdx, Time quantEvtTimeMax)
Get the predicted quantization-event time for a state (QSS-specific).- Specified by:
_predictQuantizationEventTimeWorker
in classQSSBase
- Parameters:
stateIdx
- The state index.quantEvtTimeMax
- The maximum quantization event time.- Returns:
- the predicted quantization-event time for a state (QSS-specific).
-
_triggerQuantizationEventWorker
protected final void _triggerQuantizationEventWorker(int stateIdx)
Form a new external, quantized state model (QSS-specific).- Specified by:
_triggerQuantizationEventWorker
in classQSSBase
- Parameters:
stateIdx
- The state index.
-
_triggerRateEventWorker
protected final void _triggerRateEventWorker() throws java.lang.Exception
Form new internal, continuous state models (QSS-specific).- Specified by:
_triggerRateEventWorker
in classQSSBase
- Throws:
java.lang.Exception
- If the rate event worker fails.
-
_triggerRateEventWorkerEventDetection
protected final void _triggerRateEventWorkerEventDetection() throws java.lang.Exception
Form new internal, continuous state models (QSS-specific).- Specified by:
_triggerRateEventWorkerEventDetection
in classQSSBase
- Throws:
java.lang.Exception
- If the rate event worker event detection fails.
-
-