|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for actors that controls integration step sizes for handling unpredictable breakpoints or controlling numerical error. Typically, the actors that implement this interface are dynamic actors and event detectors.
Actors can affect the integration step size in two ways. The first one is by introducing predictable breakpoints. When the fireAt() method of the 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 the accuracy checking after each integration step. Accuracy, in this context, means that the numerical integration error is less than the error tolerance and there is no (unpredictable) breakpoints within this step. Actors that uses this mechanism need to implement this interface. At the end of each integration step, each CTStepSizeControlActors will be asked whether this step is accurate by calling their isThisStepAccurate() method. If it returns false, that actor will then be asked to suggest a refined step size. If there are more than one actors find that this step is not accurate, then the smallest of the suggested step 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 default the 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 (yuhong) |
| Green (liuj) |
| Field Summary |
| Fields inherited from interface ptolemy.actor.Executable |
COMPLETED, NOT_READY, STOP_ITERATING |
| Method Summary | |
boolean |
isThisStepAccurate()
Implementations of this method should return true if the current integration step is accurate from this actor's point of view. |
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 step. |
| Methods inherited from interface ptolemy.actor.Actor |
getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, newReceiver, outputPortList |
| Methods inherited from interface ptolemy.actor.Executable |
fire, initialize, iterate, postfire, prefire, preinitialize, stop, stopFire, terminate, wrapup |
| Method Detail |
public boolean isThisStepAccurate()
public double predictedStepSize()
public double refinedStepSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||