timefold-solver icon indicating copy to clipboard operation
timefold-solver copied to clipboard

ScoreAnalysis.summary() alternative that shows all constraints/matches etc

Open ge0ffrey opened this issue 9 months ago • 1 comments

Currently it only shows the top 3 or so.

For debugging purposes (User Experience), it's often handy to be able to show them all, or the top 20. Not all cases have 700mb of matches.

Proposal A)

ScoreAnalysis.summary(int topLimit)

to get them all, use summary(Integer.MAX_VALUE)

ge0ffrey avatar Feb 27 '25 19:02 ge0ffrey

I was having this issue, too.

My workaround to get the output as string with more constraint matches and indictments:

ScoreExplanation<Schedule, HardMediumSoftScore> explanation = solutionManager.explain(solution);
String explanationString = DefaultScoreExplanation.explainScore(explanation.getScore(), explanation.getConstraintMatchTotalMap().values(), explanation.getIndictmentMap().values(), 200, 200);

simontiffert avatar Mar 17 '25 06:03 simontiffert

Do you mind if I also take a look on this issue if it hasn't already been implemented? Thanks!

PatrickDiallo23 avatar Sep 12 '25 07:09 PatrickDiallo23

@PatrickDiallo23 Contributions are welcome!

triceo avatar Sep 12 '25 07:09 triceo