Learn R Programming

BacArena (version 1.8.2)

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 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.

Value

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

Details

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

See Also

Arena-class and Eval-class

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab