Learn how to define the demands that must be covered in the roster.
Demand is the need for workforce and defines how many employees you need at work at any given time in the planning period. Specifying demands in the payload is done using the Demands property.
Minimum number of employees needed to cover the demand. The solver will try to cover the demand with at least this number of employees. If not specified, will be equal to ideal.
Maximum number of employees needed to cover the demand. The solver will never assign more employees to cover the demand than this number. If not specified, will be equal to ideal.
Priority of this demand. Increasing a demand’s priority will make the solver prioritize it compared to demands, but also compared to constraints. Default: 1.
Minimum number of employees needed to cover the demand. The solver will try to cover the demand with at least this number of employees. If not specified, will be equal to ideal.
Maximum number of employees needed to cover the demand. The solver will never assign more employees to cover the demand than this number. If not specified, will be equal to ideal.
Priority of this demand. Increasing a demand’s priority will make the solver prioritize it compared to demands, but also compared to constraints. Default: 1.
The Automatic Rostering API allows you to define demand for workforce in two different ways:
ShiftDemand allows you to specify demand by stating which shifts you need on which days, and how many people you need working those shifts.
TimeDemand allows you to specify demand by stating how many employees you need at different times of day throughout your schedule. The API will then assign shifts to cover the demand at those times.
A request to the Automatic Rostering API should either specify all demand as
ShiftDemand, or all demand as TimeDemand. A combination of both is
currently not supported.
Choose which type of demand suits your needs, then find below some pointers on how to configure the Demands object for your use case.
If you have already configured Shifts in your request, then using these to specify ShiftDemand is very simple. Consider the following example.
The following shows how to specify that on days 1 and 2 you require 2 people to work Shift A and 2 people to work Shift B, while on day 3 you only require 2 people working Shift B.
In principle, all employees assigned to a demand must be compatible with the attribute requirements on that demand.
However, it is also possible to specify a minimum number of assigned employees that must be compatible.
The first demand requires all employees to be able to drive. For the second demand, at least one of the assigned
employees should be a nurse.
When demand is defined as the time periods for when employees are needed. Based on the available shifts, the solver then assigns employees to the shifts that are able to cover this demand.