euba / BacArena

agent based modelling
GNU General Public License v3.0
26 stars 11 forks source link

Setting equivalent to a simple sybil optimization - Idea for https://bacarena.github.io/ #115

Closed maringos closed 5 years ago

maringos commented 6 years ago

Dear All,

For my research I was searching for those BacArena settings that are equivalent to a simple sybil optimization. I was wondering if it were useful to write a related short paragraph for https://bacarena.github.io/.

Kind Regards, George

BacArena with fbasol 0.5014446

library(BacArena)
data("Ec_core")
bac_wild <- BacArena::Bac(model=Ec_core, limit_growth =F) 
arena <- BacArena::Arena(10,10)
arena <- BacArena::addOrg(arena, bac_wild, amount =1)
arena <- BacArena::addSubs(arena, smax = 1000000, unit = "fmol/cell")
sim1 <- BacArena::simEnv(arena, time =1,continue = T, with_shadow = T,diffusion = F)

Sybil with obj 0.501445

library(sybil)
data('Ec_core')
Ec_core <- changeBounds(model = Ec_core,
                        react =grep("EX_", x = Ec_core@react_id),
                        lb = c(
                          -4.420007,-4.420007,
                          -4.420007,-4.420007,
                          -4.420007,
                          -4.420007,-4.420007,
                          -4.420007,-4.420007,
                          -4.420007,
                          -4.420007,-4.420007,
                          -4.420007,-4.420007,
                          -4.420007,
                          -4.420007,-4.420007,
                          -4.420007,-4.420007,
                          -4.420007
                        ))
optimizeProb(Ec_core)