ptolemy.domains.ct.kernel.solver
Class ImpulseBESolver

java.lang.Object
  extended byptolemy.kernel.util.NamedObj
      extended byptolemy.domains.ct.kernel.ODESolver
          extended byptolemy.domains.ct.kernel.solver.FixedStepSolver
              extended byptolemy.domains.ct.kernel.solver.BackwardEulerSolver
                  extended byptolemy.domains.ct.kernel.solver.ImpulseBESolver
All Implemented Interfaces:
BreakpointODESolver, Changeable, java.lang.Cloneable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Nameable, java.io.Serializable

public class ImpulseBESolver
extends BackwardEulerSolver
implements BreakpointODESolver

This class implements the impulse backward Euler ODE solver. This solver uses two backward Euler solving processes to handle Dirac delta functions in a CT system. The first backward Euler process use the minimum step size h, and the second backward Euler process use the negative step size, -h. That is, for ODE

   x' = f(x, t), x(0) = x0
   
This solver performs the following two steps
   x(t+h) = x(t) + h * x'(t+h)
   x(t+) = x(t+h) - h * x'(t+)
   

By using this solver, we can find the state of the system at t+, which is the time at which the impulse occurs, but the effect of the impulse is taken care of.

This ODE solver does not advance time. So it can only be used as a breakpoint solver.

Since:
Ptolemy II 0.2
Version:
$Id: ImpulseBESolver.java,v 1.41 2004/04/13 05:12:51 cxh Exp $
Author:
Jie Liu
See Also:
Serialized Form
Accepted Rating:
Yellow (liuxj)
Proposed Rating:
Yellow (liuj)

Nested Class Summary
 
Nested classes inherited from class ptolemy.kernel.util.NamedObj
NamedObj.ContainedObjectsIterator
 
Field Summary
 
Fields inherited from class ptolemy.kernel.util.NamedObj
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
 
Constructor Summary
ImpulseBESolver()
          Construct a solver in the default workspace with an empty string as name.
ImpulseBESolver(Workspace workspace)
          Construct a solver in the given workspace.
 
Method Summary
 boolean resolveStates()
          Perform two successive backward Euler ODE solving processes, with step size h and -h, respectively, where h is the minimum step size.
 
Methods inherited from class ptolemy.domains.ct.kernel.solver.BackwardEulerSolver
_isConverged, _setConvergence, _voteForConvergence, getHistoryCapacityRequirement, getIntegratorAuxVariableCount, integratorFire
 
Methods inherited from class ptolemy.domains.ct.kernel.solver.FixedStepSolver
integratorIsAccurate, integratorPredictedStepSize
 
Methods inherited from class ptolemy.domains.ct.kernel.ODESolver
_makeSolverOf, _prefireIfNecessary, getContainer, getRound, incrementRound, resetRound
 
Methods inherited from class ptolemy.kernel.util.NamedObj
_addAttribute, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _description, _exportMoMLContents, _getContainedObject, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateExistence, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, clone, containedObjectsIterator, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoML, getAttribute, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getElementName, getFullName, getModelErrorHandler, getName, getName, getPrototypeList, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setModelErrorHandler, setName, setPersistent, setSource, toplevel, toString, uniqueName, validateSettables, workspace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImpulseBESolver

public ImpulseBESolver()
Construct a solver in the default workspace with an empty string as name. The solver is added to the list of objects in the workspace. Increment the version number of the workspace. The name of the solver is set to "CT_ImpulseBE_Solver".


ImpulseBESolver

public ImpulseBESolver(Workspace workspace)
Construct a solver in the given workspace. If the workspace argument is null, use the default workspace. The solver is added to the list of objects in the workspace. Increment the version number of the workspace. The name of the solver is set to "CT_ImpulseBE_Solver".

Parameters:
workspace - Object for synchronization and version tracking
Method Detail

resolveStates

public boolean resolveStates()
                      throws IllegalActionException
Perform two successive backward Euler ODE solving processes, with step size h and -h, respectively, where h is the minimum step size. Note that the state of the dynamic actors are updated after the first Backward Euler solving process. This is OK, since we have already used the minimum step size. This method does not update the states after the second Backward Euler solving process, so the director that uses this solver should do it.

Overrides:
resolveStates in class BackwardEulerSolver
Returns:
True if the state is successfully resolved.
Throws:
IllegalActionException - If it is thrown by the resolveStates() method of the BackwardEulerSolver.resolveState().
See Also:
BackwardEulerSolver.resolveStates()