public interface ContinuousStepSizeController
Actors can affect the integration step size in two ways. The first one is by introducing predictable breakpoints. To request a breakpoint at time t, an actor can call the fireAt() method of ContinuousDirector with a time argument t, the director will treat t as a breakpoint. Actors that only introduce predictable breakpoints need not implement this interface. The director guarantees that no step size will be use that is large enough to step over t.
The second way of controlling step size is through checking the accuracy after each integration step. We treat an integration step as accurate if the numerical integration error is less than the error tolerance and there are no (unpredicted) breakpoints within this step. Actors that use this mechanism need to implement this interface. At the end of each integration step, each actor that implements this interface will be asked whether this step is accurate by calling its isStepSizeAccurate() method. If this method returns false, then all actors that implement this interface will be asked to suggest a refined step size (by calling refinedStepSize()). The integration step will be repeated with the smallest of these suggestions.
If all actors that implement this interface find the integration step accurate, then they will be asked for a suggested next step size (by calling suggestedStepSize()). The smallest of these suggested step sizes 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.
Modifier and Type | Method and Description |
---|---|
boolean |
isStepSizeAccurate()
Implementations of this method should return
true if the current integration step size
is sufficiently small for this actor to give accurate
results.
|
double |
refinedStepSize()
Implementations of this method should return
the suggested refined step size for restarting the current integration.
|
double |
suggestedStepSize()
Implementations of this method should return
the suggested next step size.
|
boolean isStepSizeAccurate()
double suggestedStepSize() throws IllegalActionException
IllegalActionException
- If an actor suggests an illegal step size.double refinedStepSize() throws IllegalActionException
IllegalActionException
- If the step size cannot be further refined.