You are viewing Nextmv legacy docs. ⚡️ Go to latest docs ⚡️

Features

Duration Groups

You will learn the basics of using duration groups on cloud.

Duration groups let you set up stop groups to which an additional duration cost (in seconds) is applied every time one or many stops in the group are approached. This can be useful if some of your stops belong to a fenced apartment complex that needs some extra time to access. In that case you can group those stops together and specify an extra time needed to enter the complex. Once in the complex, the normal stop durations per stop are applied.

Duration groups are used with the duration_groups attribute which defines a list of stop groups. Each group must consist of at least 2 stops, given by their IDs, and a duration (in seconds) that is applied every time a stop in the group is approached from a stop that does not belong to the group. Stops can only belong to one group and must be listed only once within a group.

Duration groups do not enforce group assignment. Group assignments can be enforced using the stop groups feature.

The following input file adds two duration groups with different duration times of 600 and 300 seconds, respectively. In addition, it adds individual stop durations for location-2 and location-7 of 300 seconds.

{
  "defaults": {
    "vehicles": {
      "speed": 10,
      "shift_start": "2021-02-17T09:00:00-06:00"
    }
  },
  "vehicles": [
    { "id": "vehicle-1" },
    { "id": "vehicle-2" }
  ],
  "stops": [
    {
      "id": "location-1",
      "position": { "lon": -96.827094, "lat": 33.004745 }
    },
    {
      "id": "location-2",
      "position": { "lon": -96.86074, "lat": 33.005741 },
      "stop_duration": 300
    },
    {
      "id": "location-3",
      "position": { "lon": -96.820915, "lat": 32.969456 }
    },
    {
      "id": "location-4",
      "position": { "lon": -96.695259, "lat": 32.921629 }
    },
    {
      "id": "location-5",
      "position": { "lon": -96.785178, "lat": 32.981014 }
    },
    {
      "id": "location-6",
      "position": { "lon": -96.847693, "lat": 32.891106 }
    },
    {
      "id": "location-7",
      "position": { "lon": -96.915799, "lat": 33.049597 },
      "stop_duration": 300
    }
  ],
  "duration_groups": [
    {
      "group": ["location-1", "location-3", "location-4", "location-5", "location-6"],
      "duration": 600
    },
    {
      "group": ["location-2", "location-7"],
      "duration": 300
    }
  ]
}

Copy

Page last updated