Initialising solution without fixing routes

Hi,

I’ve got a specific vehicle routing problem where I need to compare between an operation with fixed boundaries and an operation without. I’m doing this by:

  1. Finding the routes within each fixed boundary (optimise each boundary separately)
  2. Finding the routes when there are no boundaries (optimise all jobs and all vehicles at once)
  3. Compare the total distance when using fixed boundaries with the total distance when there are no boundaries

My problem is that my total travel distance for #2 is almost always greater than whether using fixed boundaries. This seems odd, since the fixed-boundary solution should also be available as a potential solution when no boundaries are used.

It struck me that to give the algorithm a head start I should use the fixed-boundary solution as the starting point for #2. However, it seems that there is no way to do this with jsprit as setting an initial solution or initial route fixes the routes so that they cannot be modified by the algorithm.

Is there another way of initialising a solution so that the starting routes can be changed by the algorithm?

Thanks,

Jon

You can add an initial solution like this:

algorithm.addInitialSolution(yourSolution);

What is your problem size without boundary?

Hi Stefan, thanks for the response.

I was under the impression that the routes in the initial solution would be fixed. Is this wrong?

The problem size is approx 300 appointments and 30 vehicles.

that is the initial route