mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
mod example
This commit is contained in:
parent
5eaa288735
commit
4c4d9ea96d
1 changed files with 9 additions and 14 deletions
|
|
@ -47,10 +47,6 @@ public class MultipleDepotExampleWithPenaltyVehicles {
|
|||
Coordinate firstDepotCoord = Coordinate.newInstance(-33, 33);
|
||||
Coordinate second = Coordinate.newInstance(33, -33);
|
||||
|
||||
/*
|
||||
* number of penalty vehicles
|
||||
*/
|
||||
int nuOfPenaltyVehicles = 4;
|
||||
int depotCounter = 1;
|
||||
for(Coordinate depotCoord : Arrays.asList(firstDepotCoord,second)){
|
||||
for(int i=0;i<nuOfVehicles;i++){
|
||||
|
|
@ -63,7 +59,6 @@ public class MultipleDepotExampleWithPenaltyVehicles {
|
|||
Vehicle vehicle = vehicleBuilder.build();
|
||||
vrpBuilder.addVehicle(vehicle);
|
||||
}
|
||||
// for(int i=0;i<nuOfPenaltyVehicles;i++){
|
||||
VehicleType penaltyType = VehicleType.Builder.newInstance(depotCounter + "_type#penalty", capacity).setFixedCost(50).setCostPerDistance(3.0).build();
|
||||
String vehicleId = depotCounter + "_vehicle#penalty";
|
||||
VehicleImpl.VehicleBuilder vehicleBuilder = VehicleImpl.VehicleBuilder.newInstance(vehicleId);
|
||||
|
|
@ -72,7 +67,7 @@ public class MultipleDepotExampleWithPenaltyVehicles {
|
|||
vehicleBuilder.setLatestArrival(maxDuration);
|
||||
Vehicle penaltyVehicle = vehicleBuilder.build();
|
||||
vrpBuilder.addVehicle(penaltyVehicle);
|
||||
// }
|
||||
|
||||
depotCounter++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue