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

Upgrade Guide

v0.16.0 Upgrade Guide

Nextmv SDK

  • Set your go.mod requirements to match the new version.
require ( v0.16.0 v0.16.0

The Expander.Expand() method now returns an additional bool value which indicates whether the expander can be queried for additional states. As a result you have to add this bool to your implementations of the Expander interface, for example, when you are passing a function to expand.Lazy(). Before this change you would return nil as the sentinel value to inform hop to not expand a state any further. Now you can return false when you want to stop expansion.

return expand.Lazy(func() model.State {
    return myState{}

The signatures of Assigner.Assign and VehicleSorter received and additional rand.Rand parameter that can be used to add randomization to their respective implementations. Importantly this ensures deterministic behavior (as long as only one thread is used) when re-running the same input with randomization.

type Assigner interface {
    // Assign determines the next assignment based on the current state.
    Assign(State) Assignment

func DefaultVehicleSorter(s State, locations, vehicles model.IntDomain) []int {

Page last updated