jobs/:id/solution
endpoint and receive the shift assignments.
For every shift defined by its name
we will assign the best employee
.
Name | Type | Description |
---|---|---|
id | string (uuid) | Id of the solve job |
status | string | Status of the Response (SOLVING , SOLVED , or QUEUED ) |
score | Score | Score of the solution |
assignments | Assignment | Actual solution: assignments per shift |
unassigned | array of string | Unassigned shifts |
suggestions | Suggestion | List of suggested shift assignments returned by suggest api call |
violations | List | List of violated constraints |
Name | Type | Description |
---|---|---|
shift | string | Shift id |
from | string | Start date-time |
to | string | End date-time |
skills | list of string | List of skills |
employee | string | Employee id |
travelTimeInSeconds | number | Travel time in seconds |
Name | Type | Description |
---|---|---|
name | string | Name of the constraint. |
value | number | Value of the unresolved constraint. The higher, the more deviation from perfection this constraint has. |
level | string | Level of unresolved constraint. (HARD , SOFT ) |
Name | Property | Default priority | Description |
---|---|---|---|
Maximum Working Days | maxWorkingDays | HARD | An employee should not work more than contract.maxWorkingDays days in the planning horizon. |
Maximum Hours | maxHours | HARD | An employee should not work more than contract.max hours in the planning horizon. |
Minimum Hours | minHours | HARD | An employee should not work less than contract.min hours in the planning horizon. Please ensure minimum feasibility over the whole workforce. |
Earliest Shift Start | shiftStart | HARD | Earliest time contract.earliestShiftStart in a day when an employee is allowed to work |
Latest Shift Start | latestShiftStart | HARD | Earliest time contract.latestShiftStart in a day when an employee is allowed to start work |
Latest Shift End | shiftEnd | HARD | Latest time contract.latestShiftEnd in a day when an employee is allowed to end work |
Maximum Shift Length | maxShift | HARD | Maximum time contract.maxShiftLength that an employee is allowed to work |
DayOfWeek Working | dayOfWeek | HARD | Restricts employee availability based on days in the week that |
Minimum Shift Length | minShift | HARD | Minimum time contract.maxShiftLength that an employee is allowed to work |
Maximum Shifts On Same Day | sameDay | HARD | Maximum number of shifts that an employee is allowed to work |
Minimum Rest On Same Day | sameDayMinRest | HARD | Minimum resting period between two shifts on the same day |
Employee Availability | availability | HARD | Date-time range of employee’s availability |
Locked Assignment | locked | HARD | Take into account assignments that are fixed during the solve |
Maximum Consecutive Working Days | maxConsecutive | HARD | No more than contract.maxConsecutiveWorkDays consecutive shifts. |
Minimum Rest | minRest | HARD | Minimum resting between two shifts (irrespective of shifts) |
No Concurrent Assignments | concurrent | HARD | An employee cannot have two assignments on the same time. (This should never happen) |
Skill Requirement for shifts | requirements | HARD | Multiple shifts can have a shared requirement for a skill |
Employee Skill Match | skills | HARD | Assign employees to match according to their skills and the required skills for a shift |
Travel Time | distance | SOFT | Travel from home to shift location |
Priority | priority | SOFT | Shift Priorities |
Shift Employee Preference | pref | MEDIUM | A preference for a certain shift assignment for an employee |
Financial Costs | costs | SOFT | Some shifts incur a higher cost when they are assigned to (opposite of priority) |
Wage Costs per Employee | wages | SOFT | Hourly wage cost per employee influences choice of employee |
Unassigned Employee | unassigned | MEDIUM | Minimise the number of unassigned employees |
Employee Skill Match Soft | softSkills | SOFT | Assign employees to match according to their skills and the required skills for a shift (soft rule) |
Employee Critical Skill Match | criticalSkills | SOFT | Prefer assigning critical shifts first |
Employee working days | working | HARD | Respect employees working days |
Shift blakclist | blacklist | HARD | Do not assign shift to blacklisted employees |
Efficiency | efficiency | SOFT | Weight of the efficiency cost per employee |
Employee skill level match | softSkillLevel | SOFT | Match the skill level |
weights
object to the request where each property that we want to customise has a string with the format “<weight
><priority
>” where <weight
> is a positive integer number and <priority
> can assume one of the following values: soft
, medium
and hard
. hard
constraints are more important than medium
constraints and medium
constraints are more important than soft
. Between violations of two constraints with the same priority, the solver will choose the one with the minimum weight. In the example below we are customising the weights for the locked
and unassigned
constraints.