1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

rename vehicle id

This commit is contained in:
oblonski 2015-03-24 09:14:29 +01:00
parent 76ea79bb71
commit 1cd1733a7a
2 changed files with 3 additions and 10 deletions

View file

@ -5,7 +5,6 @@ import jsprit.core.problem.VehicleRoutingProblem;
import jsprit.core.problem.job.Service;
import jsprit.core.problem.solution.route.activity.TimeWindow;
import jsprit.core.problem.vehicle.VehicleImpl;
import jsprit.core.util.Coordinate;
import jsprit.core.util.FastVehicleRoutingTransportCostsMatrix;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -57,7 +56,7 @@ public class LopezIbanezBlumReader {
int nodeIndex = lineCount - 2 - noNodes;
String[] twTokens = line.split("\\s+");
if(nodeIndex == 0){
VehicleImpl travelingSalesman = VehicleImpl.Builder.newInstance(""+nodeIndex).setStartLocation(Location.newInstance(nodeIndex))
VehicleImpl travelingSalesman = VehicleImpl.Builder.newInstance("traveling_salesman").setStartLocation(Location.newInstance(nodeIndex))
.setEarliestStart(Double.parseDouble(twTokens[0])).setLatestArrival(Double.parseDouble(twTokens[1])).build();
builder.addVehicle(travelingSalesman);
}
@ -107,12 +106,6 @@ public class LopezIbanezBlumReader {
}
}
private Coordinate makeCoord(String xString, String yString) {
double x = Double.parseDouble(xString);
double y = Double.parseDouble(yString);
return new Coordinate(x,y);
}
private BufferedReader getReader(String solomonFile) {
BufferedReader reader = null;
try {