mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Merge branch 'routes-with-specified-start-and-end' into
access-egress-costs-merged-with-routes-with-spec-start-end Conflicts: jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestCalculatesServiceInsertion.java jsprit-examples/src/main/java/jsprit/examples/MultipleDepotExampleWithPenaltyVehicles.java jsprit-examples/src/main/java/jsprit/examples/SolomonExample.java jsprit-examples/src/main/java/jsprit/examples/SolomonOpenExample.java
This commit is contained in:
commit
6dbcd7431a
75 changed files with 4281 additions and 525 deletions
|
|
@ -304,7 +304,7 @@ public class BicycleMessenger {
|
|||
|
||||
static double getTimeOfDirectRoute(Job job, Vehicle v, VehicleRoutingTransportCosts routingCosts) {
|
||||
Shipment envelope = (Shipment) job;
|
||||
double direct = routingCosts.getTransportTime(v.getLocationId(), envelope.getPickupLocation(), 0.0, DriverImpl.noDriver(), v) +
|
||||
double direct = routingCosts.getTransportTime(v.getStartLocationId(), envelope.getPickupLocation(), 0.0, DriverImpl.noDriver(), v) +
|
||||
routingCosts.getTransportTime(envelope.getPickupLocation(), envelope.getDeliveryLocation(), 0.0, DriverImpl.noDriver(), v);
|
||||
return direct;
|
||||
}
|
||||
|
|
@ -342,7 +342,7 @@ public class BicycleMessenger {
|
|||
if(firstLine) { firstLine = false; continue; }
|
||||
String[] tokens = line.split("\\s+");
|
||||
//build your vehicle
|
||||
Vehicle vehicle = VehicleImpl.Builder.newInstance(tokens[1]).setLocationCoord(Coordinate.newInstance(Double.parseDouble(tokens[2]), Double.parseDouble(tokens[3])))
|
||||
Vehicle vehicle = VehicleImpl.Builder.newInstance(tokens[1]).setStartLocationCoordinate(Coordinate.newInstance(Double.parseDouble(tokens[2]), Double.parseDouble(tokens[3])))
|
||||
.setReturnToDepot(false).setType(messengerType).build();
|
||||
problemBuilder.addVehicle(vehicle);
|
||||
//build the penalty vehicle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue