-
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: add new reconfiguration process #1352
base: main
Are you sure you want to change the base?
Conversation
3c0f684
to
e378a1b
Compare
21ceb92
to
ab40648
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.
First round of review is in.
My most general comment is: we need a different name for "reconfiguration". I know that the papers use this word, but we cannot. We already have "configuration", and using "reconfiguration" would be confusing - the "configuration" in "reconfiguration" has nothing to do with solver configuration.
Reheating? Restart? Refresh? Reboot? Let's discuss.
core/src/main/java/ai/timefold/solver/core/config/solver/PreviewFeature.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/impl/localsearch/decider/LocalSearchDecider.java
Outdated
Show resolved
Hide resolved
...n/java/ai/timefold/solver/core/impl/localsearch/decider/acceptor/ReconfigurableAcceptor.java
Outdated
Show resolved
Hide resolved
...n/java/ai/timefold/solver/core/impl/localsearch/decider/acceptor/ReconfigurableAcceptor.java
Outdated
Show resolved
Hide resolved
.../solver/core/impl/localsearch/decider/acceptor/restart/AbstractGeometricRestartStrategy.java
Outdated
Show resolved
Hide resolved
...i/timefold/solver/core/impl/localsearch/decider/reconfiguration/ReconfigurationStrategy.java
Outdated
Show resolved
Hide resolved
...ore/impl/localsearch/decider/reconfiguration/RestoreBestSolutionReconfigurationStrategy.java
Outdated
Show resolved
Hide resolved
...ore/impl/localsearch/decider/reconfiguration/RestoreBestSolutionReconfigurationStrategy.java
Outdated
Show resolved
Hide resolved
...ore/impl/localsearch/decider/reconfiguration/RestoreBestSolutionReconfigurationStrategy.java
Outdated
Show resolved
Hide resolved
...test/java/ai/timefold/solver/core/impl/localsearch/decider/acceptor/AcceptorFactoryTest.java
Show resolved
Hide resolved
Another concern: we only support LA (and DLAS). But shouldn't we support simulated annealing too? In SA, the process is actually called reheating, and is well researched as far as I know. For the record: I don't much care for SA, because it is hard to configure and therefore not much useful. But if we don't support reheating the SA, it should be a conscious decision, and not just something we forgot to do. |
.../solver/core/impl/localsearch/decider/acceptor/restart/AbstractGeometricRestartStrategy.java
Outdated
Show resolved
Hide resolved
.../solver/core/impl/localsearch/decider/acceptor/restart/AbstractGeometricRestartStrategy.java
Outdated
Show resolved
Hide resolved
.../solver/core/impl/localsearch/decider/acceptor/restart/AbstractGeometricRestartStrategy.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.
Next round of comments.
...er/core/impl/localsearch/decider/acceptor/restart/UnimprovedMoveCountStuckCriterionTest.java
Show resolved
Hide resolved
...main/java/ai/timefold/solver/core/impl/localsearch/decider/acceptor/RestartableAcceptor.java
Outdated
Show resolved
Hide resolved
...core/impl/localsearch/decider/acceptor/lateacceptance/DiversifiedLateAcceptanceAcceptor.java
Outdated
Show resolved
Hide resolved
protected final Clock clock; | ||
protected final Logger logger = LoggerFactory.getLogger(AbstractGeometricRestartStrategy.class); | ||
protected final double scalingFactor; | ||
private static final long GRACE_PERIOD_MILLIS = 30_000; // Same value as DiminishedReturnsTermination |
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.
Questionable. If the diminished termination is enabled, don't we want the solver to be able to restart before the termination triggers? Then arguably this should be less than whatever the termination is configured to be. But I'm not sure if we even want that.
Should we detect the termination in the solver config? Should we depend on whatever values the user has configured there? I'm not sure either.
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.
I understand your viewpoint and struggled to select an appropriate default value. That's why I opted for the same value as the diminished termination.
However, I believe we should not rely on that termination at all. This should stand as an independent value.
...d/solver/core/impl/localsearch/decider/acceptor/restart/AbstractGeometricStuckCriterion.java
Outdated
Show resolved
Hide resolved
...solver/core/impl/localsearch/decider/acceptor/restart/UnimprovedMoveCountStuckCriterion.java
Outdated
Show resolved
Hide resolved
...ava/ai/timefold/solver/core/impl/localsearch/decider/reconfiguration/AdaptedSolverScope.java
Outdated
Show resolved
Hide resolved
...n/java/ai/timefold/solver/core/impl/localsearch/decider/reconfiguration/RestartStrategy.java
Outdated
Show resolved
Hide resolved
...solver/core/impl/localsearch/decider/reconfiguration/RestoreBestSolutionRestartStrategy.java
Outdated
Show resolved
Hide resolved
core/src/main/java/ai/timefold/solver/core/impl/phase/scope/AbstractPhaseScope.java
Outdated
Show resolved
Hide resolved
…ntain the diversity
f5cbb54
to
dbec0f5
Compare
Quality Gate passedIssues Measures |
This pull request introduces a restart mechanism for the LS phase and a reconfiguration process.