|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simulator.math.odes.AbstractDESSolver
public abstract class AbstractDESSolver
This Class represents an abstract solver for event-driven DES
| Field Summary | |
|---|---|
protected AbstractDESSolver |
clonedSolver
A cloned version of this object |
static String |
PROGRESS
Key used when informing listeners about progress by this solver. |
| Fields inherited from interface org.apache.commons.math.ode.events.EventHandler |
|---|
CONTINUE, RESET_DERIVATIVES, RESET_STATE, STOP |
| Constructor Summary | |
|---|---|
AbstractDESSolver()
Initialize with default integration step size and non-negative attribute true. |
|
AbstractDESSolver(AbstractDESSolver solver)
Clone constructor. |
|
AbstractDESSolver(double stepSize)
Initialize with given integration step size. |
|
AbstractDESSolver(double stepSize,
boolean nonnegative)
Initialize with given step size and a flag whether or not negative values should be allowed. |
|
| Method Summary | |
|---|---|
protected double[] |
additionalResults(DESystem DES,
double t,
double[] yTemp,
MultiTable data,
int rowIndex)
Compute additional result values |
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add PropertyChangedListener to this Solver |
abstract AbstractDESSolver |
clone()
|
abstract double[] |
computeChange(DESystem DES,
double[] y,
double t,
double stepSize,
double[] change,
boolean steadyState)
Computes the change for a given system at the current time with the current setting for the integration step size. |
double |
computeDelayedValue(double time,
String id,
DESystem DES,
double[] initialValues,
int yIndex)
Returns the value for the element with the given id at a time point in the past, where the time gives the amount of time in the past. |
protected double[] |
computeSteadyState(FastProcessDESystem DES,
double[] result,
double timeBegin)
|
int |
eventOccurred(double t,
double[] y,
boolean increasing)
|
void |
firePropertyChange(double oldValue,
double newValue)
Tell each listener that property value changed. |
double |
g(double t,
double[] y)
|
abstract String |
getName()
This gives a human-readable name of this solver that can be displayed in a graphical user interface. |
static long |
getSerialversionuid()
|
double |
getStepSize()
Obtain the currently set integration step size. |
protected abstract boolean |
hasSolverEventProcessing()
|
int |
inBetweenSteps(double lastTime,
double nextTime,
double stepSize)
Computes the number of necessary steps between two time steps. |
protected MultiTable |
initResultMatrix(DESystem DES,
double[] initialValues,
double[] timePoints)
|
protected MultiTable |
initResultMatrix(DESystem DES,
double[] initialValues,
double timeBegin,
double timeEnd)
|
protected MultiTable |
initResultMatrix(DESystem DES,
double[] initialValues,
double timeBegin,
int numSteps)
|
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 |
isNonnegative()
|
boolean |
isUnstable()
Method to check whether the solution of the numerical integration procedure contains Double.NaN values. |
boolean |
processEvents(EventDESystem EDES,
double time,
double previousTime,
double[] yTemp)
Processes sudden changes in the system due to events in the EDES |
boolean |
processEventsAndRules(boolean forceProcessing,
DESystem DES,
double t,
double previousTime,
double[] yTemp)
Function for processing the events and rules at a certain time step. |
boolean |
processRules(EventDESystem EDES,
double time,
double[] Ytemp)
Function for processing the rules at a certain time step. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
remove PropertyChangedListener to this Solver |
void |
reset()
Initialize with default integration step size and non-negative attribute true. |
void |
resetState(double t,
double[] y)
|
void |
setIncludeIntermediates(boolean includeIntermediates)
Allows switching whether or not intermediate results should be included into the MultiTable of the result. |
void |
setNonnegative(boolean nonnegative)
|
void |
setStepSize(double stepSize)
Set the integration step size. |
void |
setUnstableFlag(boolean unstableFlag)
|
MultiTable |
solve(DESystem DES,
double[] initialValues,
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[] initialValues,
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 initConditions,
double[] initialValues)
Solves the given DESystem using new initial conditions in each
time step. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.simulator.math.odes.DESSolver |
|---|
getKiSAOterm |
| Field Detail |
|---|
protected AbstractDESSolver clonedSolver
public static final String PROGRESS
| Constructor Detail |
|---|
public AbstractDESSolver()
true.
public AbstractDESSolver(AbstractDESSolver solver)
solver - public AbstractDESSolver(double stepSize)
stepSize -
public AbstractDESSolver(double stepSize,
boolean nonnegative)
stepSize - nonnegative - | Method Detail |
|---|
public static long getSerialversionuid()
public void reset()
true.
protected double[] additionalResults(DESystem DES,
double t,
double[] yTemp,
MultiTable data,
int rowIndex)
throws DerivativeException
DES - the differential equation systemt - the current timeyTemp - the vector yTempdata - the data as multi tablerowIndex - the index of the row
DerivativeExceptionpublic void addPropertyChangeListener(PropertyChangeListener listener)
DESSolver
addPropertyChangeListener in interface DESSolverpublic abstract AbstractDESSolver clone()
clone in interface DESSolverclone in class Object
public abstract double[] computeChange(DESystem DES,
double[] y,
double t,
double stepSize,
double[] change,
boolean steadyState)
throws DerivativeException
DES - The system to be simulated.y - The current state of the system.t - The current simulation time.stepSize - The current integration step size.change - The vector for the resulting change of the system.steadyState -
Exception
DerivativeException
public double computeDelayedValue(double time,
String id,
DESystem DES,
double[] initialValues,
int yIndex)
DelayValueHolder
computeDelayedValue in interface DelayValueHoldertime - the time point (in the past) at which the value is to be
computed for the element with the given id.id - the id of the delayed valueDES - the DESysteminitialValues - the initialValues of the DESyIndex - the index corresponding to the id in the vector of the DES
protected double[] computeSteadyState(FastProcessDESystem DES,
double[] result,
double timeBegin)
throws DerivativeException
DES - the differential equation systemresult - the result vectortimeBegin - the current time
DerivativeException
public int eventOccurred(double t,
double[] y,
boolean increasing)
throws EventException
eventOccurred in interface EventHandlerEventException
public void firePropertyChange(double oldValue,
double newValue)
DESSolver
firePropertyChange in interface DESSolver
public double g(double t,
double[] y)
throws EventException
g in interface EventHandlerEventExceptionpublic abstract String getName()
public double getStepSize()
DESSolver
getStepSize in interface DESSolverprotected abstract boolean hasSolverEventProcessing()
public int inBetweenSteps(double lastTime,
double nextTime,
double stepSize)
lastTime - nextTime - stepSize -
protected MultiTable initResultMatrix(DESystem DES,
double[] initialValues,
double timeBegin,
double timeEnd)
DES - initialValues - timeBegin - timeEnd -
MultiTable
protected MultiTable initResultMatrix(DESystem DES,
double[] initialValues,
double timeBegin,
int numSteps)
DES - initialValues - timeBegin - numSteps -
MultiTable
protected MultiTable initResultMatrix(DESystem DES,
double[] initialValues,
double[] timePoints)
DES - initialValues - timePoints -
MultiTablepublic boolean isIncludeIntermediates()
DESSolvertrue, intermediate results that may
originate from a RichDESystem are included into the
MultiTable that contains the result of a numerical integration.
isIncludeIntermediates in interface DESSolverpublic boolean isNonnegative()
public boolean isUnstable()
DESSolverDouble.NaN values.
isUnstable in interface DESSolver
public boolean processEvents(EventDESystem EDES,
double time,
double previousTime,
double[] yTemp)
throws DerivativeException
EDES - the differential equation system with eventstime - the current timepreviousTime - the time this function has been called previouslyyTemp - the vector Ytemp
DerivativeException
public boolean processEventsAndRules(boolean forceProcessing,
DESystem DES,
double t,
double previousTime,
double[] yTemp)
throws DerivativeException
forceProcessing - flag that is true if the events should be processed even if
the solver has its own event processingDES - the differential equation system with eventst - the current timepreviousTime - the time this function has been called previouslyyTemp - the vector Ytemp
DerivativeException
public boolean processRules(EventDESystem EDES,
double time,
double[] Ytemp)
throws DerivativeException
EDES - the differential equation system with eventstime - the current timeYtemp - the vector Ytemp
DerivativeExceptionpublic void removePropertyChangeListener(PropertyChangeListener listener)
DESSolver
removePropertyChangeListener in interface DESSolver
public void resetState(double t,
double[] y)
throws EventException
resetState in interface EventHandlerEventExceptionpublic void setIncludeIntermediates(boolean includeIntermediates)
DESSolverMultiTable of the result.
setIncludeIntermediates in interface DESSolverincludeIntermediates - if true, intermediate results are included into the
result.public void setNonnegative(boolean nonnegative)
nonnegative - the nonnegative to setpublic void setStepSize(double stepSize)
DESSolver
setStepSize in interface DESSolverpublic void setUnstableFlag(boolean unstableFlag)
unstableFlag -
public MultiTable solve(DESystem DES,
double[] initialValues,
double timeBegin,
double timeEnd)
throws DerivativeException
DESSolver
solve in interface DESSolverDES - the differential equation systeminitialValues - timeBegin - timeEnd -
MultiTable
DerivativeException - if something's wrong...
public MultiTable solve(DESystem DES,
double[] initialValues,
double x,
double h,
int steps)
throws DerivativeException
DESSolver
solve in interface DESSolverDES - The differential equation system to be solved.initialValues - Return value at the start point.x - Start argument.h - Step size.steps - Number of steps.
DerivativeException - if something's wrong...
public MultiTable solve(DESystem DES,
double[] initialValues,
double[] timePoints)
throws DerivativeException
DESSolver
solve in interface DESSolverDES - differential equation systeminitialValues - timePoints - the time points
DerivativeException - if something's wrong...
public MultiTable solve(DESystem DES,
MultiTable.Block initConditions,
double[] initialValues)
throws DerivativeException
DESSolverDESystem 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.
solve in interface DESSolverDES - The DESystem to be simulated.initConditions - 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.
MultiTable containing a time series of the
same dimension as given by the DESystem and simulated
values at each time point.
DerivativeException
|
Generated at April 19 2013 Version 1.3 Revision 424 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||