Skip to content
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

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6df9fc7
feat: add new reconfiguration strategy
zepfred Jan 3, 2025
4a7f211
feat: perturbation using ruin and recreate moves
zepfred Jan 10, 2025
b64132c
feat: improve reconfiguration strategy
zepfred Jan 21, 2025
a5dacd6
feat: improve reconfiguration strategy
zepfred Jan 22, 2025
e592dc3
feat: new reconfiguration strategy
zepfred Jan 22, 2025
856cd99
fix: cancel reconfiguration when it is done
zepfred Jan 22, 2025
245572c
feat: add reconfiguration to MT contract
zepfred Jan 22, 2025
2b809e6
chore: reconfiguration strategy compatible with MT
zepfred Jan 22, 2025
6d7499d
feat: different restart strategies
zepfred Jan 23, 2025
020c3cd
chore: minor fix
zepfred Jan 24, 2025
8f89f74
chore: minor fix
zepfred Jan 24, 2025
7a0fc0e
chore: simplify logic
zepfred Jan 24, 2025
cea2d3e
chore: remove preview feature
zepfred Jan 24, 2025
e4a4ea6
chore: address sonar
zepfred Jan 24, 2025
f89e3c0
chore: simplify the reconfiguration logic
zepfred Jan 27, 2025
8bc0cc8
chore: simplify the reconfiguration logic
zepfred Jan 27, 2025
aea6510
chore: address comments
zepfred Jan 27, 2025
8fdfd53
chore: update only the current score of the late elements list to mai…
zepfred Jan 27, 2025
6221966
chore: formatting
zepfred Jan 27, 2025
4a1b322
chore: improve restart logic
zepfred Jan 28, 2025
99f72c2
chore: address comments
zepfred Jan 29, 2025
dbec0f5
feat: relative stuck criterion definition
zepfred Jan 29, 2025
4908ff5
chore: ensure initialization
zepfred Jan 30, 2025
bf87fbe
chore: address comments
zepfred Jan 31, 2025
47d76a7
feat: new stuck criterion
zepfred Feb 5, 2025
0bcd8d2
chore: temp info log
zepfred Feb 5, 2025
6f568f8
chore: increase window
zepfred Feb 6, 2025
7d2d0f3
feat: reset stuck criterion after an improvement
zepfred Feb 7, 2025
139eb04
feat: update initial window size
zepfred Feb 7, 2025
9497be1
chore: change the restart approach
zepfred Feb 11, 2025
9dd7178
chore: package rename
zepfred Feb 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: simplify the reconfiguration logic
zepfred committed Jan 29, 2025
commit 8bc0cc8652d6f172c0e4cca56266a68ac1ccb2e0
Original file line number Diff line number Diff line change
@@ -55,10 +55,10 @@ public boolean isAccepted(LocalSearchMoveScope<Solution_> moveScope) {
moveScope.getStepScope().getPhaseScope().triggerReconfiguration();
return true;
}
return evaluate(moveScope);
return applyAcceptanceCriteria(moveScope);
}

protected abstract boolean evaluate(LocalSearchMoveScope<Solution_> moveScope);
protected abstract boolean applyAcceptanceCriteria(LocalSearchMoveScope<Solution_> moveScope);

protected abstract <Score_ extends Score<Score_>> void reset(Score_ score);
protected abstract <Score_ extends Score<Score_>> void applyReplacementCriteria(Score_ score);
}
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ private void validate() {

@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
protected boolean evaluate(LocalSearchMoveScope<Solution_> moveScope) {
protected boolean applyAcceptanceCriteria(LocalSearchMoveScope<Solution_> moveScope) {
zepfred marked this conversation as resolved.
Show resolved Hide resolved
// The acceptance and replacement strategies are based on the work:
// Diversified Late Acceptance Search by M. Namazi, C. Sanderson, M. A. H. Newton, M. M. A. Polash, and A. Sattar
var moveScore = moveScope.getScore();
@@ -77,7 +77,7 @@ protected boolean evaluate(LocalSearchMoveScope<Solution_> moveScope) {
}

@Override
protected <Score_ extends Score<Score_>> void reset(Score_ score) {
protected <Score_ extends Score<Score_>> void applyReplacementCriteria(Score_ score) {
previousScores[lateScoreIndex] = score;
}

Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ private void validate() {

@Override
@SuppressWarnings("unchecked")
public boolean evaluate(LocalSearchMoveScope<Solution_> moveScope) {
public boolean applyAcceptanceCriteria(LocalSearchMoveScope<Solution_> moveScope) {
var moveScore = moveScope.getScore();
var lateScore = previousScores[lateScoreIndex];
if (moveScore.compareTo(lateScore) >= 0) {
@@ -66,7 +66,7 @@ public boolean evaluate(LocalSearchMoveScope<Solution_> moveScope) {
}

@Override
protected <Score_ extends Score<Score_>> void reset(Score_ score) {
protected <Score_ extends Score<Score_>> void applyReplacementCriteria(Score_ score) {
previousScores[lateScoreIndex] = score;
}