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


v0.9.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.8.0 or 0.8.1 to 0.9.0.

  • Set your go.mod requirements to match the new version.
require ( v0.9.0 v0.9.0
  • The model.Domains function was renamed to model.Repeat to better reflect the purpose of this function. All you need to do is rename the function in case you used it. The signature did not change.

  • The signature of the alns.Destroyer and alns.Repairer interfaces changed. If you have implemented your own Destroyers or Repairers, you will have to add a parameter of type *rand.Rand as outlined below to still implement the respective interface.

type Destroyer interface {
   Destroy(ctx context.Context, m model.Valuer) model.Valuer

type Repairer interface {
   Repair(ctx context.Context, m model.Valuer) model.Valuer
  • The signature of the MaxRouteLengthFilter changed as outlined below. Note that the first parameter changed from a single measure.ByIndex to []measure.ByIndex. For each vehicle you need to pass in one measure.ByIndex. In the simplest case, you can create a []measure.ByIndex with the length of the number of vehicles and set the same measure.ByIndex for all of the vehicles.
func MaxRouteLengthFilter(m measure.ByIndex, routeLengths []float64, ignoreTriangular bool) (VehicleFilter, error)

Page last updated