|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CTStepSizeControlActor
Interface for actors that control integration step sizes for handling unpredictable breakpoints or controlling local truncation error when resolving states. Typically, actors that implement this interface are event detectors and dynamic actors.
Actors can affect the integration step size in two ways. The first one is by introducing predictable breakpoints. For example, when the fireAt() method of CTDirector is called with an argument t, the CTDirector will treat t as a breakpoint. Actors that only introduce predictable breakpoints need not implement this interface.
The second way of controlling step size is through checking the accuracy after each integration step. We treat an integration step accurate if the numerical integration error is less than the error tolerance and there is no (unpredictable) breakpoints within this step. Actors that use this mechanism need to implement this interface. At the end of each integration step, each CTStepSizeControlActor will be asked whether this step is accurate by calling its isOutputAccurate() or isStateAccurate() method. If either method returns false, that actor will then be asked to suggest a refined step size. If there are more than one actor finds that this step is not accurate, then the smallest of the suggested steps size will be used by the director to restart the integration step.
If all step size control actors find the integration step accurate, then they will be asked for a (predicted) next step size. The smallest predicted next step size will be used for the next integration step.
If there are no step size control actors in a model, the step size is controlled by the director. Most (or possibly all) CT directors will leave the default step size at its initial value and only deviate from these steps when there is a predictable breakpoint that does not coincide with one of these steps.
Green (hyzheng) |
Green (hyzheng) |
Field Summary |
---|
Fields inherited from interface ptolemy.actor.Executable |
---|
COMPLETED, NOT_READY, STOP_ITERATING |
Method Summary | |
---|---|
boolean |
isOutputAccurate()
Implementations of this method should return true if this actor declares the current integration step is accurate w.r.t. its output values. |
boolean |
isStateAccurate()
Implementations of this method should return true if this actor declares the current integration step is accurate w.r.t. its current states. |
double |
predictedStepSize()
Implementations of this method should return the predicted next step size. |
double |
refinedStepSize()
Implementations of this method should return the refined step size for restarting the current integration. |
Methods inherited from interface ptolemy.actor.Actor |
---|
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList |
Methods inherited from interface ptolemy.actor.Executable |
---|
fire, isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate |
Methods inherited from interface ptolemy.actor.Initializable |
---|
addInitializable, initialize, preinitialize, removeInitializable, wrapup |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getContainer, getDisplayName, getFullName, getName, getName, setName |
Method Detail |
---|
boolean isOutputAccurate()
boolean isStateAccurate()
double predictedStepSize()
double refinedStepSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |