Re: [simmer-devel] Parallel Tasks

14 views
Skip to first unread message

Iñaki Ucar

unread,
Dec 23, 2023, 8:02:10 AM12/23/23
to simmer...@googlegroups.com
Hi,

On Fri, 22 Dec 2023 at 20:24, James Tall <jht...@gmail.com> wrote:
Are there any vignettes using the do_parallel() brick from simmer.bricks within the context of a replication (using lappy or mapply)? I have been trying to get it to work using combinations of basic vignettes from r-simmer.org articles but continue to receive 'there is no arrival running' errors. I believe it's a matter of variable access for the .env argument of do_parallel(), but no combination of nesting code inside or outside of lappy/mapply seem to get it to work. Are there any working vignettes or suggestions?

I believe so. My recommendation is always to instantiate the simmer environment inside your lapply function, to avoid these issues. I generally define a function with the whole simulation code (maybe with input parameters for different scenarios), then run that function using lapply or any alternative (i.e. future_lapply). See the simulations in https://r-simmer.org/articles/simmer-aa-5g for examples of this approach.

Iñaki
Reply all
Reply to author
Forward
0 new messages