I am new to JSprit. I have written code for Pickup and Drop service.
I notice when I use SolutionPrinter.print(problem, bestSolution, Print.VERBOSE); the order of drops is different as opposed to the order it shows when I iterate through the getTourActivities().getJobs().
Can you someone please help me when this?
You need to provide a repeatable code example. At the moment, nobody knows how
bestSolution is obtained or what
problem is in your case.
This is because
getTourActivities().getJobs() just memorize which jobs are served in the route. It does that by putting these jobs in a
HashMap not knowing the sequence. If you call
.getActivities(), you are provided with a list of activities that should be exactly in the sequence you get when printing out the solution with