Scheduling¶
- ortidy.scheduling.shift_scheduling.shift_scheduling(requirements, workers, *, day_column='day', shift_column='shift', required_column='required', worker_id_column='workerId', min_shifts=None, max_shifts=None, time_limit=None, random_seed=0)[source]¶
Build a balanced shift roster.
- Parameters:
requirements (Any) – Frame of
(day, shift, required)— how many workers each shift on each day needs.workers (Any) – Frame with a worker-id column.
day_column (str) – Day column within
requirements.shift_column (str) – Shift column within
requirements.required_column (str) – Required-headcount column within
requirements.worker_id_column (str) – Worker-id column within
workers(and the output).min_shifts (int | None) – Optional minimum number of shifts per worker.
max_shifts (int | None) – Optional maximum number of shifts per worker.
time_limit (float | None) – Optional wall-clock limit in seconds.
random_seed (int) – Solver seed for determinism.
- Returns:
SolveResult whose
frame(same backend asworkers) has one row per assigned(workerId, day, shift). The objective is the maximum number of shifts assigned to any single worker (minimized for fairness).- Return type:
- ortidy.scheduling.job_shop.job_shop(tasks, *, job_column='jobId', step_column='step', machine_column='machine', duration_column='duration', start_column='start', end_column='end', time_limit=None, random_seed=0)[source]¶
Solve a job-shop scheduling problem.
- Parameters:
tasks (Any) – Tidy frame of tasks with job, step (order within the job), machine, and duration columns.
job_column (str) – Input column names.
step_column (str) – Input column names.
machine_column (str) – Input column names.
duration_column (str) – Input column names.
start_column (str) – Names of the added schedule columns.
end_column (str) – Names of the added schedule columns.
time_limit (float | None) – Optional wall-clock limit in seconds.
random_seed (int) – Solver seed for determinism.
- Returns:
SolveResult whose
frameis the input frame (same backend) plusstartandendcolumns; objective is the makespan.- Return type: