- The Nextmv Routing app based on
nextroute
is now available in beta as part of the marketplace on Nextmv console. - Acceptance testing is now available in beta as part of experiments.
- Bug fixes and performance improvements for the
nextroute
vehicle routing engine.
- Enable ability to subscribe to marketplace (beta) applications, starting with the Nextmv Routing app.
- Enable ability to create an application with a subscription.
This upgrade guide assumes you’ve previously installed and configured the Nextmv CLI.
Open up a terminal and run the following command:
Alternatively, you can specify the version.
To update and tidy your Go project and reference SDK v0.25.0
, stand at the location of the go.mod
and run:
For users who have previously run one of the Nextmv SDK routing templates, or the Nextmv Routing app (v0 schema), below are guidelines on how to migrate to the nextroute
routing engine. We recommend upgrading to benefit from improved performance and flexibility.
nextroute
is the recommended vehicle routing engine now available as part of the Nextmv platform. For existing users, this guide provides instructions on how to migrate from other templates and apps to the nextroute template and Nextmv Routing app (v1 schema).
After creating a nextroute template, the next step will be to migrate your existing schema to that of nextroute
. Below is a list of schema changes. For any questions on migrating custom models please contact support.
Schema changes in Nextmv Routing app (from v0 to nextroute
v1 schema)
Below is a complete list of features between the v0 and nextroute
v1 schema routing apps. Take note of indicated changes to naming and/or API.
input
Nextroute | | v0 schema | | Change? |
---|
JSON tag | Type | JSON tag | Type | |
vehicles | []Vehicle | vehicles | []Vehicle | |
stops | []Stop | stops | []Stop | |
defaults | defaults | defaults | defaults | |
stop_groups | [][]string | stop_groups | [][]string | |
duration_matrix | [][]float64 | not supported | | yes |
distance_matrix | [][]float64 | not supported | | yes |
custom_data | any | not supported | | yes |
options | any | options | Options | |
coming soon | | alternate_stops | []stop | coming soon |
duration_groups | []durationGroup | duration_groups | []durationGroup | |
Vehicle
Stop
Nextroute | | v0 schema | | Change? |
---|
JSON tag | type | JSON tag | type | |
id | string | id | string | |
location | location | position | position | yes |
precedes | any | precedes | any | |
succeeds | any | succeeds | any | |
quantity | any | quantity | any | |
target_arrival_time | time.Time | target_time | time.Time | yes |
start_time_window | []time.Time | hard_window | []time.Time | yes |
max_wait | int | max_wait | int | |
duration | int | stop_duration | int | yes |
unplanned_penalty | int | unassigned_penalty | int | yes |
early_arrival_time_penalty | float64 | earliness_penalty | float64 | yes |
late_arrival_time_penalty | float64 | lateness_penalty | float64 | yes |
compatibility_attributes | []string | compatibility_attributes | []string | |
custom_data | any | not supported | | yes |
initialStop
Nextroute | | v0 schema | | Change? |
---|
JSON tag | Type | JSON tag | Type | |
id | string | not supported | | yes |
fixed | bool | not supported | | yes |
location
(Nextroute) / position
(v0 schema)
Nextroute | | v0 schema | | Change? |
---|
JSON tag | Type | JSON tag | Type | |
lat | float64 | lat | float64 | |
lon | float64 | lon | float64 | |
defaults
Nextroute | | v0 schema | | Change? |
---|
JSON tag | Type | JSON tag | Type | |
vehicles | vehicleDefaults | vehicles | vehicleDefaults | |
stops | stopDefaults | stops | stopDefaults | |
vehicleDefaults
Nextroute | | v0 schema | | Change? |
---|
JSON tag | Type | JSON tag | Type | |
start_location | location | start | position | yes |
end_location | location | end | position | yes |
speed | float64 | speed | float64 | |
capacity | any | capacity | any | |
start_time | time.Time | shift_start | time.Time | yes |
end_time | time.Time | shift_end | time.Time | yes |
compatibility_attributes | []string | compatibility_attributes | []string | |
max_stops | int | max_stops | int | |
max_distance | int | max_distance | int | |
max_duration | int | max_duration | int | |
max_wait | int | not supported | | yes |
stopDefaults
Nextroute | | v0 schema | | Change? |
---|
JSON tag | Type | JSON tag | Type | |
unplanned_penalty | int | unassigned_penalty | int | yes |
quantity | any | quantity | any | |
start_time_window | []time.Time | hard_window | []time.Time | yes |
max_wait | int | max_wait | int | |
duration | int | stop_duration | int | yes |
target_arrival_time | time.Time | target_time | time.Time | yes |
early_arrival_time_penalty | float64 | earliness_penalty | float64 | yes |
late_arrival_time_penalty | float64 | lateness_penalty | float64 | yes |
compatibility_attributes | []string | compatibility_attributes | []string | |
options
Nextroute | | v0 schema | | Change? |
---|
JSON tag | Type | JSON tag | Type | |
not supported | | solver | solverOptions | yes |
solverOptions
Nextroute | | v0 schema | | Change? |
---|
JSON tag | Type | JSON tag | Type | |
not supported | | diagram | diagram | yes |
not supported | | limits | limits | yes |
diagram
Nextroute | | v0 schema | | Change? |
---|
JSON tag | Type | JSON tag | Type | |
not supported | | width | int | yes |
not supported | | expansion | expansion | yes |
expansion
Nextroute | | v0 schema | | Change? |
---|
JSON tag | Type | JSON tag | Type | |
not supported | | limit | int | yes |
limits
Nextroute | | v0 schema | | Change? |
---|
JSON tag | Type | JSON tag | Type | |
not supported | | duration | time.Duration | yes |
not supported | | nodes | int | yes |
not supported | | solutions | int | yes |
- To confirm a model is based on a
router
template, check the main.go
to see whether the route package has been imported. (shown below)
All router templates (except for cloud-routing
) use set-based inputs. With set-based inputs, all the elements of a set are represented under a single key. An example of this can be seen with vehicle shifts
start
times.
The nextroute template, however, is based on entity-based inputs. The elements of a feature are contained in the entities. Instead of having start_times
with a vector of start times, the start_time
is represented in each vehicle.
To migrate a model based off a router template, you will need to create a nextroute template.
Then, because nextroute
is entity-based, to migrate from an existing routing
template, the code has to be completely removed and replaced with nextroute
code. It's not enough to create a schema change as referenced in the cloud-routing migration steps, though the naming conventions previously described would still apply. For any questions on migrating your model please contact support.