View source: R/schedule-methods.R
schedule | R Documentation |
Resource convenience function to generate a scheduling object from a timetable specification.
schedule(timetable, values, period = Inf)
timetable |
absolute points in time in which the desired value changes. |
values |
one value for each point in time. |
period |
period of repetition. |
Returns a schedule
object.
add_resource
.
# Schedule 3 units from 8 to 16 h
# 2 units from 16 to 24 h
# 1 units from 24 to 8 h
capacity_schedule <- schedule(c(8, 16, 24), c(3, 2, 1), period=24)
env <- simmer() %>%
add_resource("dummy", capacity_schedule)
# Composition of schedules
sch1 <- schedule(c(8, 16), c(3, 0), period=24)
sch2 <- schedule(c(16, 24), c(2, 1), period=24)
all.equal(sch1 + sch2, capacity_schedule)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.