ptolemy.domains.ct.kernel
Class CTDirector

java.lang.Object
  extended by ptolemy.kernel.util.NamedObj
      extended by ptolemy.kernel.util.Attribute
          extended by ptolemy.actor.Director
              extended by ptolemy.actor.sched.StaticSchedulingDirector
                  extended by ptolemy.domains.ct.kernel.CTDirector
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Executable, Initializable, TimedDirector, CTGeneralDirector, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
Direct Known Subclasses:
CTMultiSolverDirector

public abstract class CTDirector
extends StaticSchedulingDirector
implements TimedDirector, CTGeneralDirector

Abstract base class for directors in the CT domain. A CTDirector has a CTScheduler which provides static schedules for firing the actors in different phases of execution in one iteration.

A CTDirector may have more than one ODE solver. In each phase of execution, one ODE solver takes charge of solving the behavior of a model. This solver is called the current ODE solver.

The continuous time (CT) domain is a timed domain. There is a global notion of time that all the actors are aware of. Time is maintained by the director. The method getModelTime() returns the current notion of model time. Time can be set by the setModelTime() method, but this method should not the called by the actors. Time can only be set by directors or their ODE solvers. Because ODE solvers can change time in their fire() methods, we need to record the beginning time of an iteration to support roll back. The _setIterationBeginTime() method is just designed for this purpose. It is called in the prefire() method of each iteration to store the beginning time, and the getIterationBeginTime() returns the lastest stored time.

