I am trying to use the google or tools for the vehicle routing problem. Here is the link https://developers.google.com/optimization/routing/vrp . I am trying to use the code by google but when I encounter this piece of code:
def add_distance_dimension(routing, distance_callback):
"""Add Global Span constraint"""
distance = 'Distance'
maximum_distance = 3000 # Maximum distance per vehicle.
routing.AddDimension(
distance_callback,
0, # null slack
maximum_distance,
True, # start cumul to zero
distance)
distance_dimension = routing.GetDimensionOrDie(distance)
# Try to minimize the max distance among vehicles.
distance_dimension.SetGlobalSpanCostCoefficient(100)
I don't get the meaning of the last istruction
distance_dimension.SetGlobalSpanCostCoefficient(100)
What's the purpose of this function and what's the meaning of the argument? Why is there a "100" there?