Closed thh32 closed 6 years ago
sorry took me some time to figure it out! By default, the shadow costs are not stored anymore because there were problems with different solvers. In case you want to use it, you can enable it by with_shadow=TRUE
when calling sinEnv()
Following your example this would be:
library(BacArena)
data("Ec_core")
bac <- Bac(Ec_core, limit_growth=FALSE)
arena <- Arena(n=20, m=20)
arena <- addOrg(arena,bac,amount=20)
arena <- addSubs(arena, smax=0.5, mediac="EX_glc(e)", unit="mM")
arena <- addSubs(arena, smax=1, mediac=c("EX_pi(e)", "EX_h2o(e)", "EX_o2(e)", "EX_nh4(e)"), unit="mM")
eval <- simEnv(arena,time=12, , with_shadow = T) # here is a change
plotShadowCost(eval, spec_nr = 1)
Thanks for finding a solution for this
The following code;
Produces the following error;
Is this the correct way to call shadowcost or has it been updated as the current introduction produces '##NULL' as output for E.coli instead of original cobalt but it does state something instead of an error.
Thanks for the help.