문제

I'm trying to build 3 nested constraints with OptaPlanner. It works, but it's very slow (even for a very small data set)... Maybe someone does have an idea how to improve the performance?

// pseudocode
first_constraint = false;
second_constraint = false;
third_constraint = false;

if (first_constraint == true) {
   if (second_constraint == true) {
      if (third_constraint == false) {score--;}
   } else {score--;}
} else {score--;}
도움이 되었습니까?

해결책

See Score calculation performance tricks. Especially the section about incremental score calculation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top