-
Notifications
You must be signed in to change notification settings - Fork 176
feat: enable exhaustive method for list variables #2023
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
Conversation
aff9f49 to
03297af
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request enables exhaustive search methods (both Brute Force and Branch & Bound) for list variables in addition to the existing support for basic variables. The changes introduce specialized decider implementations for list variables and mixed models (containing both basic and list variables).
Changes:
- Introduced
ListVariableExhaustiveSearchDeciderandMixedVariableExhaustiveSearchDeciderto handle list variables and mixed models - Refactored
ExhaustiveSearchDeciderinto an abstract base classAbstractExhaustiveSearchDeciderwith specific implementations (BasicExhaustiveSearchDecider,ListVariableExhaustiveSearchDecider) - Updated selector factories and destination selectors to support exhaustive search mode for list variables
- Added comprehensive test coverage for list variable exhaustive search with various configurations
- Updated enum implementations to use modern switch expressions
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
AbstractExhaustiveSearchDecider.java |
New abstract base class extracting common exhaustive search logic |
BasicExhaustiveSearchDecider.java |
New class handling exhaustive search for basic variables |
ListVariableExhaustiveSearchDecider.java |
New class implementing exhaustive search for list variables |
MixedVariableExhaustiveSearchDecider.java |
New class coordinating exhaustive search for mixed models |
DefaultExhaustiveSearchPhaseFactory.java |
Updated to build appropriate deciders based on variable types |
DefaultExhaustiveSearchPhase.java |
Refactored to use new decider architecture |
ListChangeMoveSelectorFactory.java |
Enhanced to support exhaustive search mode |
ElementDestinationSelector.java |
Added exhaustive search support with modified iteration logic |
FilteringEntityByValueSelector.java |
Extended to support exhaustive method with entity replay |
CompositeMove.java |
Made buildMove method public for use in deciders |
ExhaustiveSearchNode.java |
Added generic type parameters to move accessors |
| Test files | Comprehensive test coverage for all exhaustive search configurations |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...timefold/solver/core/impl/exhaustivesearch/decider/MixedVariableExhaustiveSearchDecider.java
Outdated
Show resolved
Hide resolved
...timefold/solver/core/impl/exhaustivesearch/decider/MixedVariableExhaustiveSearchDecider.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/preview/api/move/builtin/CompositeMove.java
Outdated
Show resolved
Hide resolved
...old/solver/core/impl/heuristic/selector/entity/decorator/FilteringEntityByValueSelector.java
Outdated
Show resolved
Hide resolved
...old/solver/core/impl/heuristic/selector/move/generic/list/ListChangeMoveSelectorFactory.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.
core/src/main/java/ai/timefold/solver/core/impl/solver/recaller/BestSolutionRecaller.java
Outdated
Show resolved
Hide resolved
...mefold/solver/core/impl/exhaustivesearch/BlackBoxMixedVariableExhaustiveSearchPhaseTest.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/config/exhaustivesearch/ExhaustiveSearchType.java
Show resolved
Hide resolved
...old/solver/core/impl/heuristic/selector/entity/decorator/FilteringEntityByValueSelector.java
Outdated
Show resolved
Hide resolved
...old/solver/core/impl/heuristic/selector/entity/decorator/FilteringEntityByValueSelector.java
Outdated
Show resolved
Hide resolved
.../timefold/solver/core/impl/exhaustivesearch/decider/ListVariableExhaustiveSearchDecider.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 3 comments.
core/src/main/java/ai/timefold/solver/core/impl/solver/recaller/BestSolutionRecaller.java
Outdated
Show resolved
Hide resolved
.../java/ai/timefold/solver/core/impl/exhaustivesearch/DefaultExhaustiveSearchPhaseFactory.java
Outdated
Show resolved
Hide resolved
.../timefold/solver/core/impl/exhaustivesearch/decider/ListVariableExhaustiveSearchDecider.java
Show resolved
Hide resolved
8ff50e5 to
c2d9583
Compare
c2d9583 to
0d97caf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated no new comments.
triceo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, overall looking good.
...a/ai/timefold/solver/core/impl/exhaustivesearch/decider/AbstractExhaustiveSearchDecider.java
Outdated
Show resolved
Hide resolved
...a/ai/timefold/solver/core/impl/exhaustivesearch/decider/AbstractExhaustiveSearchDecider.java
Outdated
Show resolved
Hide resolved
...a/ai/timefold/solver/core/impl/exhaustivesearch/decider/AbstractExhaustiveSearchDecider.java
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/impl/exhaustivesearch/node/ExhaustiveSearchNode.java
Outdated
Show resolved
Hide resolved
.../java/ai/timefold/solver/core/impl/exhaustivesearch/DefaultExhaustiveSearchPhaseFactory.java
Outdated
Show resolved
Hide resolved
...old/solver/core/impl/heuristic/selector/entity/decorator/FilteringEntityByValueSelector.java
Outdated
Show resolved
Hide resolved
.../main/java/ai/timefold/solver/core/impl/heuristic/selector/entity/EntitySelectorFactory.java
Outdated
Show resolved
Hide resolved
...in/java/ai/timefold/solver/core/impl/heuristic/selector/list/DestinationSelectorFactory.java
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/impl/solver/recaller/BestSolutionRecaller.java
Outdated
Show resolved
Hide resolved
...mefold/solver/core/impl/exhaustivesearch/BlackBoxBasicVariableExhaustiveSearchPhaseTest.java
Show resolved
Hide resolved
triceo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM when comments resolved and documentation updated. (If necessary.)
core/src/main/java/ai/timefold/solver/core/impl/exhaustivesearch/node/ExhaustiveSearchNode.java
Show resolved
Hide resolved
.../java/ai/timefold/solver/core/impl/exhaustivesearch/DefaultExhaustiveSearchPhaseFactory.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 33 out of 33 changed files in this pull request and generated 1 comment.
| } | ||
|
|
||
| public SortedSet<ExhaustiveSearchNode> getExpandableNodeQueue() { | ||
| public SortedSet<ExhaustiveSearchNode<Solution_>> getExpandableNodeQueue() { |
Copilot
AI
Jan 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getExpandableNodeQueue exposes the internal representation stored in field expandableNodeQueue. The value may be modified after this call to getExpandableNodeQueue.
...old/solver/core/impl/heuristic/selector/entity/decorator/FilteringEntityByValueSelector.java
Outdated
Show resolved
Hide resolved
.../java/ai/timefold/solver/core/impl/exhaustivesearch/DefaultExhaustiveSearchPhaseFactory.java
Show resolved
Hide resolved
|



No description provided.