问题
My planning variable is combinations of 4 vehicle runs (routes) that can be performed by a single vehicle. The individual runs are the planning entity. The goal is to find the maximum number of fully loaded routes where a vehicle performs all runs on the route. A run can only be associated with a single route. A hard constraints ensures that a run lands on a route that includes the particular run.
My issue is that it appears that I get a reasonable solution when using a smaller number of routes (300), but when the number routes increases to 30,000 the number of routes decreases instead of increasing. It should increase because there are significantly more possibilities.
For scoring, I’m minimizing the number routes associated with runs, thus maximizing the number of runs on fewest number of routes. Other scores minimize/balance route slack and travel times - this rule worked for me elsewhere. I'm using default move and swap.
回答1:
Once you go above 10K customers, a normal VRP implementation won't do. For example, to keep the real distances between 20K customers in RAM memory, you 'd need a 2 dimensional array of 32 bit integers of lengths 20K and 20K. That amounts to almost 2GB RAM. And it doesn't scale linearly.
And in a USA VRP, it's probably useless to connect Boston to San Diego. So performance is problematic too.
For this reason, I am going to add an example with 100K customers in OptaPlanner 6.2 (coming soon), and solve it by limiting Boston to connect to the cities near it (it's a bit more complex than that, but that's the gist of it). If you need something in the next couple of weeks, I suggest to look into the geo-fencing approach as described in the article on the testimonial page. Note that my approach will be somewhat different than geo-fencing and there's no proof yet which is better (but I believe mine is of course ;).
来源:https://stackoverflow.com/questions/25470008/getting-fewer-solutions-with-more-opportunities-in-optaplanner