Skip to content

Commit

Permalink
randomize the inital proposal order
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrienLeGuillou committed Feb 8, 2024
1 parent 3b65c12 commit 0bc0924
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/proposal.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ mutate_default_proposal <- function(calib_object, default_proposal) {
make_proposals <- function(calib_object, results) {
current_jobs <- get_current_jobs(calib_object, not_done_only = TRUE)
if (get_current_iteration(calib_object) == 1) {
proposals <- lapply(current_jobs, function(job) job$initial_proposals)
proposals <- lapply(
current_jobs,
function(job) sample(job$initial_proposals)
)
} else {
proposals <- future.apply::future_lapply(
current_jobs,
Expand Down

0 comments on commit 0bc0924

Please sign in to comment.