Learn R Programming

BacArena (version 1.0.1)

simBac: Function for one simulation iteration for objects of Bac class

Description

The generic function simBac implements all neccessary functions for the individuals to update the complete environment.

Usage

simBac(object, arena, j, sublb, bacnum)
"simBac"(object, arena, j, sublb, bacnum)

Arguments

object
An object of class Bac.
arena
An object of class Arena defining the environment.
j
The number of the iteration of interest.
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

Value

Returns the updated enivironment of the population parameter with all new positions of individuals on the grid and all new substrate concentrations.

Details

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. Can be used as a wrapper for all important bacterial functions in a function similar to simEnv.

See Also

Bac-class, Arena-class, simEnv, constrain, optimizeLP, consume, growth, checkPhen, lysis, move and chemotaxis

Examples

Run this code
NULL

Run the code above in your browser using DataLab