de.grogra.numeric
public abstract class GraphODE extends java.lang.Object implements ODE
getRate() to evaluate the rates, and can
make use of graph queries and rules. The class RGG
internally implements this class and provides helper functions that
forward to the same functions in this class.| Constructor and Description |
|---|
GraphODE() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
getRate()
Use graph queries to evaluate rate function.
|
void |
getRate(double[] out,
double t,
double[] state)
Calculate the rate (derivative of state) of the system
for a given time and state.
|
static java.util.List<RateAssignment> |
getRateAssignments(Registry r)
Query the registry for all classes belonging to the current project and
extract the rate assignments from all $ODEHelper classes.
|
Solver |
getSolver()
Get the currently set solver for numerical integration.
|
void |
integrate(double duration)
Integrate over a time interval.
|
void |
monitor(VoidToDouble g)
Install a monitor function that generates an event when the
returned value changes its sign.
|
void |
monitor(VoidToDouble g,
java.lang.Runnable r)
Install a monitor function that generates an event when the
returned value changes its sign.
|
void |
monitorPeriodic(double period,
java.lang.Runnable r)
Trigger an event in regular intervals and call the event handler.
|
void |
setSolver(Solver solver)
Set a new solver to use for numerical integration.
|
void |
unmonitor()
Remove all monitors.
|
public abstract void getRate()
public final void getRate(double[] out,
double t,
double[] state)
ODEpublic static java.util.List<RateAssignment> getRateAssignments(Registry r)
r - public Solver getSolver()
public void integrate(double duration)
throws NumericException
duration - time interval to integrate overNumericExceptionpublic void monitor(VoidToDouble g)
g - monitor functionpublic void monitor(VoidToDouble g, java.lang.Runnable r)
g - monitor functionr - event handlerpublic void monitorPeriodic(double period,
java.lang.Runnable r)
period - interval between eventsr - event handlerpublic void setSolver(Solver solver)
solver - public void unmonitor()