Search code examples
javaoptaplanner

Same Benchmark Result for Project Job Scheduling Example (Enhanced)


I have enhance the project job scheduling example from optaplanner examples with these features :

  1. Priority Based Project : execution order will be start from higher priority project
  2. Break Time Feature : adding another shadow variable named breakTime, and calculate it whenever an allocation overlap with break time (i.e. holiday)
  3. Change the value provider range for delay to 15000

Then after that I run benchmark, and get the same result for LA 500, LA 1000, LA 2000, it state that all of them are the favorite. Is this the valid result from benchmark? Please someone help me analyze my bench mark result. I have attached my benchmark result. Thanks.

Best Score Summary Level 1

Best Score Summary Level 2

Time Spent Summary

Average Calculation Count Summary


Solution

  • It's possible that they give the same results if the score function is very flat. It could be that 1 constraint type dwarfs all the others, making the score flat.

    Does the problemStatisticType BEST_SCORE graph look exactly the same too? That would be very unlikely.

    1) Enable the following statistic (new in 6.2.CR1) and run your benchmarks again:

    <singleStatisticType>CONSTRAINT_MATCH_TOTAL_BEST_SCORE</singleStatisticType>
    

    That one will tell you which constraint types affect the best score (see docs "14.6.2. Constraint match total best score over time statistic" about it). If one constraint type dwarfs the others this will make it visible.

    2) Examine the actual solution after running the solver (the benchmarker won't write the best solution by default, so either configure that or just run a solver directly). Check with constraints cause the score you got.