2.4 Dispatch Optimiser Input

This section describes the input to the dispatch optimiser. The input takes the form of a dispatch request object.

2.4.1 Dispatch Request Object

The input to the dispatch optimiser is a dispatch request object. It has the following fields:

  1. id: a non-empty string that uniquely identifies each invocation of the optimiser.
  2. time_zone: a string giving the time zone.
  3. current_time: a date-time giving the current date and time.
  4. new_job_id: the identifier of the new responsive job to generate dispatch recommendations for.
  5. crews: an array of dispatch crew objects describing the crews that are, or will become, available for assignment of new responsive jobs. This array must not be null or empty.
  6. jobs: an array of dispatch job objects, describing the responsive and planned jobs. The array should include assigned planned and responsive jobs, unassigned planned jobs that could possibly be assigned and the new responsive job identified by the new_job_id field. This array must not be null or empty.

2.4.2 Dispatch Crew Object

A dispatch crew object describes a single crew. It has the following fields:

  1. id: the unique identifier for the crew.
  2. name: a string giving a descriptive label for the crew; may be null.
  3. start_time: the rostered shift start date-time of the crew.
  4. finish_time: the rostered shift finish date-time of the crew.
  5. start_location: the location at which the crew begins their shift; must not be null.
  6. finish_location: the location at where the crew should end their shift; may be null if the crew is considered to finish their shift at the completion of their last job.
  7. current_location: the current location of the crew.
  8. is_subcontractor: a Boolean, if true the crew are subcontractors.
  9. allowed_overtime: a Boolean, if true the crew are allowed overtime.
  10. equipment: an array of strings listing any extra equipment currently in the crew’s possession.
  11. current_activity: an array of assigned job objects listing the currently scheduled activity of the crew. The array must be ordered by time. Can be null or empty if the crew has no currently scheduled activity.

2.4.3 Dispatch Job Object

A dispatch job object describes a responsive job or a planned job that is, or could be, undertaken on this day. It has the following fields:

  1. id: the unique identifier of the job.
  2. name: a string giving a descriptive label for the job; may be null.
  3. type: a string, must be one of the job type codes.
  4. status: a string, must be one of the job status codes.
  5. priority: a number (integer), between 1 and 4, giving the priority of a responsive job; this field is ignored for planned jobs.
  6. location: the location of the job. Must not be null.
  7. allowed_crews: an array of allowed crew objects listing the crews capable of undertaking the job.
  8. required_equipment: an array of strings listing additional equipment required to complete the job.
  9. response_time_windows: an array of date-time window objects giving time spans in which a responsive job must begin; this field must be null for planned jobs. Must not be null or empty for responsive jobs.
  10. resolution_time_windows: an array of date-time window objects giving time spans in which a responsive job must be completed; this field must be null for planned jobs. Must not be null or empty for responsive jobs.
  11. previously_responded: a Boolean, true means that this case has already been responded to in a previous job; false means that this case has not been responded to in a previous job.

2.4.4 Job Type Code

An job type code describes the type of a job. There are two possible values:

  1. PLANNED: the job is a planned job.
  2. RESPONSIVE: the job is a responsive job.

2.4.5 Job Status Code

An job status code describes the status of an job. Possible values are:

  1. NEW: the job is new and has not yet been assigned to a crew.
  2. PENDING: the job has been assigned to a crew, but that crew have not yet arrived on-site.
  3. STARTED: the crew have arrived on-site and commenced the job; the job may still be pre-empted.
  4. COMMITTED: the job has commenced and cannot be pre-empted.

2.4.6 Assigned Job Object

An assigned job object describes the position of an assigned job in the daily schedule for a crew. It has the following fields:

  1. job_id: the identifier of the job.
  2. start_time: actual or estimated start date-time.
  3. finish_time: actual or estimated finish date-time.