Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

simEnv_par

Main function for simulating in parallel all processes in the environment


Description

The generic function simEnv_par for a simple in parallel all simulation of the environment.

Usage

simEnv_par(
  object,
  time,
  lrw = NULL,
  continue = FALSE,
  reduce = FALSE,
  cluster_size = NULL,
  diffusion = TRUE,
  sec_obj = "none",
  cutoff = 1e-06,
  with_shadow = FALSE,
  verbose = TRUE
)

## S4 method for signature 'Arena'
simEnv_par(
  object,
  time,
  lrw = NULL,
  continue = FALSE,
  reduce = FALSE,
  cluster_size = NULL,
  diffusion = TRUE,
  sec_obj = "none",
  cutoff = 1e-06,
  with_shadow = FALSE,
  verbose = TRUE
)

Arguments

object

An object of class Arena or Eval.

time

A number giving the number of iterations to perform for the simulation

lrw

A numeric value needed by solver to estimate array size (by default lwr is estimated in the simEnv() by the function estimate_lrw())

continue

A boolean indicating whether the simulation should be continued or restarted.

reduce

A boolean indicating if the resulting Eval object should be reduced

cluster_size

Number of cpu cores to be used.

diffusion

True if diffusion should be done (default on).

sec_obj

character giving the secondary objective for a bi-level LP if wanted.

cutoff

value used to define numeric accuracy

with_shadow

True if shadow cost should be stores (default off).

verbose

Set to false if no status messages should be printed.

Details

The returned object itself can be used for a subsequent simulation, due to the inheritance between Eval and Arena.

Value

Returns an object of class Eval which can be used for subsequent analysis steps.

See Also

Examples

data(Ec_core, envir = environment()) #get Escherichia coli core metabolic model
bac <- Bac(Ec_core,deathrate=0.05,
           minweight=0.05,growtype="exponential") #initialize a bacterium
arena <- Arena(n=20,m=20) #initialize the environment
arena <- addOrg(arena,bac,amount=10) #add 10 organisms
arena <- addSubs(arena,40) #add all possible substances
eval <- simEnv(arena,5)

BacArena

Modeling Framework for Cellular Communities in their Environments

v1.8.2
GPL-3 | file LICENSE
Authors
Eugen Bauer [aut], Johannes Zimmermann [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.