Hi there,
I am running into an issue that I think might be a easy thing for you all to spot :)
I have a distance matrix setup as follows:
0 1 2 3
0 0.0 27.0 9999999.0 9999999.0
1 27.0 0.0 28.0 9999999.0
2 9999999.0 28.0 0.0 16.0
3 9999999.0 9999999.0 16.0 0.0
where the values set to 9999999 are invalid paths. I am trying to model a pickup/delivery task, where the optimal route would be:
0 -> 1 -> 2 -> 1 -> 0
where 0 is the start, 2 is the pickup node, and 0 is the dropoff node
In this case, index 3 is neither required nor optimal and I would prefer if it were dropped.
I was initially trying to setup the constraints as below, but always run into the same error of "Pickup/delivery indices size is not equal to number of pairs"
no matter the size of my input. Can you shed some light onto what is expected here? I am not sure what is meant by the ‘pairs’ in this error
I’ve tried:
my_data_model.set_pickup_delivery_pairs(
cudf.Series([2]
cudf.Series([0])
)
as well as:
my_data_model.set_pickup_delivery_pairs(
cudf.Series([2, 0, 0, 0]),
cudf.Series([0, 0, 0, 0])
)
Secondary question: If I wished to visit a node more than once, am I required to duplicate it? (Like so:)
0 1 2 3 4 5 6 7
0 0.0 0.0 27.0 27.0 9999999.0 9999999.0 9999999.0 9999999.0
1 0.0 0.0 27.0 27.0 9999999.0 9999999.0 9999999.0 9999999.0
2 27.0 27.0 0.0 0.0 28.0 28.0 9999999.0 9999999.0
3 27.0 27.0 0.0 0.0 28.0 28.0 9999999.0 9999999.0
4 9999999.0 9999999.0 28.0 28.0 0.0 0.0 16.0 16.0
5 9999999.0 9999999.0 28.0 28.0 0.0 0.0 16.0 16.0
6 9999999.0 9999999.0 9999999.0 9999999.0 16.0 16.0 0.0 0.0
7 9999999.0 9999999.0 9999999.0 9999999.0 16.0 16.0 0.0 0.0
based on what I can see in the set_order_locations()
docs it seems like multiple visited are supported, but I would just like to be sure. Thanks for any help!