github.com/nextmv-io/code/engines/measure. Measures that rely on external dependencies, are found in the package
ByPointmeasure while others use a
ByPointmeasures implement the following method:
ByIndexmeasures refer to an underlying list of points and implement the following method:
ByIndeximplementation provides the same functionality as a ByPoint implementation, except its cost method accepts two indices instead of two points. Indexed measures are more common, and a number of them embed and operate on results from other indexed measures (see Composing and augmenting measures below).
here.DistanceMatrix: returns the distance matrix on the road network.
here.DurationMatrix: returns the duration matrix on the road network.
here.DistanceDurationMatrices: returns the distance and duration matrices on the road network.
osrm.DistanceMatrix: returns the distance matrix on the road network.
osrm.DurationMatrix: returns the duration matrix on the road network.
osrm.DistanceDurationMatrices: returns the distance and duration matrices on the road network.
measure.Bin: select from a slice of measures by some function
measure.Location: adds fixed location costs to another measure
measure.Constant: always returns the same cost
measure.Override: overrides some other measure given a condition
measure.Power: takes some other measure to a power
measure.Scale: scales some other measure by a constant
measure.Sum: adds the costs of other measures together
measure.Truncate: truncates cost values provided by another measure
measure.Location: adds cost of visiting a location to another measure
vehicle, assume the property of triangular inequality holds for the measures they work with in order to prune their search spaces and find better solutions. However, it also means that if the measure is not triangular, some feasible solutions may not be found by the solver. Whereas the euclidean and haversine measures uphold triangular inequality, the routingkit and OSRM measures may theoretically violate this, although this may be uncommon in practice.