I'm sure I've posted on this topic before in this forum, but it has been a while.
I would recommend constraints as well as some objective goals.
In my case, there was a legal requirement that no passenger could be in a vehicle more than 45 minutes longer than a straight trip from origin to destination. We ended up changing that to the lesser of 50% more time or 45 minutes, as it seemed silly to allow 45 minutes additional time on a 5 minute trip.
Second, although I do not recall using it myself, I believe it will work to set soft constraints on all of the passenger's final values using SetCumulVarSoftUpperBound. If you set each to the direct trip distance (or travel time as your needds require), then the solver will see a penalty for time in excess of the straight line distance.
What I don't know is how much extra overhead that will add to your solver run. It all depends on how many trips you have, etc.
Hope that helps,
James
-- You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/f1925a3c-2fff-4fe9-a1e4-5515e7f41f21n%40googlegroups.com.
James E. Marca
Activimetrics LLC
--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/187a8f19-f64d-45f5-9c7c-95607cf49917n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/5be3da88-051b-4d4e-af4f-1fc18cbc8ff6n%40googlegroups.com.
On Sep 10, 2024, at 09:53, blind.line <blind.lin...@gmail.com> wrote:
I’ll try to take a closer look at the detsiks of your old posts today…I have some time this afternoon
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/9722ecbc-67d5-48e8-8e29-1be6f82832a2n%40googlegroups.com.