routing.AddDimension( transit_callback_index, 0, 1000, #your upper limit on the length of the largest route True, "Distance")