When providing custom matrices, users have to describe the matching between locations in the instance and matrices columns/lines. This happens using start_index and end_index keys for vehicles and location_index for tasks.
Those keys do not make sense when no custom matrix is provided. In that case, location index values are decided on the fly depending of the order in which locations are added.
The problem is that it's still possible to pass *_index keys without a matrix, and then we'll later rely on those index values to retrieve durations/costs internally. Generally in a way that is inconsistent with how the actual matrices have been defined, leading to weird optimization choices.
In order to fix this, we should error whenever a custom index has been used but no matrix has been manually set.
When providing custom matrices, users have to describe the matching between locations in the instance and matrices columns/lines. This happens using
start_indexandend_indexkeys for vehicles andlocation_indexfor tasks.Those keys do not make sense when no custom matrix is provided. In that case, location index values are decided on the fly depending of the order in which locations are added.
The problem is that it's still possible to pass
*_indexkeys without a matrix, and then we'll later rely on those index values to retrieve durations/costs internally. Generally in a way that is inconsistent with how the actual matrices have been defined, leading to weird optimization choices.In order to fix this, we should error whenever a custom index has been used but no matrix has been manually set.