mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
adjusted examples to multiple cap dims
This commit is contained in:
parent
794ce90e6a
commit
71f19d9fbe
23 changed files with 144 additions and 142 deletions
|
|
@ -75,7 +75,7 @@ public class MultipleDepotExampleWithPenaltyVehicles {
|
|||
int depotCounter = 1;
|
||||
for(Coordinate depotCoord : Arrays.asList(firstDepotCoord,second)){
|
||||
for(int i=0;i<nuOfVehicles;i++){
|
||||
VehicleType vehicleType = VehicleTypeImpl.Builder.newInstance(depotCounter + "_type", capacity).setCostPerDistance(1.0).build();
|
||||
VehicleType vehicleType = VehicleTypeImpl.Builder.newInstance(depotCounter + "_type").addCapacityDimension(0, capacity).setCostPerDistance(1.0).build();
|
||||
String vehicleId = depotCounter + "_" + (i+1) + "_vehicle";
|
||||
VehicleImpl.Builder vehicleBuilder = VehicleImpl.Builder.newInstance(vehicleId);
|
||||
vehicleBuilder.setStartLocationCoordinate(depotCoord);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue