员工安排
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Workforce Scheduling API 提供了两个使用 SolveShiftGeneration 和 SolveShiftScheduling 方法的求解器。班次生成求解器会创建一组班次,以便在给定时间范围内最大限度地覆盖员工需求。相比之下,轮班安排求解器会将特定员工分配到一组预定的班次。每个求解器都可以独立使用。具体而言,在班次调度求解器中分配给员工的班次可以由用户指定,也可以使用偏移生成求解器生成。
Shift 生成求解器
班次生成求解器会选择一组班次,以便最大限度地减少满足给定需求概况所需的员工总数。
求解器的输入是一个请求,用于描述偏移模板和员工需求。Shift 模式模板决定了求解器在创建偏移时必须遵循的规则。员工需求描述的是加班时间的员工人数,最短为 1 分钟。
求解器的输出是一个响应,其中包含一系列班次以及每班次所需的员工人数。为方便起见,每当无法涵盖所有需求时,系统也会向用户提供需求覆盖范围违规行为列表。
特性
如需深入了解求解器的各项功能,请参阅 API 文档。下面总结了该分析器最受欢迎的功能。
Shift 模板
轮班模板主要确定任意指定日期轮班的时长和可能的开始时间。此外,可以指定每个轮班模板每天的最大员工人数以及每周的休息天数。
Shift 模板还可以指定事件模板列表,以表示预定的中断,例如休息或员工培训。事件模板可确定开始时间(相对于偏移开始时间)和事件的时长。
员工需求波动
对员工的需求可能会随着时间的推移而波动。具体而言,员工需求可被指定为短至 5 分钟或与计划的时间范围一样长的时间间隔。没有指定需求的时间段相当于需求为零的员工。
轮班安排求解器
轮班安排求解器可优化员工轮班的分配,以便满足时间安排约束条件(或最大限度地减少违规行为),并将员工偏好考虑在内。
求解器的输入是一个“请求”,其中会说明员工、班次、覆盖范围要求和预算要求。对于每位员工,您可以指定角色、技能和时间安排限制,以定义每位员工的有效日程安排。员工班次决定了员工可以工作的时间和地点,而覆盖率要求决定了一段时间内对不同员工角色(和技能)的需求。
求解器的输出是包含员工-轮班-角色分配的响应,汇总了每位员工的班次和分配给他们的角色(按班次)。
特性
如需深入了解求解器的各项功能,请参阅 API 文档。下面总结了该分析器最受欢迎的功能。
员工调度限制条件
指定特定员工的时间安排应满足的规则或限制。具体来说,它支持:
- 最短 / 最长工作时间
- 最短 / 最长连续天数
- 调整次数下限 / 上限
- 轮班之间的最短休息时间
- 资源限制条件
- 在特定轮班期间让班次被要求上班(或不上班)
员工偏好设置
指定员工在特定轮班中拥有的数字偏好设置,并将员工名单中的偏好总和最大化。
保修范围要求
指定在特定角色工作多个时间范围内工作的员工数。覆盖范围要求可以与指定的轮班列表保持一致,但也可以为所需工作员工数量定义更精细的时间范围。
预算要求
为员工指定按固定小时费率和加班小时费率,并结合全局预算限制的合同。预算可以是员工费用的最高值,也可以表明需要最大限度地降低此类费用。
限制条件优先级
每个员工时间安排限制条件、覆盖率要求和预算要求都被赋予了优先级(强制、高、中或低)。求解器必须满足所有具有强制性优先级的约束条件。求解器可能会违反具有任何其他优先级的约束条件,但会根据优先级顺序尽量减少这些违规行为。最大限度减少每个优先级中的约束违规情况后,求解器会考虑员工偏好。
如何入手
如需获取对 Workforce Scheduling API 的访问权限,请按照可信测试员说明进行操作,然后按照setup指南获取 API 密钥。在获得 API 访问权限后,请参阅 API 示例开始使用。如果您有任何疑问,请发送电子邮件至 or-workforce-scheduling+contact@google.com。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-09。
[null,null,["最后更新时间 (UTC):2024-08-09。"],[[["\u003cp\u003eThe Workforce Scheduling API offers two solvers: shift generation to create optimal shifts and shift scheduling to assign employees to those shifts.\u003c/p\u003e\n"],["\u003cp\u003eThe shift generation solver minimizes the employee count needed to cover demand by considering shift templates and employee demands, outputting a list of shifts and required employees.\u003c/p\u003e\n"],["\u003cp\u003eThe shift scheduling solver optimizes employee-to-shift assignments based on constraints, preferences, coverage requirements, and budget limitations.\u003c/p\u003e\n"],["\u003cp\u003eFeatures include shift templates, demand fluctuations, employee constraints (like work hours and breaks), preferences, coverage needs, and budget controls.\u003c/p\u003e\n"],["\u003cp\u003eTo get started, become a trusted tester, set up an API key, and refer to API examples for guidance.\u003c/p\u003e\n"]]],["The Workforce Scheduling API uses two solvers: `SolveShiftGeneration` and `SolveShiftScheduling`. `SolveShiftGeneration` creates shifts based on employee demand and shift templates, minimizing the number of employees needed. It outputs a shift list and potential demand violations. `SolveShiftScheduling` assigns employees to predefined shifts, considering constraints like work hours, shift preferences, and coverage needs. It outputs employee-shift assignments. Both solvers support features like event templates, demand fluctuations, constraint priorities, and budget requirements.\n"],null,["# Workforce Scheduling\n\nThe Workforce Scheduling API offers two solvers using the\n[SolveShiftGeneration](/optimization/service/reference/rest/v1/scheduling/solveShiftGeneration) and [SolveShiftScheduling](/optimization/service/reference/rest/v1/scheduling/solveShiftScheduling) methods. The shift\ngeneration solver creates a set of shifts that maximizes coverage of employee\ndemands over a given time horizon. In contrast, the shift scheduling solver\nassigns specific employees to a set of predetermined shifts. Each solver can be\nused independently. In particular, the shifts to which employees are assigned in\nthe shift scheduling solver could be specified by the user or could be generated\nwith the shift generation solver.\n\nShift generation solver\n-----------------------\n\nThe shift generation solver selects a set of shifts such that the total number\nof employees required to cover a given demand profile is minimized.\n\nThe input of the solver is a [request](/optimization/service/reference/rest/v1/scheduling/solveShiftGeneration#request-body) that describes shift templates and\nemployee demands. Shift templates determine the rules that the solver must\nfollow to create shifts. Employee demands describe the number of employees\novertime, with a time granularity as short as 1 minute.\n\nThe output of the solver is a [response](/optimization/service/reference/rest/v1/scheduling/solveShiftGeneration#response-body) with a list of shifts and the\ncorresponding number of required employees per shift. Whenever it is not\npossible to cover all demands, a list of demand coverage violations is also\nprovided to the user for convenience.\n\n### Features\n\nFor an in depth explanation of every feature of the solver, refer to the [API\ndocumentation](/optimization/service/reference/rest/v1/scheduling/solveShiftGeneration). The following summarizes the most popular features of the\nsolver.\n\n#### Shift templates\n\nA shift template primarily determines the duration and potential start times for\na shift on any given day. Additionally, it is possible to specify a maximum\nnumber of employees per shift template per day and the number of days off per\nweek.\n\nShift templates can also specify a list of event templates to represent\nscheduled interruptions such as breaks or employee trainings. Event templates\ndetermine the start time (relative to the shift start time) and the length of an\nevent.\n\n#### Employee demand fluctuations\n\nDemand for employees can fluctuate over time. In particular, employee demands\ncan be specified over time intervals as short as 5 minutes or as long as the\nplanning horizon. Time intervals for which there is not a specified demand are\nequivalent to having a demand of zero employees.\n\nShift scheduling solver\n-----------------------\n\nThe shift scheduling solver optimizes the assignment of employees to shifts so\nthat scheduling constraints are met (or violations thereof are minimized) and\nemployee preferences are taken into consideration.\n\nThe input to the solver is a [request](/optimization/service/reference/rest/v1/scheduling/solveShiftScheduling#request-body) that describes employees, shifts,\ncoverage requirements, and budget requirements. For each employee, roles, skills\nand scheduling constraints can be specified to define what a valid schedule per\nemployee looks like. Shifts determine when and where employees can work, while\ncoverage requirements determine the demand for different employee roles (and\nskills) over several time spans.\n\nThe output of the solver is a [response](/optimization/service/reference/rest/v1/scheduling/solveShiftScheduling#response-body) with employee-shift-role assignments\nthat summarizes for every employee, the shifts and role (by shift) to which they\nare assigned.\n\n### Features\n\nFor an in depth explanation of every feature of the solver, refer to the [API\ndocumentation](/optimization/service/reference/rest/v1/scheduling/solveShiftScheduling). The following summarizes the most popular features of the\nsolver.\n\n#### Employee scheduling constraints\n\nSpecifies rules or limits that the schedule of a particular employee should\nsatisfy. In particular, it supports:\n\n- Minimum / Maximum working time\n- Minimum / Maximum consecutive days\n- Minimum / Maximum number of shifts\n- Minimum rest time between shifts\n- Resource constraints\n- Shift requests to work (or not) on specific shifts\n\n#### Employee preferences\n\nSpecifies a numeric preference that an employee has for a specific shift, and\nthe sum of preferences across the roster is maximized.\n\n#### Coverage requirements\n\nSpecifies a number of employees that are required to be working over several\ntime windows and for specific roles. Coverage requirements can align with the\ngiven list of shifts, but they can also define more fine-grained time windows of\nthe required number of working employees.\n\n#### Budget requirements\n\nSpecifies a contract for the employees with regular and overtime hourly rates,\ncoupled with global budget constraints. A budget can either be a maximum value\nfor workforce costs or an indication that such a cost needs to be minimized.\n\n#### Constraint priorities\n\nEvery employee scheduling constraint, coverage requirement and budget\nrequirement is given a priority level (mandatory, high, medium, or low). All\nconstraints with a mandatory priority must be satisfied by the solver.\nConstraints with any other priority can be violated by the solver, but these\nviolations are minimized according to the priority order. Employee preferences\nare considered by the solver after constraint violations in every priority level\nhave been minimized.\n\nHow to get started\n------------------\n\nTo get access to the Workforce Scheduling API, follow the [trusted testers](/optimization/service/trusted_testers)\ninstructions and then follow the [setup](/optimization/service/setup) guide to obtain an API key. After\nobtaining access to the API, use the [API examples](/optimization/service/scheduling/shift_scheduling_example) to get started. Should\nyou have questions, contact [or-workforce-scheduling+contact@google.com](mailto:or-workforce-scheduling+contact@google.com)."]]