Modeling Framework for Cellular Communities in their Environments

Can be used for simulation of organisms living in communities (Bauer and Zimmermann (2017) ). 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 CRAN 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


SBML support

  • sybilSBML is needed for SBML input
  • currently sybilSBML is not available on CRAN because the CRAN test servers do not have the latest version of libsbml yet
  • manual installation of sybilSBML (for linux):
R CMD INSTALL  sybilSBML_3.0.5.tar.gz



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


BacArena v.1.8 (Release data: 2019-02-15) Changes:

  • improved detection of limiting substances (shadow costs)
  • shadow costs analysis now possible with cplex, too
  • support for non-default objective functions
  • fixed interaction finding in findfeeding3()
  • occupied arena cells valid also for human cells (bug in emptyHood)

BacArena v.1.7 (Release date: 2018-05-09)


  • fine-tuning on growth model
    • several duplications per time step
    • fixed no growth bug for very high accumulated biomass
  • improved handling of non-biomass objectives
  • better status printing
  • more then one compound in chemotaxis
  • wrong unit of diffusion constant
  • several small updated in plotting methods

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.8.2 by Johannes Zimmermann, 2 years ago

Report a bug at

Browse source code at

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

Documentation:   PDF Manual  

GPL-3 | file LICENSE license

Imports methods, utils, stats, graphics, ggplot2, reshape2, glpkAPI, plyr, Rcpp, igraph, stringr, R.matlab

Depends on sybil, ReacTran, deSolve, Matrix

Suggests parallel, knitr, rmarkdown

Linking to Rcpp, RcppArmadillo, RcppEigen

See at CRAN