Skip to main content

optimize

Optimize a list of stop. The stops are optimized for least distance if no time windows or departureDate are provided. Otherwise, they are optimized by least time while taking into consideration time windows. The departureDate should be specified in the same timezone as the time windows. Note that the first stop is always fixed in place and unchanged. If fixLastStop is true, then the last stop is also fixed in place and not affected by the optimization, only the middle stops are optimized.

optimize(
stops: [OptimizationStop]!
fixLastStop: Boolean
departureDate: DateTime
): OptimizationResult!

Arguments

optimize.stops ● [OptimizationStop]! non-null input

optimize.fixLastStop ● Boolean scalar

optimize.departureDate ● DateTime scalar

Type

OptimizationResult object