mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
improve regret insertion
This commit is contained in:
parent
db7bd290dc
commit
fc3121c905
5 changed files with 50 additions and 34 deletions
|
|
@ -124,10 +124,17 @@ public class AlgorithmEventsRecorder implements RuinListener, IterationStartsLis
|
|||
public void ruinStarts(Collection<VehicleRoute> routes) {
|
||||
if(!record()) return;
|
||||
fileSink.stepBegins(graph.getId(),0,BEFORE_RUIN_RENDER_SOLUTION);
|
||||
markAllNodesAsInserted();
|
||||
addRoutes(routes);
|
||||
fileSink.stepBegins(graph.getId(),0,RUIN);
|
||||
}
|
||||
|
||||
private void markAllNodesAsInserted() {
|
||||
for(Job j : vrp.getJobs().values()){
|
||||
markInserted(j);
|
||||
}
|
||||
}
|
||||
|
||||
private void addRoutes(Collection<VehicleRoute> routes) {
|
||||
for(VehicleRoute route : routes){
|
||||
String prevNode = makeStartId(route.getVehicle());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue