You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to calculate the CPU time for a broad range of netlogo sims, however at the moment I am only running one simulation and timing that. I have noticed that simulations (even for one, small simulation) takes ~7x longer on nrlx than it does in NetLogo (NetLogo ~1 min, nlrx ~7 mins). Looking at the Processes in Windows Task Manager, it seems that when I run the sim from nlrx, java starts computing and then after about a minute, java finishes and closes. R then hangs for the remaining time before completeing its process.
I see other issues posted here on similar issues but the response is typically due to running too many sims / parameters. Whereas I am running only one simulation. I have pasted my code below:
Hi there,
I am trying to calculate the CPU time for a broad range of netlogo sims, however at the moment I am only running one simulation and timing that. I have noticed that simulations (even for one, small simulation) takes ~7x longer on nrlx than it does in NetLogo (NetLogo ~1 min, nlrx ~7 mins). Looking at the Processes in Windows Task Manager, it seems that when I run the sim from nlrx, java starts computing and then after about a minute, java finishes and closes. R then hangs for the remaining time before completeing its process.
I see other issues posted here on similar issues but the response is typically due to running too many sims / parameters. Whereas I am running only one simulation. I have pasted my code below:
R Code
Sys.setenv(JAVA_HOME='C:/Program Files/Java/jre-1.8')
netlogopath <- file.path("C:/Program Files/NetLogo 6.0.3")
modelpath <- "AJ2015_upscale_test.nlogo")
outpath <- file.path("C:/out")
#~~~~~~~~~~~~~~OPEN MODEL AND TEST~~~~~~~~~~~~~~~~~~#
nl <- nl(nlversion = "6.0.3",
nlpath = netlogopath,
modelpath = modelpath,
jvmmem = 2048*8)
nl@experiment <- experiment(expname = "worms",
outpath = outpath,
repetition = 1,
tickmetrics = "true",
idsetup = "setup",
idgo = "go",
runtime = 7300,
evalticks = seq(1,7300),
constants = list("Application_Rate" = 0,
"Application_Year" = 0,
"Application_Day" = 0,
"Initial_Number_Adults" = 300,
"Initial_Number_Juveniles" = 300,
"Initial_Number_Cocoons" = 300),
metrics.turtles = list("turtles" = c("who", "xcor", "ycor", "mass", "age", "breed")))
eval_variables_constants(nl)
nl@simdesign <- simdesign_simple(nl = nl, nseeds = 1)
start <- Sys.time()
results <- run_nl_all(nl = nl)
end <- Sys.time()
difftime(end, start, units = "mins")
Any help you could give would be great! Thanks again.
The text was updated successfully, but these errors were encountered: