Balance total transit time for groups of vehicles #4101
Replies: 4 comments
-
Maybe create additional dimensions that are just transit time, not time? Just don’t add slack, waiting, loading/unloading, etc. JamesOn Feb 26, 2024, at 17:32, harisbal ***@***.***> wrote:
Hello,
I am running a VRPTW problem with N vehicles. Each vehicle belongs to a certain group (e.g. A or B). I am trying to balance the total transit time between those two groups. In other words, I need that groups A and B to have travelled for similar durations (e.g. +- 10%). Since I am interested to balance the pure transit time (excluding slacks and waiting time) I cannot use: time_dimension.CumulVar(routing.End(index))
Any suggestions?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
That's a very good idea actually! Thanks. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Not to my knowledge, no.
I mean, at a fundamendal level, the solver knows nothing aside from what you tell it. However, you tell it how to define (and therefore minimize) travel cost with the call to:
```
routing.SetArcCostEvaluatorOfAllVehicles(transit_callback_index)
```
(or similarly using the per-vehicle call `SetArcCostEvaluatorOfVehicle(...)`)
So there may be some buried way to get at that value. But I don't know of it if there is one, and none of the "Get..." functions under RoutingModel here <https://developers.google.com/optimization/reference/python/constraint_solver/pywrapcp#routingmodel> look promising.
I do agree that creating a new dimension to track something that is already being tracked internally seems a little bit duplicative, but I think it is the best way.
James
…On Tue, Feb 27, 2024 at 01:49:10AM -0800, harisbal wrote:
That's a very good idea actually! Thanks.
Out of curiosity though, I was wondering whether there is a built in way to track the transit time of a vehicle.
--
Reply to this email directly or view it on GitHub:
#4101 (comment)
You are receiving this because you commented.
Message ID: ***@***.***>
--
James E. Marca
Activimetrics LLC
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for the insights @jmarca! Adding a new dimension is not such a burden. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am running a VRPTW problem with N vehicles. Each vehicle belongs to a certain group (e.g. A or B). I am trying to balance the total transit time between those two groups. In other words, I need that groups A and B to have travelled for similar durations (e.g. +- 10%). Since I am interested to balance the pure transit time (excluding slacks and waiting time) I cannot use:
time_dimension.CumulVar(routing.End(index))
Any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions