Score comparison clarification #679
Replies: 1 comment 1 reply
-
All score levels are considered. If level 0 is the same, then level 1 is used, then level 2, ... It is a total ordering, where two scores are only equal when all of their component levels are equal. If it weren't like that and only the most significant level mattered, local search would have had a much harder time finding a good solution. This is an important thing to understand - if two scores are the same, the solutions they represent will be considered the same; this situation is often called a score trap. For this reason, you should write as granular constraints as you possibly can. (Example: instead of penalizing a task which is overdue by a flat |
Beta Was this translation helpful? Give feedback.
-
I was reading https://timefold.ai/docs/timefold-solver/latest/constraints-and-score/overview, and I think I realized something I didn't realize before, but I want to confirm it.
Is a score of -1hard/-10soft "worse" than a score of -1hard/-5soft?
IE if they have the same hard penalty, does soft matter at all, will it consider the latter a better (though still bad) result, or does the -1 hard mean that the rest is ignored?
I have a scenario where I get -1medium/-30soft. In this scenario, the medium is unavoidable, the incoming data is such that it can't do better, but the soft absolutely CAN be improved, and doing so would make a bad situation "less bad". It would be making the best of a bad circumstance. Is this a hopeless case?
Beta Was this translation helpful? Give feedback.
All reactions