org.simulator.math.odes Interface DESSolver

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:

public interface DESSolver
extends java.io.Serializable

A DESSolver provides algorithm for the numerical simulation of given DESystems.

Since:
0.9
Version:
\$Rev: 146 \$
Author:
Andreas Dräger

Method Summary
DESSolver clone()

void firePropertyChange(double oldValue, double newValue)
Tell each listener that property value changed.
double getStepSize()
Obtain the currently set integration step size.
boolean isIncludeIntermediates()
If this method returns true, intermediate results that may originate from a RichDESystem are included into the MultiTable that contains the result of a numerical integration.
boolean isUnstable()
Method to check whether the solution of the numerical integration procedure contains Double.NaN values.
void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
remove PropertyChangedListener to this Solver
void setIncludeIntermediates(boolean includeIntermediates)
Allows switching whether or not intermediate results should be included into the MultiTable of the result.
void setStepSize(double stepSize)
Set the integration step size.
MultiTable solve(DESystem DES, double[] initialvalue, double[] timepoints)
Solves the given differential equation system with the step size h and the number of steps as given starting at the value x.
MultiTable solve(DESystem DES, double[] initialValues, double timeBegin, double timeEnd)
Solves the given differential equation system
MultiTable solve(DESystem DES, double[] initalValues, double x, double h, int steps)
Solves the given differential equation system with the step size h and the number of steps as given starting at the value x.
MultiTable solve(DESystem DES, MultiTable.Block timeSeriesInitConditions, double[] initialValues)
Solves the given DESystem using new initial conditions in each time step.

Method Detail

Parameters:
listener -

clone

DESSolver clone()
Returns:
the cloned solver

firePropertyChange

void firePropertyChange(double oldValue,
double newValue)
Tell each listener that property value changed. OldValue and newValue are the old and current time poit of simulation, respectively.

Parameters:
oldValue -
newValue -

getStepSize

double getStepSize()
Obtain the currently set integration step size.

Returns:
the step size

isIncludeIntermediates

boolean isIncludeIntermediates()
If this method returns true, intermediate results that may originate from a RichDESystem are included into the MultiTable that contains the result of a numerical integration.

Returns:
the flag

isUnstable

boolean isUnstable()
Method to check whether the solution of the numerical integration procedure contains Double.NaN values.

Returns:
the unstable flag

removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
remove PropertyChangedListener to this Solver

Parameters:
listener -

setIncludeIntermediates

void setIncludeIntermediates(boolean includeIntermediates)
Allows switching whether or not intermediate results should be included into the MultiTable of the result.

Parameters:
includeIntermediates - if true, intermediate results are included into the result.

setStepSize

void setStepSize(double stepSize)
Set the integration step size.

Parameters:
stepSize -

solve

MultiTable solve(DESystem DES,
double[] initialValues,
double timeBegin,
double timeEnd)
throws org.apache.commons.math.ode.DerivativeException
Solves the given differential equation system

Parameters:
DES - The differential equation system to be solved.
initialValues - Return value at the start point.
timeBegin -
timeEnd -
Returns:
A matrix containing the simulation results
Throws:
org.apache.commons.math.ode.DerivativeException - if something's wrong...

solve

MultiTable solve(DESystem DES,
double[] initalValues,
double x,
double h,
int steps)
throws org.apache.commons.math.ode.DerivativeException
Solves the given differential equation system with the step size h and the number of steps as given starting at the value x.

Parameters:
DES - The differential equation system to be solved.
initialValues - Return value at the start point.
x - Start argument.
h - Step size.
steps - Number of steps.
Returns:
A matrix containing the values of x, x + h, x + h + steps/h... in the rows and the columns contain the return values for the arguments.
Throws:
org.apache.commons.math.ode.DerivativeException - if something's wrong...

solve

MultiTable solve(DESystem DES,
double[] initialvalue,
double[] timepoints)
throws org.apache.commons.math.ode.DerivativeException
Solves the given differential equation system with the step size h and the number of steps as given starting at the value x.

Parameters:
DES - The differential equation system to be solved.
initialValues - Return value at the start point.
timepoints - The timepoints for which the result should be returned
Returns:
A matrix containing the simulation results.
Throws:
org.apache.commons.math.ode.DerivativeException - if something's wrong...

solve

MultiTable solve(DESystem DES,
MultiTable.Block timeSeriesInitConditions,
double[] initialValues)
throws org.apache.commons.math.ode.DerivativeException
Solves the given DESystem using new initial conditions in each time step. The given MultiTable contains the expected solution of the solver at certain time points. The solver has the task to re-initialize the integration procedure in each given time point using the initial values from this state.

Parameters:
DES - The DESystem to be simulated.
timeSeriesInitConditions - A time series of initial conditions for each time point. In some cases the dimension of the given DESystem may exceed the number of columns in this given time-series. Thus, for the initialization of the simulation a full vector of initial values is required and must be passed to this method as a separate double array.
initialValues - An array of all initial values. This array may exceed the number of columns in the given MultiTable.Block but its length must equal the dimension of the given DESystem.
Returns:
A new MultiTable containing a time series of the same dimension as given by the DESystem and simulated values at each time point.
Throws:
org.apache.commons.math.ode.DerivativeException