Skip to content

Commit

Permalink
rm sim; pull out Cache args
Browse files Browse the repository at this point in the history
  • Loading branch information
eliotmcintire committed Jan 20, 2025
1 parent 2110972 commit adfe533
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions R/DEoptim_fns.R
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ runDEoptim <- function(landscape,
st <- system.time({
cl <- parallelly::makeClusterPSOCK(coresUnique, revtunnel = revtunnel, rscript_libs = libPath
# , rscript = c("nice", RscriptPath)
)
)
})
clusterExport(cl, list("libPath", "logPath", "repos", "pkgsNeeded"),
envir = environment())
Expand Down Expand Up @@ -338,9 +338,9 @@ runDEoptim <- function(landscape,
#####################################################################
# DEOptim call
#####################################################################
termsInDEoptim(sim$fireSense_spreadFormula, mod$thresh, length(P(sim)$lower))
termsInDEoptim(FS_formula, thresh, length(lower))

DE <- # Cache(
DE <- Cache(
DEoptimIterative(
itermax = itermax, lower = lower,
upper = upper,
Expand All @@ -361,8 +361,9 @@ runDEoptim <- function(landscape,
thresh = thresh,
# cachePath = cachePath,
# omitArgs = c("verbose")
) # ,
# cacheId = "cd495b412420ad4a") # iteration 201 to 300
)#,
# cacheId = "cd495b412420ad4a"
) # iteration 201 to 300
DE
}

Expand Down Expand Up @@ -461,10 +462,10 @@ DEoptimIterative <- function(itermax,
plot.it = FALSE,
controlForCache = controlForCache,
objFunCoresInternal = objFunCoresInternal,
thresh = thresh,
verbose = .verbose
, omitArgs = c("verbose", "control")
)))
thresh = thresh),
verbose = .verbose,
omitArgs = c("verbose", "control")
))
} else {
# This is for testing --> it is fast
fn <- function(par, x) {
Expand Down

0 comments on commit adfe533

Please sign in to comment.