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

replace deprecated methods

This commit is contained in:
oblonski 2015-03-09 17:59:04 +01:00
parent 335b58d95a
commit db0cdbe310
61 changed files with 752 additions and 744 deletions

View file

@ -17,6 +17,7 @@
package jsprit.instance.reader;
import jsprit.core.problem.Location;
import jsprit.core.problem.VehicleRoutingProblem;
import jsprit.core.problem.VehicleRoutingProblem.FleetSize;
import jsprit.core.problem.job.Service;
@ -104,12 +105,14 @@ public class SolomonReader {
VehicleTypeImpl vehicleType = typeBuilder.build();
VehicleImpl vehicle = VehicleImpl.Builder.newInstance("solomonVehicle").setEarliestStart(start).setLatestArrival(end)
.setStartLocationId(customerId).setStartLocationCoordinate(coord).setType(vehicleType).build();
.setStartLocation(Location.Builder.newInstance().setId(customerId)
.setCoordinate(coord).build()).setType(vehicleType).build();
vrpBuilder.addVehicle(vehicle);
}
else{
Service service = Service.Builder.newInstance(customerId).addSizeDimension(0, demand).setCoord(coord).setLocationId(customerId).setServiceTime(serviceTime)
Service service = Service.Builder.newInstance(customerId).addSizeDimension(0, demand)
.setLocation(Location.Builder.newInstance().setCoordinate(coord).setId(customerId).build()).setServiceTime(serviceTime)
.setTimeWindow(TimeWindow.newInstance(start, end)).build();
vrpBuilder.addJob(service);
}