-
Notifications
You must be signed in to change notification settings - Fork 163
feat: add SolverConfigOverride support for setting the time spend directly #1808
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: add SolverConfigOverride support for setting the time spend directly #1808
Conversation
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.
Thanks for the contribution!
I've asked some questions in the comments inline, let's have a conversation about this design.
core/src/main/java/ai/timefold/solver/core/api/solver/SolverConfigOverride.java
Outdated
Show resolved
Hide resolved
|
@triceo I updated the API as we discussed. I tried to provide a comprehensive documentation so that it will be easier for developers to understand how to use the methods. Please let me know if I used a good approach and if I should also add other unit tests (and where: in the other modified file or I should create SolverConfigOverrideTest class)? |
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 the comments are improved!
core/src/main/java/ai/timefold/solver/core/api/solver/SolverConfigOverride.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/api/solver/SolverConfigOverride.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/api/solver/SolverConfigOverride.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/api/solver/SolverConfigOverride.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/api/solver/SolverConfigOverride.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/api/solver/SolverConfigOverride.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/api/solver/SolverConfigOverride.java
Show resolved
Hide resolved
|
@triceo I made the changes. I hope everything is better now. |
|
Thank you, Patrick! |
Summary
This PR aims to add support for setting the time spend directly, without relying on manually creating a
TerminationConfigobject (#1254).Added
withTerminationUnimprovedSpentLimitandwithTerminationSpentLimitmethods in theSolverConfigOverrideclass. Also, I added 2 tests to ensure code coverage and a proper functionality.Example