mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Merge pull request #386 from michalmac/master
changes in jsprit-instance readers
This commit is contained in:
commit
78cf643384
3 changed files with 4 additions and 9 deletions
|
|
@ -447,7 +447,6 @@ public class VehicleRoutingProblem {
|
|||
return new VehicleRoutingProblem(this);
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnusedDeclaration")
|
||||
public Builder addLocation(String locationId, Coordinate coordinate) {
|
||||
tentative_coordinates.put(locationId, coordinate);
|
||||
return this;
|
||||
|
|
@ -473,7 +472,6 @@ public class VehicleRoutingProblem {
|
|||
* @param vehicles vehicles to be added
|
||||
* @return this builder
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public Builder addAllVehicles(Collection<? extends Vehicle> vehicles) {
|
||||
for (Vehicle v : vehicles) {
|
||||
addVehicle(v);
|
||||
|
|
|
|||
|
|
@ -103,13 +103,10 @@ public class BelhaizaReader {
|
|||
System.out.println("fix: " + fixedCostPerVehicle + "; perDistance: 1.0; perWaitingTime: 0.8");
|
||||
VehicleTypeImpl vehicleType = typeBuilder.build();
|
||||
double end = Double.parseDouble(tokens[8])*timeProjectionFactor;
|
||||
for(int i=0;i<10;i++) {
|
||||
VehicleImpl vehicle = VehicleImpl.Builder.newInstance("solomonVehicle"+(i+1)).setEarliestStart(0.).setLatestArrival(end)
|
||||
.setStartLocation(Location.Builder.newInstance().setId(customerId)
|
||||
VehicleImpl vehicle = VehicleImpl.Builder.newInstance("solomonVehicle").setEarliestStart(0.).setLatestArrival(end)
|
||||
.setStartLocation(Location.Builder.newInstance().setId(customerId)
|
||||
.setCoordinate(coord).build()).setType(vehicleType).build();
|
||||
vrpBuilder.addVehicle(vehicle);
|
||||
}
|
||||
|
||||
vrpBuilder.addVehicle(vehicle);
|
||||
}
|
||||
else{
|
||||
Service.Builder serviceBuilder = Service.Builder.newInstance(customerId);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public class LuiShenReader {
|
|||
if (counter == 10) {
|
||||
createVehicles(vehicleFile, costScenario, customerId, coord, start, end);
|
||||
} else {
|
||||
Service service = Service.Builder.newInstance("" + counter).addSizeDimension(0, demand)
|
||||
Service service = Service.Builder.newInstance("" + (counter - 10)).addSizeDimension(0, demand)
|
||||
.setLocation(Location.Builder.newInstance().setCoordinate(coord).setId(customerId).build()).setServiceTime(serviceTime)
|
||||
.setTimeWindow(TimeWindow.newInstance(start, end)).build();
|
||||
vrpBuilder.addJob(service);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue