public abstract class Observer extends Object implements Comparable<Observer>
Constructor and Description |
---|
Observer(OdeSolver solver)
Creates an observer dedicated to an ODE solver.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Observer o) |
abstract void |
finished()
Gets called when the ODE solver has finished, directly after the termination check.
|
abstract void |
started()
Gets called when the ODE solver has started after the initialization and before the termination condition is
checked the first time.
|
abstract void |
step()
Gets called after each termination check and before
Simulator#performStep(fern.simulation.controller.SimulationController) is called. |
abstract void |
theta(double thetaTime,
Collection<Object> events)
Gets called by the ODE solver when a certain moment in time is reached.
|
private final OdeSolver solver
public Observer(OdeSolver solver)
OdeSolver.addObserver(Observer)
.
solver
- the solverpublic abstract void started()
public abstract void step()
Simulator#performStep(fern.simulation.controller.SimulationController)
is called.public abstract void finished()
public abstract void theta(double thetaTime, Collection<Object> events)
thetaTime
- the time the event has to be triggered.events
- a collection of events that occur at thetaTime.public final int compareTo(Observer o)
compareTo
in interface Comparable<Observer>
Copyright © 2015 University of Glasgow. All rights reserved.