feat: upgrade to Solver 2.0#109
Merged
Merged
Conversation
7d5df0d to
3c87c38
Compare
There was a problem hiding this comment.
Pull request overview
This PR upgrades the Timefold Solver benchmarks to Solver 2.0, which introduces several breaking API changes and improvements.
Changes:
- Migrated score types from Long variants (HardSoftLongScore, SimpleLongScore, BendableLongScore) to integer variants (HardSoftScore, SimpleScore, BendableScore)
- Refactored TSP domain model from chained variables to list variables with a Tour planning entity
- Updated planning entity/variable annotations from deprecated attributes (difficultyWeightFactoryClass, strengthWeightFactoryClass) to new comparatorFactoryClass/comparatorClass
- Migrated Jackson databind classes from com.fasterxml..jackson to tools.jackson package
- Updated constraint provider methods from penalizeLong to penalize
- Modernized PhaseCommand API to use PhaseCommandContext with metamodel and Moves API
- Updated solver configuration XML with new sorterManner values (DESCENDING/ASCENDING instead of DECREASING_DIFFICULTY/INCREASING_STRENGTH)
Reviewed changes
Copilot reviewed 108 out of 110 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Multiple test files (*SmokeTest.java) | Updated score type imports and test data from Long variants to integer variants |
| TSP domain classes (Visit.java, Tour.java, TspSolution.java, Domicile.java, Standstill.java) | Refactored from chained variable model to list variable model with Tour entity |
| Score calculators and constraint providers | Updated method calls from penalizeLong to penalize, changed score types |
| Domain solver classes (*ComparatorFactory.java) | Replaced weight factory classes with comparator factory classes per new API |
| Jackson persistence classes | Migrated from com.fasterxml.to tools.jackson package |
| PhaseCommand implementations | Updated to use new PhaseCommandContext API with metamodel |
| Configuration XML files | Updated sorterManner enums and added Tour entity class |
| Data files (europe40.json) | Updated TSP data format for list variable model |
| pom.xml | Removed explicit Jackson dependencies (now transitive) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
triceo
approved these changes
Feb 25, 2026
triceo
left a comment
Collaborator
There was a problem hiding this comment.
LGTM assuming that the TSPLIB scores are 100 % identical to before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.