scheduler: scheduler

Description Usage Arguments Value See Also

View source: R/scheduler.r

Description

scheduler is designed to fulfill scheduling process in the operation centers, where the requirement are often the number of agents needed at each hour day, and the constraint are often the availability of each agent at each hour day.

Usage

1
2
3
scheduler(ar, sm = c(1L, 2L, 3L), cr = c(3L:12L, 51L:60L, 99L:108L,
  147L:156L, 195L:204L, 243L:252L, 291L:300L), allow.half.hour.start = TRUE,
  write.model.into.file = NULL, timeout = 60L)

Arguments

ar

agent requirement matrix a 48 x 7 matrix to specifiy number of agents needed at each 0.5 hr each day

sm

schedule module vector - allow 3 schedule modules:

schedule module 1: agent start any half hour window, say 8:30AM, work 3.5 hour, take 0.5 hour break, and work another 4.5 hour.

schedule module 2: agent start any half hour window, say 8:30AM, work 4.0 hour, take 0.5 hour break, and work another 4.0 hour.

schedule module 3: agent start any half hour window, say 8:30AM, work 4.5 hour, take 0.5 hour break, and work another 3.5 hour.

all agents any schedule assume to work consecutive 5 days given a start day

cr

constraints on starting hours

default is no agent will start work at 1:00AM, 1:30AM, ..., and 5:30AM on any day count 0:00AM as 1L and take a 0.5hr window so 1:00AM-5:30AM 3L-12L, 51L-60L, 99L-108L, 147L-156L, 195L-204L, 243L-252L, 291L-300L.

allow.half.hour.start

allow start at none whole hour?

default is TRUE, so start at 7:00AM and start at 7:30AM are two schedule. if set FALSE, then no agent will start at 00:30AM, 01:30AM, ..., 23:30AM, this is a short cut for sepecifying all corresponding contraints with cr.

write.model.into.file

write out lp model into a file?

default is NULL not write out the model, otherwise a file name to write out

timeout

number of seconds to timeout the solving process

a parameter to pass into lpSolveAPI when solving the lp instance

Value

a list of 4 matrix and a solved lp model: s1, s2, s3, ss, and scheduleOptModel.

s1, s2 and s3 each is a 48 x 7 matrix of number of agents required to start at each hour each day, and s1, s2, and s3 are a coresponding to schedule module 1, schedule module 2, and schedule module 3.

ss is a 48 x 7 matrix and is a summarize of s1, s2 and s3 to show the number of agents avail at each half hour window - should all(ss > ar)

See Also

Other scheduler: agentActiveHours, agentOnTimeFromSchedule, scheduler_solution_constructor


gyang274/scheduler documentation built on May 17, 2019, 9:41 a.m.