Class SemiDependentUpdate
- java.lang.Object
-
- bio.singa.simulation.model.modules.concentration.scope.SemiDependentUpdate
-
- All Implemented Interfaces:
UpdateScope
public class SemiDependentUpdate extends Object implements UpdateScope
Semidependent UpdatableConcentrationBasedModules require the integer state of a subset of updatables. For exampleMembraneDiffusionmight happen between aVesicleand anAutomatonNode, therefore at least two updatables are changed during calculation. Half step deltas can be calculated independently but, more half deltas need to be stored to evaluate the error of the computation.- Author:
- cl
-
-
Constructor Summary
Constructors Constructor Description SemiDependentUpdate(ConcentrationBasedModule module)Initializes the update scope for the corresponding module.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearPotentialDeltas()Clears all concentration deltas that may be assigned by this moduleConcentrationContainergetHalfStepConcentration(Updatable updatable)Return the half step concentration of a node after the full update has been calculated for the full step and the resulting delta is known.voidprocessAllUpdatables(Collection<? extends Updatable> updatables)Processes all given updatables.voidprocessUpdatable(Updatable updatable)Calculates the given updatable.
-
-
-
Constructor Detail
-
SemiDependentUpdate
public SemiDependentUpdate(ConcentrationBasedModule module)
Initializes the update scope for the corresponding module.- Parameters:
module- The module.
-
-
Method Detail
-
processAllUpdatables
public void processAllUpdatables(Collection<? extends Updatable> updatables)
Description copied from interface:UpdateScopeProcesses all given updatables. This includes calculating the delta functions of the corresponding module, calculating the current numerical error and pushing potential Deltas to the updatables, ready to be applied.- Specified by:
processAllUpdatablesin interfaceUpdateScope- Parameters:
updatables- The updatables to be processed.
-
processUpdatable
public void processUpdatable(Updatable updatable)
Description copied from interface:UpdateScopeCalculates the given updatable. If it is required to calculate other updatables to evaluate the state of this updatable this will be done depending on the implementation of the scope.- Specified by:
processUpdatablein interfaceUpdateScope- Parameters:
updatable- The updatable.
-
clearPotentialDeltas
public void clearPotentialDeltas()
Description copied from interface:UpdateScopeClears all concentration deltas that may be assigned by this module- Specified by:
clearPotentialDeltasin interfaceUpdateScope
-
getHalfStepConcentration
public ConcentrationContainer getHalfStepConcentration(Updatable updatable)
Description copied from interface:UpdateScopeReturn the half step concentration of a node after the full update has been calculated for the full step and the resulting delta is known.- Specified by:
getHalfStepConcentrationin interfaceUpdateScope- Parameters:
updatable- The updatable.- Returns:
- A concentration container with the concentrations at the half time step.
-
-