2.5 Dispatch Optimiser Output

2.5.1 Dispatch Response Object

The output from the dispatch optimiser is a dispatch response object. It has the following fields:

  1. client_id: a string giving the user assigned identifier of the dispatch optimisation job. (This is the same as the id field of the dispatch request object with which the optimiser was invoked.) This field may be null if the status field is ERROR (e.g. if the input was misformed and no usable id could be found).
  2. new_job_id: The unique identifier of the new job; will be null if the status field is ERROR.
  3. recommendations: an array of dispatch recommendation objects describing the recommendations for the new responsive job; will be null if the status field is ERROR, NO_COMPATIBLE_CREWS, or MISSING_REQUIRED_EQUIPMENT.
  4. status: a string giving one of the dispatch response status codes.
  5. errors: if status is ERROR then this is an array of strings describing the errors encountered; it is null otherwise.
  6. warnings: an array of strings describing potential problems.

2.5.2 Dispatch Recommendation Object

A dispatch recommendation object describes a recommended route for a crew. It has the following fields:

  1. crew_id: the unique identifier of the crew.
  2. route: an array of dispatch stop objects describing the recommended route for the vehicle.
  3. on_time: a Boolean, true means the new responsive job was responded to on time.
  4. late: the number of minutes that the new responsive job is late; 0 if the job is not late.
  5. displaced_jobs: an array of job identifiers, each of which corresponds to an job that is removed from the crew’s route by this recommendation; null if no jobs are removed.
  6. cost: a number, giving the monetary cost for assigning the job to this crew. (This is the same as cost field of the allowed crew object for this job and crew in the input.)
  7. preference: a number, giving the preference for assigning the job to this crew. (This is the same as preference field of the allowed crew object for this job and crew in the input.)

2.5.3 Dispatch Stop Object

A dispatch stop object describes a recommended stop for a crew. It has the following fields:

  1. job_id: the unique identifier of the job.
  2. arrival_time: the date-time of the arrival at the stop.
  3. departure_time: the date-time of the departure from the stop.