|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AmountManager
The AmountManager
is one of the most important connections between a
Network
and a Simulator
. Each Simulator
calls the
performReaction
method when it fires a reaction. The amount manager then
reflects the change of its reactant / product populations. Additionally, the
PropensityCalculator
uses getAmount
to calculate the propensity
of a reaction.
It is also possible (and necessary for the tau leaping algorithms) to save the actual amount of each species and, if some error happened, restore these saved values.
The amounts are stored in an array.
Method Summary | |
---|---|
long |
getAmount(int species)
Gets the current amount of a species. |
void |
performReaction(int reaction,
int times)
Reflects a (multiple) firing of a reaction by adjusting the populations of the reactants and the products. |
void |
resetAmount()
Resets the amount of each species to the initial amount retrieved by the networks AnnotationManager . |
void |
rollback()
Restore the amount array from the recently saved one. |
void |
save()
Makes a copy of the amount array. |
void |
setAmount(int species,
long amount)
Sets the current amount of a species. |
Method Detail |
---|
void performReaction(int reaction, int times)
RuntimeException
is thrown.
reaction
- the index of the reaction firedtimes
- the number of firingslong getAmount(int species)
species
- index of the species
void setAmount(int species, long amount)
species
- index of the speciesvoid resetAmount()
AnnotationManager
. This is called whenever a Simulator
is started.
void save()
void rollback()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |