Messy routes in case of nodes with late Time Window start

139 views
Skip to first unread message

Maria Matziouni

unread,
Dec 27, 2023, 4:48:27 AM12/27/23
to or-tools-discuss
I'm facing an issue when I have a node with late time window.

In more detail:

I have 10 nodes with TWs [ 0,horizon ] and one node with TW start at 2pm until horizon.

When I ask for routing without that node the whole route ends at 12pm.

When I introduce that node, the route is full of circles, trying to delay so the time will be 2pm in order to fulfil that node.

I have slack enabled but it never use this slack, routing prefers to make messy routes.

Time windows are modeled on solver through time dimension's CumulVal limits link Setting CumulVar's Min [ ->SetMin() ] and Max [ ->SetMax() ].

Also, for the slack we set its Node's SlackVar [ ->SetMax() ] equal to Horizon.

Finally, on time dimension we set slack_max = horizon and force_start_cumul_to_zero = false

The thing I want to achieve is to make the solver to offer a optimized route with that node at the end of the sequence (and use slack at that point).

Do you have any suggestions?

blind.line

unread,
Dec 27, 2023, 11:18:09 AM12/27/23
to or-tools...@googlegroups.com
Can you share code?  You probably have a bug 

James

On Dec 27, 2023, at 01:48, Maria Matziouni <mari...@gmail.com> wrote:

I'm facing an issue when I have a node with late time window.
--
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/d80312dc-f5cf-467b-97b5-e93924b088e0n%40googlegroups.com.

Maria Matziouni

unread,
Jan 4, 2024, 10:26:44 AM1/4/24
to or-tools-discuss
This a demonstration of how I setup the 'routing model'.
In order to simplify the demonstration, the code for cost matrix and specific configs has been omitted.
On each section that needs a configuration, I added comments to demonstrate the 'get from configs' actual value
demoCode.cpp
Reply all
Reply to author
Forward
0 new messages