In automatic scheduling, a business rule:
- Reacts to a trigger: either a schedule or an event.
- Collects the necessary data: arrays of activities and technicians.
- Adds various parameters regarding the required autoscheduling behavior.
- Combines this data into an API call, sending it to the Field Service Management autoscheduling component.
The optimization component, upon receiving the API call, proceeds to collect the necessary additional data. The optimization module then generates many possible candidate assignments of activities to technicians. Invalid assignments are discarded and the remaining ones are scored. The best-scoring assignments are selected and implemented. The generation, scoring, and selection of assignments continues until all activities have been assigned, or no more assignments are possible.
For example, a periodic re-optimization could do the following: every night, a business rule selects the activities already assigned for execution the day after tomorrow, and unassigned activities that could be executed in the same period. It selects technicians with the job title 'field service engineer'. The data is sent to the optimization framework, which proceeds to collect the necessary additional data. The optimization module generates, scores, and selects candidate assignments. This continues until all activities have been assigned, or no more assignments are possible.
This is an example of a scheduled business rule that runs every hour, executing an action of the type "automatically schedule activities". Note that the queries in the BR variables are quite basic, and could be enhanced by joining other tables. In addition, several JavaScript functions are used in the action, to dynamically fill the various parameters.
Depending on the use case, the appropriate trigger event or trigger schedule needs to be defined. For example, the creation of an activity could be the trigger to automatically submit it to autoscheduling. An alternative example is to use a time schedule, according to which all new activities which were created in a certain time interval are collected and simultaneously auto-scheduled.
After the business rule has been triggered, the appropriate data regarding activities (also referred to as ‘Jobs’) and technicians needs to be collected by using variables. This means that the CoreSQL queries need to be tailored to your use case - for example:
- All open Activities having due dates <= today + 3 days AND priority ‘High’ AND Requirement ‘gas pumps’.
- All Persons having plannable = TRUE and having the Skill ‘gas pumps’.
In most cases, a number of preconditions must be met before autoscheduling can or should be executed. The Conditions section of the business rule trigger is used to define the prerequisites for the subsequent actions.
A very common set of conditions is to check the number of technicians and activities that were selected. Both amounts must be larger than 0 for autoscheduling to make sense.
In the business rule action for autoscheduling, the ID's of the activities and technicians need to be inserted as JSON arrays. This can be done with a JavaScript function. The behavior of the Autoscheduling Framework can be modulated using specific parameters.
In addition to the Jobs and Technicians, further parameters for Autoscheduling are needed or can optionally be set to modulate the autoscheduling input and output. These parameters include the following:
- Start and end date of the planning horizon (the target time window in which the optimizer tries to schedule the assignments).
- Optimization Policy to be used.
- Partitioning (optional, see next slide).
- Release Activities when/if successfully scheduled (y/n).
In order to improve throughput times for an autoscheduling run, partitioning can be used.
A partition is a subset of the activities and technicians that were submitted by the business rule (or API call). The separation criterium is a skill (requirement) that technicians and activities have in common. The list of partitioning skills should therefore define distinct subsets of activities and technicians.
Which skills are used for partitioning depends on the specific business needs. Common examples include the following:
Skills and requirements representing regions
Skills and requirements representing organizational units
Skills and requirements representing technical expertise.
The desired partitions, and the sequence of processing, are defined in the Partitioning Strategy Skills field. Preliminary checks ensure there are no conflicts during parallel scheduling of partitions.
As long as there’s no overlap between the subsets, the Autoscheduling Framework can process (schedule) the subsets simultaneously. In this way, the overall processing throughput time is reduced.
If, however, if several partitions share the same technicians or activities, the corresponding partitions are processed sequentially in the order as defined in the Partitioning Strategy Skills field.
By allowing parallel scheduling of smaller datasets, partitioning reduces the overall throughput time for an autoscheduling task. At the same time, even in case of sequential processing of the smaller datasets, the system loads and processing times are reduced.
Instead of using partitioning within the autoscheduling task, you can also set up your business rule(s) to create separate autoscheduling tasks, each with different payloads of technicians and activities.
After a business rule or other client submits the autoscheduling task, the autoscheduling framework collect additional background data, like:
- Pre-existing bookings for technicians
- WorkTime Patterns
- Skills
Subsequently, many different candidate assignments are generated. The validity of these candidate assignments are checked with certain rules, with invalid assignments being discarded. The remaining valid assignments are then scored based on certain objectives. The assignment with the highest score is assigned and the process is repeated for the remaining activities until all are assigned or no more assignments are possible. This process is governed by the Autoscheduling Policy.