Skip to content

ScoreAnalysis.summary() for debugging purposes #883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
ge0ffrey opened this issue Jun 16, 2024 · 1 comment · Fixed by #923
Closed
3 tasks done

ScoreAnalysis.summary() for debugging purposes #883

ge0ffrey opened this issue Jun 16, 2024 · 1 comment · Fixed by #923
Assignees
Labels
Milestone

Comments

@ge0ffrey
Copy link
Contributor

ge0ffrey commented Jun 16, 2024

During POC work it's very handy to be able to drop a score analysis in System.out.print().

ScoreExplanation has this, with the getSummary() method. It shows all constraints and the top 3 constraint matches per constraint.

Why only top 3 matches? In practice during debugging you need to know the first match often, to be able to prove the constraint is there with one match. But the other 297 matches are verbosity that kills the usefulness of getSummary() for debugging purposes. So top 3 is ideal.

If matches weren't fetched, no matches are shown in summary().

  • ScoreAnalysis summary() and/or toString()
  • ConstraintAnalysis toString()
  • Docs showing a score analysis summary like for ScoreExplenation
@ge0ffrey ge0ffrey added the process/needs triage Requires initial assessment of validity, priority etc. label Jun 16, 2024
@ge0ffrey
Copy link
Contributor Author

ge0ffrey commented Jun 16, 2024

ScoreAnalysis should probably also get a toString() method.

Separate issue for @Christopher-Chianelli : enable this in python land too (if it doesn't happen automatically :)

print(score_analysis)
<timefold.solver.score._score_analysis.ScoreAnalysis object at 0x3614cba10>

@zepfred zepfred self-assigned this Jun 26, 2024
@zepfred zepfred linked a pull request Jun 27, 2024 that will close this issue
@ge0ffrey ge0ffrey changed the title ScoreAnalysis.summary() for debugging purproses ScoreAnalysis.summary() for debugging purposes Jun 28, 2024
@triceo triceo added this to the v1.12.0 milestone Jul 1, 2024
@triceo triceo removed the process/needs triage Requires initial assessment of validity, priority etc. label Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants