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

Upgrade Guide

v0.8.0 Upgrade Guide

Nextmv SDK

To upgrade to this version a few steps are necessary. To make your upgrade as smooth as possible, we give a step by step introduction which covers the minimum steps required to upgrade from version 0.7.3 to 0.8.0. Please keep in mind that, depending on your own code customizations, additional steps might be necessary.

  • Set your go.mod requirements to match the new version.
require ( v0.8.0 v0.8.0
  • Search for hopm and replace all occurrences in the import statements for engines (i.e., is now
  • To configure a window constraint, you now have to pass five instead of three arguments. If you used a stop_duration or maxWait_time in your measure, remove it there and pass them to the window method. Note that the length of the slice must match the length of your window constraint's slice. If you do not use them, you can simply pass nil.
  • Note that default UnassignedPenalties behavior has changed.

    • If no unassigned penalties are provided, assignment will be enforced (note, this could result in no feasible solutions being returned).
    • If unassigned penalties are provided, assignment will not be enforced. Unassignment will be discouraged (more or less, based on the penalty value).
    • If you are using a custom penalty in your value function to penalize unassigned locations, please remove it from there.

    If you solve a VRP, use UnassignedPenaltyfor all stops in your input.json and read it in your input.go.

    • Extend stop struct with new field UnassignedPenalty, read your json input.
    • Double check that your input data has values set for UnassignedPenalty. If you don't set this data, they will be set to zero and, thus, will not be assigned to your routes.
    • Make a slice of your UnassignedPenalty indexed by stop and pass it to your fleet schema.
return fleetSchema.Fleet{
   Locations:           locations,
   Vehicles:            vehicles,
   UnassignedPenalties: unassignedPenalties,
  • Change deprecated Haversine methods, if necessary. The following code snipped should help you when applying the new method.
  • The Next() method now takes an argument and has changed to Next(ctx context.Context). If you are calling it, the argument to pass is context.Background().

Page last updated