I am trying to run the following command for three replicates of the same simulation with a single model:
library(BacArena)
library(sybil)
library(parallel)
library(data.table)
set.seed(1231)
sybil::SYBIL_SETTINGS("SOLVER","cplexAPI")
er <- readRDS("Atlantibacter.RDS")
er@mod_desc <- "Atlanti"
eure <- Bac(er,limit_growth=F,setAllExInf=T)
arena <- Arena(n = 50, m = 50,stir=F)
arena <- addOrg(arena, eure, amount = 2)
arena_subs <- fread("custom_MS_media_ARE.csv") # same as gapfill medium
arena_subs[, ex.rxn := paste0("EX_", compounds, "_e0")]
arena <- addSubs(arena, smax = 1,
mediac = arena_subs$ex.rxn, unit = "mM", addAnyway = T,)
CF_sim1<-simEnv(arena,time=25, sec_obj = "mtf",diff_par=T)
CF_sim2<-simEnv(arena,time=25, sec_obj = "mtf",diff_par=T)
CF_sim3<-simEnv(arena,time=25, sec_obj = "mtf",diff_par=T)
saveRDS(CF_sim1,'Atlanti1.RDS')
saveRDS(CF_sim2,'Atlanti2.RDS')
saveRDS(CF_sim3,'Atlanti3.RDS')