Skip to content

Error in the 5G Vignette - base::split() function leads to compatiblity issue with get_mon_arrivals() #210

@palandh

Description

@palandh

I tried to execute the 5G vignette code. Simulation runs fine, but upon retrieval of the monitored arrivals there happens a code error

arrivals <- envs %>%
get_mon_arrivals() %>%
left_join(rowid_to_column(cases, "replication")) %>%
filter(!(fh_prio==0 & preemptive==TRUE)) %>%
separate(name, c("Flow", "index", "n")) %>%
mutate(total_time = end_time - start_time,
waiting_time = total_time - activity_time,
Queue = forcats::fct_recode(interaction(fh_prio, preemptive),
"without SP" = "0.FALSE",
"with SP" = "1.FALSE",
"with SP & preemption" = "1.TRUE"))
Error in (function (x) : unused argument (1 = )

I think it has something to do how base::split() function transform the cases dataframe into a list.

system.time({
envs <- parallel::mclapply(split(cases, 1:nrow(cases)), simulate,
mc.cores=nrow(cases), mc.set.seed=FALSE)
})

Sadly I could not find a solution for this problem.

R Version Information:

R version 3.6.1 (2019-07-05) -- "Action of the Toes"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin15.6.0 (64-bit)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions