1) IIRC time limit may be checked each time a solution is found to avoid to poll it too much, if in your case the solver is "stuck" in the search for an initial solution, you may notice this "forever" wait...
2) by default solver won't cache transit callback so if you are in Python you have to pay the conversion cost akak Python -> SWIG Python/C++ -> C++, which can be costlyto mitigate this you can:* pass the transit Matrix directly instead of a callback so the matrix will be copied and stored in the C++ "space" so you won't have this penalty cost.
see: https://github.com/google/or-tools/blob/b37d9c786b69128f3505f15beca09e89bf078a89/ortools/constraint_solver/routing.h#L402-L403 or
https://github.com/google/or-tools/blob/b37d9c786b69128f3505f15beca09e89bf078a89/ortools/constraint_solver/routing.h#L487-L498* Enable and increase the cache callback to at least 1846*1846 if you have enough memory, this can help by reducing the number to the transit callbackSee:ABSL_FLAG(bool, routing_cache_callbacks, false, "Cache callback calls.");ABSL_FLAG(int64_t, routing_max_cache_size, 1000,"Maximum cache size when callback caching is on.");ref: https://github.com/google/or-tools/blob/b37d9c786b69128f3505f15beca09e89bf078a89/ortools/constraint_solver/routing_flags.cc#L121-L124Le jeudi 8 juillet 2021 à 12:33:41 UTC+2, amihai...@gmail.com a écrit :How do you generate the transits? Perhaps it's stuck thereOn Thursday, July 8, 2021 at 1:11:45 PM UTC+3 aire...@gmail.com wrote:Hi Team,I am running a problem with 875 nodes and 1846 indices, and it is taking forever to run. It has around 200 vehicles. Is it realistic to solve such problem in OR-Tools? With smaller problem size, it is working fine and giving good results.It is also not respecting this parameter:search_parameters.time_limit.FromSeconds(300)Which should give a timeout after 300 seconds, is it stuck somewhere?Thanks
--
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/d4af45fb-117d-4f26-9ad7-93fc975fa29bn%40googlegroups.com.
On Jul 10, 2021, at 00:19, GB <guy.be...@gmail.com> wrote:
Hello,
To view this discussion on the web visit https://groups.google.com/d/msgid/or-tools-discuss/d6048c48-5071-4292-9d22-53f0bbf4265fn%40googlegroups.com.