1
0
Fork 0
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:
oblonski 2014-11-26 00:02:15 +01:00
parent db7bd290dc
commit fc3121c905
5 changed files with 50 additions and 34 deletions

View file

@ -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());