mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
prio improvement
This commit is contained in:
parent
c47dae32d3
commit
f54241144c
2 changed files with 4 additions and 4 deletions
|
|
@ -100,14 +100,14 @@ public final class BestInsertion extends AbstractInsertionStrategy {
|
|||
|
||||
|
||||
private void sometimesSortPriorities(List<Job> unassignedJobList) {
|
||||
if(random.nextDouble() < 0.5){
|
||||
// if(random.nextDouble() < 0.5){
|
||||
Collections.sort(unassignedJobList, new Comparator<Job>() {
|
||||
@Override
|
||||
public int compare(Job o1, Job o2) {
|
||||
return o1.getPriority() - o2.getPriority();
|
||||
}
|
||||
});
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,14 +150,14 @@ public final class BestInsertionConcurrent extends AbstractInsertionStrategy {
|
|||
}
|
||||
|
||||
private void sometimesSortPriorities(List<Job> unassignedJobList) {
|
||||
if(random.nextDouble() < 0.5){
|
||||
// if(random.nextDouble() < 0.5){
|
||||
Collections.sort(unassignedJobList, new Comparator<Job>() {
|
||||
@Override
|
||||
public int compare(Job o1, Job o2) {
|
||||
return o1.getPriority() - o2.getPriority();
|
||||
}
|
||||
});
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
private Insertion getBestInsertion(Batch batch, Job unassignedJob) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue