0

I am using the OptaPlanner to optimize a chained planning problem which is similar to the VehicleRoutingExample. My planning entities have a planning variable which is another planning entity.

Now I am testing a huge dataset with ca. 1500 planning entities. I am using an EasyJavaScoreCalculator to get a HardSoftScore. The Score includes several time and other factors which are calculated in loops.

My Problem is that the ConstrucionHeuristic (FIRST_FIT or FIRST_FIT_DECREASING) takes more than ten minutes to initialize a Solution.

I have already reduced the number of constraints and the number of loops with which I am calculating the score, but it did not have a real effect on the running duration.

Is there a way to make the CH need less time? (I thought that it would take less time than the LocalSearch stuff but it isn’t…)

Jon As
  • 15
  • 1
  • 5

1 Answers1

0

EasyJavaScoreCalculator is very slow and doesn't scale beyond a few 100 entities. Use an IncremantalJavaScoreCalculator or Drools calculator instead. To see the difference for yourself, take the VRP example and switch between the 3 implementations (easy, inc and drools).

Also see the docs section about incremental score calculation, to explain why that's much faster.

Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120