2022-04-21 v0.13.0 released
Introducing v0.13.0.
This release includes new features, options, filters, and bug fixes. Version 0.13.0 includes breaking changes for fleet engine users only that will need to be addressed prior to upgrading. While there are no breaking changes for router engine users, all SDK users are encouraged to upgrade to the latest version. Learn more in the upgrade guide.

Features

New OSRM measure features

This SDK release adds two new features to the OSRM measure: SnapRadius to ensure points are on a road network and within the hosted area and ScaleFactor to multiply durations by a factor when using a DurationMatrix, and missing error return values. Learn more.

New initialization costs feature

Use the initialization costs feature to configure per-vehicle costs that will be added to the value function when you want to add a vehicle that isn't permanently in your fleet, like a rental car. Learn more.

New sorter option

Use the sorter option to set up a custom order in which the vehicles in your fleet are to be used, based on a customer-defined score. When overriding the value function, you must use different vehicle initialization costs or the new sorter option to help guide the solver. The sorter option provides a preferred order in which the vehicles are to be used when feasible. Learn more.

New service groups option

Use the service groups option to account for the extra time needed to enter a building or fenced area. This allows you to create a more realistic VRP model. Learn more.

More flexible filtering

Use the FilterWithRoute feature to check for general compatibility and access the current solution's route. This feature allows for more flexibility in your filtering. For example, you can use FilterWithRoute to filter out vehicles that may not be assigned additional stops based on stops already in the vehicle's route. Learn more.

New environmental variable and command line flag

The POOL_SIZE variable has been added to configure the number of parallel ALNS instances to be used with the fleet engine. If POOL_SIZE is not set by the user, it will default to runtime.GOMAXPROCS(0)/2 (half of the available threads). Use this to control your environment for the fleet engine for more performant results. Learn more.

TimeTracker

TimeTracker has been added to the vehicle, fleet, and router engines. It tracks the amount of time passed overall and considers the time it takes for windows to open. Before, tracking time had to be done manually by the user. Now, you can simply query the ArrivalTimes, ServiceTimes and DepartureTimes of a route via the TimeTracker.

Bug fixes

  • Fixes a rare bug where the recomputation of indexToCost was not executed correctly in combination with alternate stops.
  • Fixes incorrect behavior when swapping alternate locations.
  • On different architectures the results of mathematical operations used to calculate Haversine were different. This was fixed.
  • Fixes a bug where the CustomFilter in the router engine led to an out-of-range error.
  • Fixes a bug where the default hybridSolver of the router API ignored the random seed option.
  • Fixes a bug where the Attribute option unassigned all stops that had an empty attribute list, because those stops were considered incompatible with any vehicle.
  • Changed the fleet DefaultModel to group together locations that are part of a vehicle's backlog and verify they can be assigned to that vehicle.
  • MaxRouteLengthFilter now predicts the minimal costs for locations under assignment consideration.
  • Fixes router output when using duration groups.
  • Fixes the Assigner() in fleet which was not always returning -1 when no location was assigned.
  • Inserted() method now returns correct index. In rare cases it previously returned 0 where that should have been -1.

Breaking changes

  • The WithAsyncTimeOut and WithAsyncPollingInterval have been removed and replaced by a cancellation context that is applied to the matrix functions.
  • The location measure - which handles service times - now also takes a new parameter durationGroups.
  • The route.Operators option for router now has 2 parameters.
  • The CustomAssigner now takes a new function VehicleSorter as a parameter to improve predicting the costs when a location group is assigned to a vehicle and thus, improving the solver's navigation through the search space.
Export as PDF
Copy link