Timefold: score calculation in the custom phase

I’m trying to create random initial solution with the custom phase. And I’m wondering, is it possible to access score calculation in this phase?

I mean, I’d like to check scores of some moves and then choose the best, but with some randomness.

I’ve checked, that scoreDirector.getWorkingSolution().getScore()) doesn’t change during the phase.

constraintVerifier looks good, but it doesn’t provide actual score of the constraint.

Of course, there is an option to create score calculation “by hand”.

Is there an easier way?

Leave a Comment