simmer (version 3.7.0.9000)

schedule: Generate a Scheduling Object

Description

Resource convenience function to generate a scheduling object from a timetable specification.

Usage

schedule(timetable, values, period = Inf)

Arguments

timetable

absolute points in time in which the desired value changes.

values

one value for each point in time.

period

period of repetition.

Value

Returns a schedule object.

See Also

add_resource.

Examples

Run this code
# NOT RUN {
# 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)
# }

Run the code above in your browser using DataCamp Workspace