ptolemy.domains.ct.kernel.solver
Class ForwardEulerSolver
java.lang.Object
ptolemy.kernel.util.NamedObj
ptolemy.domains.ct.kernel.ODESolver
ptolemy.domains.ct.kernel.solver.FixedStepSolver
ptolemy.domains.ct.kernel.solver.ForwardEulerSolver
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Changeable, Debuggable, DebugListener, Derivable, ModelErrorHandler, MoMLExportable, Moveable, Nameable
public class ForwardEulerSolver
- extends FixedStepSolver
The Forward Euler ODE solver. For ODE
dx/dt = f(x, u, t), x(0) = x0;
The Forward Euler method approximates the x(t+h) as:
x(t+h) = x(t) + h * f(x(t), u(t), t)
No error control and step size control is performed. This is the
simplest algorithm for solving an ODE. It is a first order method,
and has stability problem for some systems.
- Since:
- Ptolemy II 0.2
- Version:
- $Id: ForwardEulerSolver.java 57040 2010-01-27 20:52:32Z cxh $
- Author:
- Jie Liu, Haiyang Zheng
- See Also:
- Serialized Form
- Accepted Rating:
- Proposed Rating:
Fields inherited from class ptolemy.kernel.util.NamedObj |
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Methods inherited from class ptolemy.kernel.util.NamedObj |
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _debug, _debug, _debug, _debug, _debug, _description, _exportMoMLContents, _getContainedObject, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _propagateExistence, _propagateValue, _recordDecoratedAttributes, _removeAttribute, _splitName, _stripNumericSuffix, _validateSettables, addChangeListener, addDebugListener, attributeChanged, attributeList, attributeList, attributeTypeChanged, clone, 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, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setName, setPersistent, setSource, sortContainedObjects, toplevel, toString, uniqueName, validateSettables, workspace |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
_DEFAULT_NAME
private static final java.lang.String _DEFAULT_NAME
- See Also:
- Constant Field Values
ForwardEulerSolver
public ForwardEulerSolver()
- 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_Forward_Euler_Solver".
ForwardEulerSolver
public ForwardEulerSolver(Workspace workspace)
- Construct a solver in the given workspace.
If the workspace argument is null, use the default workspace.
The director is added to the list of objects in the workspace.
The name of the solver is set to "CT_Forward_Euler_Solver".
Increment the version number of the workspace.
- Parameters:
workspace
- Object for synchronization and version tracking
integratorFire
public void integratorFire(CTBaseIntegrator integrator)
throws IllegalActionException
- Fire the integrator to resolve states.
- Specified by:
integratorFire
in class ODESolver
- Parameters:
integrator
- The integrator to be fired.
- Throws:
IllegalActionException
- If there is no director, or can not
read input, or can not send output.