You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In other words, the size is correct in term of the number of total location_index values, but the additional row/column does not get filled. This is due to the fact that the matrix is computed based on Input::_locations (we use an indirection to go back to user-defined index values). But in case of custom location_index values, additional locations are only store here if they have a new coordinate.
A work-around to avoid hitting this problem is to make sure to re-use the same location_index value in case coordinates are identical. Which sounds like a good practice anyway.
The text was updated successfully, but these errors were encountered:
but to make sure that considering a new Location with the same coordinates as an existing one but a different user-defined index value is not considered already present in _locations_to_index above. This could be achieved by adjusting the way Location objects are hashed.
Say I have a simple instance like:
If I log the content of the durations matrix from
Input::set_matrices
, I get an expected:Now if I add another job that has the same location as job 2 but a different
location_index
, such as:then the durations matrix becomes:
In other words, the size is correct in term of the number of total
location_index
values, but the additional row/column does not get filled. This is due to the fact that the matrix is computed based onInput::_locations
(we use an indirection to go back to user-defined index values). But in case of customlocation_index
values, additional locations are only store here if they have a new coordinate.A work-around to avoid hitting this problem is to make sure to re-use the same
location_index
value in case coordinates are identical. Which sounds like a good practice anyway.The text was updated successfully, but these errors were encountered: