google / or-tools

Google's Operations Research tools:
https://developers.google.com/optimization/
Apache License 2.0
10.79k stars 2.09k forks source link

Constraint Implementation approach #2018

Closed sreyas7 closed 4 years ago

sreyas7 commented 4 years ago

I am using ORTools v7+ for python on Windows 10.

I wanted to know, what would be the appropriate approach to implement the following constraints:

  1. Let vehicles run for multiple days but have a fixed location timing. Eg. the location timing is, say 3 PM - 7 PM, and the vehicles should be able to visit it after 2 days within the same time window, assuming the vehicle has a route that spans for multiple days. Idea: Set a maximum vehicle travel time of n days (1440 * n minutes). Then set the whole of travel time to be the time window of the location then remove non_visitable time intervals.

  2. When we have multiple depots (different vehicle start/end) in the routing model, is there a way to implement different depot capacity for different depots. Eg. depot['starts'] = [0, 0, 0, 1, 1, 1], depot['ends'] = [0, 0, 0, 1, 1, 1], here 3 vehicles are assigned to each of the two depot 1 and 2. How do I set depot capacities for each of the two depots, where I should be able to load 2 vehicles at the same time at depot 1 and load 3 vehicles at the same time at depot 2.

  3. How to appropriately use the penalty for locations (i.e An appropriate penalty value for based on the data being run on). A penalty value that would only drop minimum nodes to be dropped to perform routing for ANY GIVEN DATASET.

  4. Also, I have noticed that placing constraints in a different order that affect a certain aspect, affects the output of the model. Eg. Interchanging time window constraints and vehicle break constraints affect the output of the model.

Any help would be appreciated. Thanks.

lperron commented 4 years ago

please use the mailing list. Laurent Perron | Operations Research | lperron@google.com | (33) 1 42 68 53 00

Le jeu. 14 mai 2020 à 16:55, sreyas7 notifications@github.com a écrit :

I am using ORTools v7+ for python on Windows 10.

I wanted to know, what would be the appropriate approach to implement the following constraints:

1.

Let vehicles run for multiple days but have a fixed location timing. Eg. the location timing is, say 3 PM - 7 PM, and the vehicles should be able to visit it after 2 days within the same time window, assuming the vehicle has a route that spans for multiple days. Idea: Set a maximum vehicle travel time of n days (1440 * n minutes). Then set the whole of travel time to be the time window of the location then remove non_visitable time intervals. 2.

When we have multiple depots (different vehicle start/end) in the routing model, is there a way to implement different depot capacity for different depots. Eg. depot['starts'] = [0, 0, 0, 1, 1, 1], depot['ends'] = [0, 0, 0, 1, 1, 1], here 3 vehicles are assigned to each of the two depot 1 and 2. How do I set depot capacities for each of the two depots, where I should be able to load 2 vehicles at the same time at depot 1 and load 3 vehicles at the same time at depot 2. 3.

How to appropriately use the penalty for locations (i.e An appropriate penalty value for based on the data being run on). A penalty value that would only drop minimum nodes to be dropped to perform routing for ANY GIVEN DATASET. 4.

Also, I have noticed that placing constraints in a different order that affect a certain aspect, affects the output of the model. Eg. Interchanging time window constraints and vehicle break constraints affect the output of the model.

Any help would be appreciated. Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/or-tools/issues/2018, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUPL3PECSKZMDNJ2G2ZDFLRRQA57ANCNFSM4NAYK7DQ .