5.3 Location Object

Each location in the scenario is represented by a location object. It has the following fields:

  1. Field: id
    Required: Yes.
    Type: String.
    Description: a unique identifier for the location.
  2. Field: name
    Required: No.
    Type: String.
    Description: The name (e.g. a store or site name) for the location.
  3. Field: tags
    Required: No.
    Type: Array of strings.
    Description: Client-specific information associated with the location. This field is ignored by the optimiser.
  4. Field: attributes
    Required: No.
    Type: Array of strings.
    Description: An array containing the names of any attributes the location has.
  5. Field: address
    Required: No.
    Type: String.
    Description: The street address of the location.
  6. Field: longitude
    Required: Yes.
    Type: Number.
    Description: The longitude of the location in decimal degrees. Must be in [-180, 180].
  7. Field: latitude
    Required: Yes.
    Type: Number.
    Description: The latitude of the location in decimal degrees. Must be in [-90, 90].
  8. Field: site_time
    Required: No.
    Type: String (HH:MM).
    Default: 00:00.
    Description: Site time for the location. (See Site Time in Section  2.10.)
  9. Field: opening_time
    Required: No.
    Type: String (HH:MM).
    Default: 00:00.
    Description: The opening time of a location. (See Opening Time in Section  2.10.)
  10. Field: closing_time
    Required: No.
    Type: String (HH:MM).
    Default: null (meaning no closing time).
    Description: The closing time of a location. (See Closing Time in Section  2.10.)
  11. Field: time_windows
    Required: No.
    Type: Array of time window objects.
    Default: Empty array (i.e. the location is always open).
    Description: An array containing the location’s opening hours as time window objects.
  12. Field: load_time
    Required: No.
    Type: String (HH:MM).
    Default: 00:00.
    Description: Load time for a location. (See Load Time in Section  2.10.)
  13. Field: unload_time
    Required: No.
    Type: String (HH:MM).
    Default: 00:00.
    Description: Unload time for a location. (See Unload Time in Section  2.10.)
  14. Field: cost_per_visit
    Required: No.
    Type: Number.
    Default: 0.
    Description: The cost incurred when a vehicle visits this location. This may be negative to represent gains associated with visiting the location. (See Cost per Visit in Section  2.10.)
  15. Field: hidden_cost_per_visit
    Required: No.
    Type: Number.
    Default: 0.
    Description: An additional cost incurred when a vehicle visits this location. This may be negative and is not included in the cost calculation for the solution. (See Hidden Cost per Visit in Section  2.10.)