Tour list

List of tours is essentially individual vehicle routes. Each tour consists of the following properties:

  • typeId: id of vehicle type

          "typeId": "vehicle",
    
  • vehicleId: id of used vehicle. Id of the vehicle is generated from the tour using pattern $typeId_sequenceIndex:

          "vehicleId": "vehicle_1",
    
  • shiftIndex: vehicle's shift index:

          "shiftIndex": 0,
    
  • stops: list of stops. See stop structure below

  • statistic: statistic of the tour.

            }
      ],
      "statistic": {
        "cost": 41.504842000000004,
        "distance": 13251,
        "duration": 3507,
        "times": {
          "driving": 2367,
          "serving": 1140,
          "waiting": 0,
          "break": 0
    

Stop structure

Stop represents a location vehicle has to visit within activities to be performed. It has the following properties:

  • location: a stop location
  • time: arrival and departure time from the stop
  • distance: distance traveled since departure from start location
  • load: vehicle capacity after departure from the stop
  • activities: list of activities to be performed at the stop. Each stop can have more than one activity. See activity structure below.

Activity structure

An activity specifies work to be done and has the following structure:

  • jobId: id of the job or special id (departure, arrival, break, reload)
  • type: activity type: departure, arrival, break, reload, pickup or delivery
  • location (optional): activity location. Omitted if stop list has one activity
  • time (optional): start and end time of activity. Omitted if stop list has one activity
  • jobTag (optional): a job place tag

Examples

An example of stop with one activity:

        {
          "location": {
            "lat": 52.5316,
            "lng": 13.3884
          },
          "time": {
            "arrival": "2019-07-04T09:00:00Z",
            "departure": "2019-07-04T09:51:29Z"
          },
          "distance": 0,
          "load": [
            1
          ],
          "activities": [
            {
              "jobId": "departure",
              "type": "departure"
            }
          ]
        },

An example of stop with two activities:

        {
          "location": {
            "lat": 52.5225,
            "lng": 13.4095
          },
          "time": {
            "arrival": "2019-07-04T10:22:26Z",
            "departure": "2019-07-04T10:31:26Z"
          },
          "distance": 8952,
          "load": [
            2
          ],
          "activities": [
            {
              "jobId": "job2",
              "type": "pickup",
              "location": {
                "lat": 52.5225,
                "lng": 13.4095
              },
              "time": {
                "start": "2019-07-04T10:22:26Z",
                "end": "2019-07-04T10:26:26Z"
              }
            },
            {
              "jobId": "job3",
              "type": "pickup",
              "location": {
                "lat": 52.5225,
                "lng": 13.4095
              },
              "time": {
                "start": "2019-07-04T10:26:26Z",
                "end": "2019-07-04T10:31:26Z"
              },
              "jobTag": "p1"
            }
          ]