This base class maintains a list of parameters that may be used by ODE solvers and actors. These parameters are:

  • startTime: The start time of the simulation. This parameter is effective only if the director is at the top level. The default value is 0.0.
  • stopTime: The stop time of the simulation. This parameter is effective only if the director is at the top level. The default value is Infinity, which results in execution that does not stop on its own.
  • initStepSize: The suggested integration step size by the user. This will be the step size for fixed step size ODE solvers if there is no breakpoint. However, it is just a hint. The default value is 0.1
  • minStepSize: The minimum step size that users want to use in the simulation. The default value is 1e-5.
  • maxStepSize: The maximum step size that users want to use in the simulation. Usually used to control the simulation speed. The default value is 1.0.
  • maxIterations: Used only in implicit ODE solvers. This is the maximum number of iterations for finding the fixed point at one time point. The default value is 20.
  • errorTolerance: This is the local truncation error tolerance, used for controlling the integration accuracy in variable step size ODE solvers. If the local truncation error at some step size control actors are greater than this tolerance, then the integration step is considered to have failed, and should be restarted with a reduced step size. The default value is 1e-4.
  • valueResolution: This is used to control the convergence of fixed point iterations. If in two successive iterations the difference of the state variables is less than this resolution, then the fixed point is considered to have reached. The default value is 1e-6.

    This director maintains a breakpoint table to record all predictable breakpoints that are greater than or equal to the current time. The breakpoints are sorted in their chronological order. Breakpoints at the same time are considered to be identical, and the breakpoint table does not contain duplicate time points. A breakpoint can be inserted into the table by calling the fireAt() method. The fireAt method may be requested by the director, which inserts the stop time of the execution. The fireAt method may also be requested by actors and the requested firing time will be inserted into the breakpoint table.

    Since:
    Ptolemy II 0.2
    Version:
    $Id: CTDirector.java 57046 2010-01-27 23:35:53Z cxh $
    Author:
    Jie Liu, Haiyang Zheng
    See Also:
    Serialized Form
    Accepted Rating:
    Green (hyzheng)
    Proposed Rating:
    Green (hyzheng)

    Nested Class Summary
     
    Nested classes/interfaces inherited from class ptolemy.kernel.util.NamedObj
    NamedObj.ContainedObjectsIterator
     
    Field Summary
    private  TotallyOrderedSet _breakpoints
               
    private  ODESolver _currentSolver
               
    private  double _currentStepSize
               
    private  boolean _discretePhase
               
    private  double _errorTolerance
               
    private  CTExecutionPhase _executionPhase
               
    private  double _initStepSize
               
    private  Time _iterationBeginTime
               
    private  int _maxIterations
               
    private  double _maxStepSize
               
    private  double _minStepSize
               
    private  java.util.Set _prefiredActors
               
    private  Time _startTime
               
    private  double _startTimeValue
               
    private  Time _stopTime
               
    private  double _stopTimeValue
               
    private  double _suggestedNextStepSize
               
    protected  long _timeBase
              The real starting time in term of system millisecond counts.
    private  double _valueResolution
               
     Parameter errorTolerance
              Error tolerance for local truncation error control, only effective in variable step size methods.
     Parameter initStepSize
              User's hint for the initial integration step size.
     Parameter maxIterations
              The maximum number of iterations in looking for a fixed point.
     Parameter maxStepSize
              User's guide for the maximum integration step size.
     Parameter minStepSize
              User's guide for the minimum integration step size.
     Parameter startTime
              Starting time of the simulation.
     Parameter stopTime
              Stop time of the simulation.
     Parameter synchronizeToRealTime
              Indicator whether the execution will synchronize to real time.
     Parameter valueResolution
              Value resolution in looking for a fixed-point state resolution.
     
    Fields inherited from class ptolemy.actor.sched.StaticSchedulingDirector
    _postfireReturns
     
    Fields inherited from class ptolemy.actor.Director
    _actorsFinishedExecution, _currentTime, _finishRequested, _initializables, _stopRequested, timeResolution
     
    Fields inherited from class ptolemy.kernel.util.NamedObj
    _changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
     
    Fields inherited from interface ptolemy.actor.Executable
    COMPLETED, NOT_READY, STOP_ITERATING
     
    Constructor Summary
    CTDirector()
              Construct a director in the default workspace with an empty string as its name.
    CTDirector(CompositeEntity container, java.lang.String name)
              Construct a director in the given container with the given name.
    CTDirector(Workspace workspace)
              Construct a director in the workspace with an empty name.
     
    Method Summary
    private  void _initializeLocalVariables()
               
    protected  void _initParameters()
              Create and initialize all parameters to their default values.
    protected  ODESolver _instantiateODESolver(java.lang.String className)
              Instantiate an ODESolver from its classname.
    protected  void _setCurrentODESolver(ODESolver solver)
              Set the current ODE solver to be the given ODE solver.
    protected  void _setDiscretePhase(boolean discrete)
              Set the current phase of execution as a discrete phase.
    protected  void _setExecutionPhase(CTExecutionPhase phase)
              Set the execution phase to the given phase.
    protected  void _setIterationBeginTime(Time time)
              Set the iteration begin time.
     void attributeChanged(Attribute attribute)
              React to a change in an attribute.
    abstract  boolean canBeInsideDirector()
              Return true if the director can be an inside director, i.e.
    abstract  boolean canBeTopLevelDirector()
              Return true if the director can be a top-level director.
     java.lang.Object clone(Workspace workspace)
              Clone the object into the specified workspace.
     Dependency delayDependency(double delay)
              Return a boolean dependency representing a model-time delay of the specified amount.
    abstract  void fire()
              Override the fire() method of the super class.
     Time fireAt(Actor actor, Time time)
              Handle firing requests from the contained actors.
     TotallyOrderedSet getBreakPoints()
              Return the breakpoint table.
     ODESolver getCurrentODESolver()
              Return the current ODE solver used to resolve states by the director.
     double getCurrentStepSize()
              Return the current integration step size.
     double getErrorTolerance()
              Return the local truncation error tolerance, used by variable step size solvers.
     CTExecutionPhase getExecutionPhase()
              Get the current execution phase of this director.
     double getInitialStepSize()
              Return the initial step size.
     Time getIterationBeginTime()
              Return the begin time of the current iteration.
     int getMaxIterations()
              Return the maximum number of iterations in a fixed point calculation.
     double getMaxStepSize()
              Return the maximum step size used in variable step size ODE solvers.
     double getMinStepSize()
              Return the minimum step size used in variable step size ODE solvers.
     Time getModelNextIterationTime()
              Return the current iteration begin time plus the current step size.
     Time getModelStartTime()
              Return the start time.
     Time getModelStopTime()
              Return the stop time.
     double getSuggestedNextStepSize()
              Return the suggested next step size.
     double getValueResolution()
              Return the value resolution, used for testing if an implicit method has reached the fixed point.
     void initialize()
              Initialize model after type resolution.
     boolean isDiscretePhase()
              Return true if this is the discrete phase of execution.
     Receiver newReceiver()
              Return a new CTReceiver.
     boolean postfire()
              If the stop() method has not been called and all the actors return true at postfire, return true.
     void prefireClear()
              Clear the set of actors that have been prefired.
     boolean prefireDynamicActors()
              Invoke prefire() on all DYNAMIC_ACTORS, such as integrators, and emit their current states.
     void preinitialize()
              Preinitialize the model for an execution.
     void setCurrentStepSize(double stepSize)
              Set the current step size.
     void setSuggestedNextStepSize(double stepsize)
              Set the suggested next step size.
     java.lang.String[] suggestedModalModelDirectors()
              Return an array of suggested ModalModel directors to use with CTDirector.
     
    Methods inherited from class ptolemy.actor.sched.StaticSchedulingDirector
    _setScheduler, addDebugListener, getScheduler, invalidateSchedule, isScheduleValid, prefire, removeDebugListener, setScheduler
     
    Methods inherited from class ptolemy.actor.Director
    _description, _fireContainerAt, _isEmbedded, _isTopLevel, _transferInputs, _transferOutputs, addInitializable, createSchedule, defaultDependency, finish, fireAt, fireAtCurrentTime, getCausalityInterface, getCurrentTime, getGlobalTime, getModelTime, getNextIterationTime, getStartTime, getStopTime, getTimeResolution, implementsStrictActorSemantics, initialize, invalidateResolvedTypes, isFireFunctional, isStopRequested, isStrict, iterate, preinitialize, removeInitializable, requestInitialization, setContainer, setCurrentTime, setModelTime, stop, stopFire, supportMultirateFiring, terminate, transferInputs, transferOutputs, wrapup
     
    Methods inherited from class ptolemy.kernel.util.Attribute
    _checkContainer, _getContainedObject, _propagateExistence, getContainer, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, setName, updateContent
     
    Methods inherited from class ptolemy.kernel.util.NamedObj
    _addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _exportMoMLContents, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, attributeList, attributeList, attributeTypeChanged, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace
     
    Methods inherited from class java.lang.Object
    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     
    Methods inherited from interface ptolemy.actor.TimedDirector
    getModelTime, getTimeResolution
     
    Methods inherited from interface ptolemy.domains.ct.kernel.CTGeneralDirector
    getExecutiveCTGeneralDirector, getODESolverClassName
     

    Field Detail

    errorTolerance

    public Parameter errorTolerance
    Error tolerance for local truncation error control, only effective in variable step size methods. The default value is 1e-4, and the type is double.


    initStepSize

    public Parameter initStepSize
    User's hint for the initial integration step size. The default value is 0.1, and the type is double.


    maxIterations

    public Parameter maxIterations
    The maximum number of iterations in looking for a fixed point. The default value is 20, and the type is int.


    maxStepSize

    public Parameter maxStepSize
    User's guide for the maximum integration step size. The default value is 1.0, and the type is double.


    minStepSize

    public Parameter minStepSize
    User's guide for the minimum integration step size. The default value is 1e-5, and the type is double.


    startTime

    public Parameter startTime
    Starting time of the simulation. The default value is 0.0, and the type is double.


    stopTime

    public Parameter stopTime
    Stop time of the simulation. The default value is Infinity, and the type is double.


    synchronizeToRealTime

    public Parameter synchronizeToRealTime
    Indicator whether the execution will synchronize to real time. The default value is false, and the type is boolean.


    valueResolution

    public Parameter valueResolution
    Value resolution in looking for a fixed-point state resolution. The default value is 1e-6, and the type is double.


    _timeBase

    protected long _timeBase
    The real starting time in term of system millisecond counts.


    _breakpoints

    private TotallyOrderedSet _breakpoints

    _currentSolver

    private ODESolver _currentSolver

    _currentStepSize

    private double _currentStepSize

    _discretePhase

    private boolean _discretePhase

    _errorTolerance

    private double _errorTolerance

    _executionPhase

    private CTExecutionPhase _executionPhase

    _initStepSize

    private double _initStepSize

    _iterationBeginTime

    private Time _iterationBeginTime

    _maxIterations

    private int _maxIterations

    _maxStepSize

    private double _maxStepSize

    _minStepSize

    private double _minStepSize

    _prefiredActors

    private java.util.Set _prefiredActors

    _startTime

    private Time _startTime

    _startTimeValue

    private double _startTimeValue

    _stopTime

    private Time _stopTime

    _stopTimeValue

    private double _stopTimeValue

    _suggestedNextStepSize

    private double _suggestedNextStepSize

    _valueResolution

    private double _valueResolution
    Constructor Detail

    CTDirector

    public CTDirector()
    Construct a director in the default workspace with an empty string as its name. The director is added to the list of objects in the workspace. Increment the version number of the workspace. All the parameters take their default values. A CTScheduler is created.


    CTDirector

    public CTDirector(CompositeEntity container,
                      java.lang.String name)
               throws IllegalActionException,
                      NameDuplicationException
    Construct a director in the given container with the given name. The container argument must not be null, or a NullPointerException will be thrown. If the name argument is null, then the name is set to the empty string. All the parameters take their default values. A CTScheduler is created.

    Parameters:
    container - The container.
    name - Name of this director.
    Throws:
    IllegalActionException - If the director is not compatible with the specified container. May be thrown by a derived class.
    NameDuplicationException - If the name collides with a property in the container.

    CTDirector

    public CTDirector(Workspace workspace)
    Construct a director in the workspace with an empty name. If the argument is null, then the default workspace will be used. The director is added to the list of objects in the workspace. Increment the version number of the workspace. All the parameters take their default values. A CTScheduler is created.

    Parameters:
    workspace - The workspace of this object.
    Method Detail

    attributeChanged

    public void attributeChanged(Attribute attribute)
                          throws IllegalActionException
    React to a change in an attribute. If the changed attribute matches a parameter of the director, then the corresponding local copy of the parameter value will be updated.

    Overrides:
    attributeChanged in class Director
    Parameters:
    attribute - The changed parameter.
    Throws:
    IllegalActionException - If the new parameter value is not valid.

    canBeInsideDirector

    public abstract boolean canBeInsideDirector()
    Return true if the director can be an inside director, i.e. a director of an opaque composite actor not at the top level. This method is abstract in this class and derived classes need to override this to show whether it can serve as an inside director.

    Returns:
    True if this director can be an inside director.

    canBeTopLevelDirector

    public abstract boolean canBeTopLevelDirector()
    Return true if the director can be a top-level director. This method is abstract in this class and derived classes need to override this to show whether it can serve as a top-level director.

    Returns:
    True if this director can be a top-level director.

    clone

    public java.lang.Object clone(Workspace workspace)
                           throws java.lang.CloneNotSupportedException
    Clone the object into the specified workspace. The new object is not added to the directory of that workspace (you must do this yourself if you want it there).

    Overrides:
    clone in class StaticSchedulingDirector
    Parameters:
    workspace - The workspace for the cloned object.
    Returns:
    The new Attribute.
    Throws:
    java.lang.CloneNotSupportedException - Not thrown in this base class
    See Also:
    NamedObj.exportMoML(Writer, int, String), NamedObj.setDeferringChangeRequests(boolean)

    delayDependency

    public Dependency delayDependency(double delay)
    Return a boolean dependency representing a model-time delay of the specified amount.

    Specified by:
    delayDependency in interface TimedDirector
    Parameters:
    delay - A non-negative delay.
    Returns:
    A boolean dependency representing a delay.

    fire

    public abstract void fire()
                       throws IllegalActionException
    Override the fire() method of the super class. This method is abstract in this abstract base class. The derived classes need to override this method for concrete implementation.

    Specified by:
    fire in interface Executable
    Overrides:
    fire in class StaticSchedulingDirector
    Throws:
    IllegalActionException - If any actor executed by this actor return false in prefire.

    fireAt

    public Time fireAt(Actor actor,
                       Time time)
                throws IllegalActionException
    Handle firing requests from the contained actors. If the specified time is earlier than the current time, or the breakpoint table is null, throw an exception. Otherwise, insert the specified time into the breakpoint table.

    Overrides:
    fireAt in class Director
    Parameters:
    actor - The actor that requests the firing.
    time - The requested firing time.
    Returns:
    The time at which the actor passed as an argument will be fired.
    Throws:
    IllegalActionException - If the time is earlier than the current time, or the breakpoint table is null.
    See Also:
    Director.fireAtCurrentTime(Actor)

    getBreakPoints

    public final TotallyOrderedSet getBreakPoints()
    Return the breakpoint table. The result can be null if the breakpoint table has never been created.

    Returns:
    The breakpoint table.

    getCurrentODESolver

    public final ODESolver getCurrentODESolver()
    Return the current ODE solver used to resolve states by the director.

    Returns:
    The current ODE solver used to resolve states by the director.

    getCurrentStepSize

    public double getCurrentStepSize()
    Return the current integration step size.

    Specified by:
    getCurrentStepSize in interface CTGeneralDirector
    Returns:
    The current integration step size.
    See Also:
    setCurrentStepSize(double)

    getErrorTolerance

    public double getErrorTolerance()
    Return the local truncation error tolerance, used by variable step size solvers.

    Specified by:
    getErrorTolerance in interface CTGeneralDirector
    Overrides:
    getErrorTolerance in class Director
    Returns:
    The local truncation error tolerance.

    getExecutionPhase

    public CTExecutionPhase getExecutionPhase()
    Get the current execution phase of this director. In this abstract class, always return the local execution phase. The derived classes, specially the CTEmbeddedDirector, needs to override this method.

    Specified by:
    getExecutionPhase in interface CTGeneralDirector
    Returns:
    The current execution phase of this director.

    getInitialStepSize

    public final double getInitialStepSize()
    Return the initial step size.

    Returns:
    The initial step size.

    getIterationBeginTime

    public Time getIterationBeginTime()
    Return the begin time of the current iteration.

    Specified by:
    getIterationBeginTime in interface CTGeneralDirector
    Returns:
    The begin time of the current iteration.

    getMaxIterations

    public final int getMaxIterations()
    Return the maximum number of iterations in a fixed point calculation. If the iteration has exceeded this number and the fixed point is still not found, then the algorithm is considered to have failed.

    Returns:
    The maximum number of iterations when calculating fixed points.

    getMaxStepSize

    public final double getMaxStepSize()
    Return the maximum step size used in variable step size ODE solvers.

    Returns:
    The maximum step size.

    getMinStepSize

    public final double getMinStepSize()
    Return the minimum step size used in variable step size ODE solvers.

    Returns:
    The minimum step size.

    getModelNextIterationTime

    public Time getModelNextIterationTime()
    Return the current iteration begin time plus the current step size.

    Overrides:
    getModelNextIterationTime in class Director
    Returns:
    The iteration begin time plus the current step size.
    See Also:
    Director.getModelTime()

    getModelStartTime

    public final Time getModelStartTime()
    Return the start time.

    Overrides:
    getModelStartTime in class Director
    Returns:
    the start time.

    getModelStopTime

    public final Time getModelStopTime()
    Return the stop time.

    Overrides:
    getModelStopTime in class Director
    Returns:
    the stop time.

    getSuggestedNextStepSize

    public final double getSuggestedNextStepSize()
    Return the suggested next step size. The suggested step size is the minimum step size that all the step-size-control actors suggested at the end of last integration step. It is the prediction of the new step size.

    Returns:
    The suggested next step size.
    See Also:
    setSuggestedNextStepSize(double)

    getValueResolution

    public final double getValueResolution()
    Return the value resolution, used for testing if an implicit method has reached the fixed point. Two values that are differed less than this accuracy are considered identical in the fixed-point calculation.

    Returns:
    The value resolution for finding fixed point.

    initialize

    public void initialize()
                    throws IllegalActionException
    Initialize model after type resolution. In addition to calling the initialize() method of the super class, this method records the current system time as the "real" starting time of the execution. This starting time is used when the execution is synchronized to real time. This method also resets the protected variables of this director.

    Specified by:
    initialize in interface Initializable
    Overrides:
    initialize in class Director
    Throws:
    IllegalActionException - If the super class throws it.

    isDiscretePhase

    public boolean isDiscretePhase()
    Return true if this is the discrete phase of execution.

    Specified by:
    isDiscretePhase in interface CTGeneralDirector
    Returns:
    True if this is the discrete phase of execution.

    newReceiver

    public Receiver newReceiver()
    Return a new CTReceiver.

    Overrides:
    newReceiver in class Director
    Returns:
    A new CTReceiver.

    postfire

    public boolean postfire()
                     throws IllegalActionException
    If the stop() method has not been called and all the actors return true at postfire, return true. Otherwise, return false. If this director is not at the top level and the breakpoint table is not empty, request a refiring at the first breakpoint.

    Specified by:
    postfire in interface Executable
    Overrides:
    postfire in class StaticSchedulingDirector
    Returns:
    True if the Director wants to be fired again in the future.
    Throws:
    IllegalActionException - If refiring can not be granted.

    prefireClear

    public void prefireClear()
    Clear the set of actors that have been prefired.


    prefireDynamicActors

    public boolean prefireDynamicActors()
                                 throws IllegalActionException
    Invoke prefire() on all DYNAMIC_ACTORS, such as integrators, and emit their current states. Return true if all the prefire() methods return true and stop() is not called. Otherwise, return false.

    Returns:
    True if all dynamic actors return true from their prefire() methods and stop() is called.
    Throws:
    IllegalActionException - If scheduler throws it, or dynamic actors throw it in their prefire() method, or they can not be prefired.

    preinitialize

    public void preinitialize()
                       throws IllegalActionException
    Preinitialize the model for an execution. This method is called only once for each simulation. The schedule is invalidated, statistical variables and the breakpoint table are cleared, all actors are preinitialized. If this director does not have a container and a scheduler, or the director does not fit in this level of hierarchy, an IllegalActionException will be thrown.

    Note, however, time does not have a meaning when actors are preinitialized. So actors must not use a notion of time in their preinitialize() methods.

    Specified by:
    preinitialize in interface Initializable
    Overrides:
    preinitialize in class Director
    Throws:
    IllegalActionException - If this director has no container, or this director does not fit this level of hierarchy, or there is no scheduler.

    setCurrentStepSize

    public void setCurrentStepSize(double stepSize)
    Set the current step size. Only CT directors can call this method. Solvers and actors must not call this method.

    Parameters:
    stepSize - The step size to be set.
    See Also:
    getCurrentStepSize()

    setSuggestedNextStepSize

    public void setSuggestedNextStepSize(double stepsize)
    Set the suggested next step size. If the argument is larger than the maximum step size, then set the suggested next step size to the maximum step size.

    Parameters:
    stepsize - The suggested next step size.
    See Also:
    getSuggestedNextStepSize()

    suggestedModalModelDirectors

    public java.lang.String[] suggestedModalModelDirectors()
    Return an array of suggested ModalModel directors to use with CTDirector. The default director is HSFSMDirector, which is used in hybrid system. FSMDirector could also be used with CTDirector in some simple cases.

    Overrides:
    suggestedModalModelDirectors in class Director
    Returns:
    An array of suggested directors to be used with ModalModel.
    See Also:
    Director.suggestedModalModelDirectors()

    _initParameters

    protected void _initParameters()
    Create and initialize all parameters to their default values. This is called by the constructor.


    _instantiateODESolver

    protected final ODESolver _instantiateODESolver(java.lang.String className)
                                             throws IllegalActionException
    Instantiate an ODESolver from its classname. Given the solver's full class name, this method will try to instantiate it by looking for the corresponding java class.

    Parameters:
    className - The solver's full class name.
    Returns:
    a new ODE solver.
    Throws:
    IllegalActionException - If the solver can not be created.

    _setCurrentODESolver

    protected final void _setCurrentODESolver(ODESolver solver)
                                       throws IllegalActionException
    Set the current ODE solver to be the given ODE solver.

    Parameters:
    solver - The solver to set.
    Throws:
    IllegalActionException - Not thrown in this base class. It may be thrown by the derived classes if the solver is not appropriate.

    _setDiscretePhase

    protected final void _setDiscretePhase(boolean discrete)
    Set the current phase of execution as a discrete phase. The value set can be returned by the isDiscretePhase() method.

    Parameters:
    discrete - True if this is the discrete phase.

    _setExecutionPhase

    protected final void _setExecutionPhase(CTExecutionPhase phase)
    Set the execution phase to the given phase.

    Parameters:
    phase - The current phase of the CT director.

    _setIterationBeginTime

    protected final void _setIterationBeginTime(Time time)
    Set the iteration begin time. The iteration begin time is the start time for one integration step. This variable is used when the integration step is failed, and need to be restarted with another step size.

    Parameters:
    time - The iteration begin time.

    _initializeLocalVariables

    private void _initializeLocalVariables()
                                    throws IllegalActionException
    Throws:
    IllegalActionException