simBac | R Documentation |
The generic function simBac
implements all neccessary functions for the individuals to update the complete environment.
simBac(
object,
arena,
j,
sublb,
bacnum,
sec_obj = "none",
cutoff = 1e-06,
pcut = 1e-06,
with_shadow = FALSE
)
## S4 method for signature 'Bac'
simBac(
object,
arena,
j,
sublb,
bacnum,
sec_obj = "none",
cutoff = 1e-06,
pcut = 1e-06,
with_shadow = FALSE
)
object |
An object of class Bac. |
arena |
An object of class Arena defining the environment. |
j |
The index of the organism of interest in orgdat. |
sublb |
A vector containing the substance concentrations in the current position of the individual of interest. |
bacnum |
integer indicating the number of bacteria individuals per gridcell |
sec_obj |
character giving the secondary objective for a bi-level LP if wanted. |
cutoff |
value used to define numeric accuracy. |
pcut |
A number giving the cutoff value by which value of objective function is considered greater than 0. |
with_shadow |
True if shadow cost should be stores (default off). |
Bacterial individuals undergo step by step the following procedures: First the individuals are constrained with constrain
to the substrate environment, then flux balance analysis is computed with optimizeLP
, after this the substrate concentrations are updated with consume
, then the bacterial growth is implemented with growth
, the potential new phenotypes are added with checkPhen
, finally the additional and conditional functions lysis
, move
or chemotaxis
are performed. In case of many compounds in the vector of chemotaxis
, the change of the position takes place by the order of the compounds in the vector of chemotaxis
. Can be used as a wrapper for all important bacterial functions in a function similar to simEnv
.
Returns the updated enivironment of the population
parameter with all new positions of individuals on the grid and all new substrate concentrations.
Bac-class
, Arena-class
, simEnv
, constrain
, optimizeLP
, consume
, growth
, checkPhen
, lysis
, move
and chemotaxis
NULL
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.