Hello everyone,
I’m trying to run R simulation with mclapply but if I trying to run more than one iteration the simulation not stop running.
this is the code:
simulationTime<-15*60+20
numO<-1
mm1envs <- mclapply(1:numO, function(i) {
set.seed(((i+100)^2)*3-7)
reset(ElectionDay)%>%run(until=simulationTime) %>%
wrap()
})
if it’s running with numO<-1 everything ok but if I change it to a bigger number the simulation keep running til I clik the stop button
also if I change it like this its working:
numO<-14
mm1envs <- mclapply(1:numO, function(i) {
set.seed(((i+100)^2)*3-7)
reset(ElectionDay)%>%run(until=639) %>%
wrap()
})
but more than time until=639 its stuck (also in 2 simulation)
thanks!