Modeling Framework for Cellular Communities in their Environments

Can be used for simulation of organisms living in communities. Each organism is represented individually and genome scale metabolic models determine the uptake and release of compounds. Biological processes such as movement, diffusion, chemotaxis and kinetics are available along with data analysis techniques.

BacArena is an agent based modeling framework for cellular communities.

Existing genome-scale metabolic models can be used to simulate growth and interactions in time and space. In BacArena two well established methods are merged: a) Flux balance analysis to predict the activity of metabolic reactions and b) Agent based modelling in order to provide an environment.

It has been efficiently implemented in R language (with some C++ routines) and is freely available CRAN.


  • Each organism is represented individually
  • Simulation of >10 different species and thousands of organisms on your desktop computer
  • Diffusion of substances
  • Screening of phenotypes
  • Detection of crossfeeding
  • Chemotaxis
  • Kinetics of reactions
  • Separation of simulation and evaluation
  • Rich evaluation methods (data mining)
  • Reproducible simulations
  • Object oriented implementation
  • Easily expandable due to rule based approach


  • Install the latest release:


- Install the development version:
  • Special hints for linux user:

    • glpk header files needed, e.g. for debian install package: libglpk-dev
  • Special hints for windows user:

    • Besides R you need to install Rtools

Quick start



A tutorial is available: Introduction


Please report bugs, disorders or features you would like to see: Issues


BacArena v.1.6 (Release date: 2017-03-21)


  • redefined growth model

    • max cell weight value is used as upper bound for biomass reaction to avoid biomass accumulation in case of overcrowding
    • deathrate is now scaled according to time steps
  • fixed several issues related to grid geometry (relevant for non-square grids)

  • handling of alternative solutions with flux variability analysis

  • diffusion and advection can be blocked for occupied cells

  • corrected bugs related to continuing of simulations

  • expanded tutorial

  • renamed growth to biomass in [email protected]

  • fast stiring

  • vectorized addOrg

  • new reactions

    • plotReaActivity (plot reaction activity)
    • findRxnFlux (find usage of metabolite in reactions)
    • plotSubDist, plotSubDist2 (plot spatial distribution for substances)

BacArena v1.5.1 (Release date: 2016-07-20)


BacArena v1.5 (Release date: 2016-07-13)


  • parallel support

  • methods for evaluation of replicates

  • fixed numerical bugs

  • fixed growth model

  • findInArena(), getSubHist()

  • advances plotting using ggplot2:

    • plotSubCurve(), plotGrowthCurve(), plotPhenCurve()
    • plotAbundances(), plotSpecActivity(), plotSubUsages()
  • integration of shadow prices

  • addDefaultMed() and addEssentialMed()

  • imporved cross feeding detection

  • alternative objectives integration

  • lots of smaller bugfixes...

  • github reference:

BacArena v1.0.1 (Release date: 2016-01-06)


BacArena v1.0 (Release date: 2015-12-08)

initial cran release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.6 by Johannes Zimmermann, 10 months ago

Report a bug at

Browse source code at

Authors: Eugen Bauer [aut], Johannes Zimmermann [aut, cre]

Documentation:   PDF Manual  

GPL-3 license

Imports igraph, methods, utils, stats, graphics, ggplot2, reshape2, glpkAPI, plyr, Rcpp

Depends on sybil, ReacTran, deSolve, Matrix

Suggests sybilSBML, parallel, knitr, rmarkdown

Linking to Rcpp, RcppArmadillo, RcppEigen

See at CRAN