What are potential reasons for high move count per step for "easy" problem instances? #917
Replies: 1 comment 1 reply
-
|
Hello @greyhairredbear,
I have not seen this behavior before. Could it be that with the smaller problem, there were many more moves which were not doable, therefore forcing the solver to generate many more moves inside the step? It's the thing that immediately comes to mind that would cause the solver to generate meaningfully more moves.
As far as I know, the solver only generates moves until it has just enough to satisfy the accepted count limit.
Generally, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
We have used Timefold (currently version
1.10.0) to model a capacitated VRP with pickups, deliveries and time windows. To move loads from one vehicle to another, we use custom composite moves created with aMoveIteratorFactoryto move pickup and dropoff actions of a load together (to avoid pointless hard constraint violations where related pickup or dropoff actions would end up on different vehicles).For termination, we use
unimprovedStepCountLimit(which is admittedly quite high), which actually works quite well for our purposes. However, we noticed some unexpected behavior lately. For rather "easy" problem scenarios (e.g. picking up two loads from two different locations), the solver takes very long, sometimes running until ourminutesSpenttermination kicks in.If the problems are just a little bit more complex (e.g. delivering 7 loads to different locations), the solver exits after a comparably short amount of time (a few seconds to maybe half a minute).
Investigation & Findings
For the scenario with two loads, the
unimprovedStepCountLimitis never reached. TheproblemScalein the benchmark report is at2.079.181. For the other scenario, the solver stops after reaching theunimprovedStepCountLimit.problemScaleis14.426.130.Interestingly, the "Move Count per Step" statistic (UPDATE: for moves selected) is between
900and3000for the problem instance with two loads, while it is between50and200for the other one. For reference, here is the output from the benchmarker:"Easy"

"A little less easy"

Questions
MoveIteratorFactoryclasses? To be more concrete, I speculate there could be an error in our implementation ofhasNext, which could returntruetoo often, causing the solver to unnecessarily create moves for too long.unimprovedStepCountLimit? My first approach would be gathering more data when doing benchmarking and then lowering this limit accordingly. However, this would only mitigate the issue a little bit - the less complex problem would most probably still run longer than the other one.Closing remark
Since this currently occurs only on problem instances that are solved by a human quite easily, it's currently not a big issue for us. Just wanted to figure out what's causing this behavior and if we might have an underlying issue in our code.
Beta Was this translation helpful? Give feedback.
All reactions