|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.grogra.numeric.GraphODE
public abstract class GraphODE
This abstract class represents an ODE on a graph.
The state will be automatically copied into the graph prior
evaluation of the rate function. The user must implement the
abstract function 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 Summary | |
---|---|
GraphODE()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GraphODE()
Method Detail |
---|
public abstract void getRate()
public final void getRate(double[] out, double t, double[] state)
ODE
getRate
in interface ODE
out
- provides memory for storing the ratet
- current timestate
- current statepublic static java.util.List<RateAssignment> getRateAssignments(Registry r)
r
-
public Solver getSolver()
public void integrate(double duration) throws NumericException
duration
- time interval to integrate over
NumericException
public 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()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |