
CTMultiSolverDirector |
ptolemy.domains.ct.kernel.CTMultiSolverDirector |
A CTDirector that uses multiple ODE solvers. The reason for using different
solvers is that we need to handle both normal integration of ODEs over a
time interval and abrupt changes in signals (or actors' functions) that
happen at discrete time points.
At the time points where abrupt changes happen, a special ODE solver, called
breakpointODESolver, is used. Typically, breakpointODESolver does not
advance time. The job for a breakpointODESolver is to find the states of
the system at a breakpoint. Usually, the system has more than one state at
such time points, which is also known as discontinuities. We call the first
state at a discontinuity the initial state, and the last state the
final state. Therefore, a breakpointODESolver is responsible to
resolve the final state of a discontinuity from the inputs and the initial
states.
The following paper gives a detailed explanation of initial and final states
and how the initial and final states are resolved.
This director handles both predictable breakpoints, whose appearance can be
assured before reaching the time points they happen, and unpredictable
breakpoints, whose appearance is unknown before the simulation passes the
time points they happen.
This director can only be a top-level director. For a CT model as
an opaque composite actor inside another model, use
CTMixedSignalDirector (if the outer model is a discrete-event
model) or CTEmbeddedDirector (if the outer model is a CT model or a Modal
model with a HSFSMDirector.)
This director recognizes actors that implement the CTStepSizeControlActor
interface and adjusts the step size by polling such actors. If all actors
are content with the current step size, then it attempts to raise the
step size. If any actor is not satisfied with the current step size, then
this director reduces the step size. A special case is that if there are
no CT step size control actors, then this director uses 5 times of the
current step size or the maximum step size, whichever is smaller.
This director has two more parameters than the CTDirector base class.
- ODESolver: The name of the ODE solver that is used
to integrate ODEs over a time interval.
- breakpointODESolver: The name of the ODE solver used
at breakpoints. The breakpoint ODE solvers do not need history information
(this property is called self-start). Currently, there is only one such
solver available,
ptolemy.domains.ct.kernel.solver.DerivativeResolver.
Author(s): Jie Liu, Haiyang Zheng
Version:$Id: CTMultiSolverDirector.java,v 1.196 2006/05/11 00:30:41 hyzheng Exp $
Pt.Proposed Rating:Yellow (hyzheng)
Pt.Accepted Rating:Red (hyzheng)
breakpointODESolver
The class name of the ODE solver that is used in the breakpoint
iterations. The default value is a string:
"ptolemy.domains.ct.kernel.solver.DerivativeResolver".
ODESolver
The class name of the normal ODE solver used in iterations for
normal integration. The default value is a string:
"ptolemy.domains.ct.kernel.solver.ExplicitRK23Solver".