|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.simulation.observer.Observer
fern.example.CellGrowthObserver
public class CellGrowthObserver
Does not observe anything, but it controls the reaction networks cell. At the beginning the volume is set to 1 and then linearly increased to 2 until the generation time is reached. Then a cell division is simulated by dividing each population by 2 and restart the volume at 1.
This class is used for the LacZ examples, so at a cell division the amount of PLac (the promoter) is set to 1.
Constructor Summary | |
---|---|
CellGrowthObserver(Simulator sim,
double generationTime,
double timeOffset)
Creates the observer for given simulator, generation time and a time offset (because the simulator starts at time 0 and for one example it actually starts at time 1000) |
Method Summary | |
---|---|
void |
activateReaction(int mu,
double tau,
Simulator.FireType fireType,
int times)
Gets called before a reaction fires. |
void |
finished()
Gets called when a simulation has finished, directly after the termination check. |
long |
getNumSteps()
Gets the number of steps taken in one simulation |
void |
started()
Gets called when the simulation has started after the initialization and before the termination condition is checked the first time. |
void |
step()
Gets called after each termination check and before Simulator.performStep(fern.simulation.controller.SimulationController)
is called. |
void |
theta(double theta)
Gets called by simulators when a certain moment in time is reached. |
Methods inherited from class fern.simulation.observer.Observer |
---|
getLabelFormat, getNumSimulations, getPrintWriter, getSimulator, getTheta, print, setLabelFormat, setPrintWriter, setTheta |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CellGrowthObserver(Simulator sim, double generationTime, double timeOffset)
sim
- the simulatorgenerationTime
- generation timetimeOffset
- time offsetMethod Detail |
---|
public void activateReaction(int mu, double tau, Simulator.FireType fireType, int times)
Observer
activateReaction
in class Observer
mu
- the reaction which is supposed to firetau
- the time the reaction fires (at this time Simulator.getTime()
does not necessarily yield the firing time)fireType
- the type of the firingtimes
- TODOpublic void finished()
Observer
finished
in class Observer
public void started()
Observer
started
in class Observer
public void step()
Observer
Simulator.performStep(fern.simulation.controller.SimulationController)
is called.
step
in class Observer
public void theta(double theta)
Observer
Observer.getTheta()
theta
in class Observer
theta
- moment in timepublic long getNumSteps()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |