-
Notifications
You must be signed in to change notification settings - Fork 100
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
feat: Allow to consume the initialized solution #915
Conversation
7db97ff
to
30d23a2
Compare
The job |
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.
Good start! Please see comments inline.
core/src/main/java/ai/timefold/solver/core/api/solver/SolverJobBuilder.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/impl/solver/DefaultSolverJob.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/impl/solver/ConsumerSupport.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/impl/solver/ConsumerSupport.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/impl/phase/AbstractPhase.java
Outdated
Show resolved
Hide resolved
1eb30fd
to
868766f
Compare
@rsynek Can you please review the async-related stuff? |
dbcd7e0
to
e18cd20
Compare
baa46b7
to
87f85c4
Compare
87f85c4
to
8959c96
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.
Nice job, @zepfred !
I described one hypothetical problematic situation, but the question is whether it can even happen.
core/src/main/java/ai/timefold/solver/core/impl/solver/ConsumerSupport.java
Show resolved
Hide resolved
core/src/test/java/ai/timefold/solver/core/api/solver/SolverManagerTest.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.
LGTM after comments resolved.
Quality Gate passedIssues Measures |
By definition, the initialized solution is always generated by the phase immediately prior to the first Local Search phase.
This pull request adds a new consumer, allowing the solver to inject the initialized solution when a valid initialization phase is identified.