mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
multiplePickupDeliverOptions (#51)
This commit is contained in:
parent
efd1764dd3
commit
51f6fe4d28
2 changed files with 27 additions and 0 deletions
|
|
@ -301,6 +301,7 @@ public class JobInsertionCostsCalculatorBuilder {
|
|||
switcher.put(Pickup.class, serviceInsertion);
|
||||
switcher.put(Delivery.class, serviceInsertion);
|
||||
switcher.put(Break.class, breakInsertionCalculator);
|
||||
switcher.put(ShipmentWithMutablePickupDeliverOptions.class, shipmentInsertion);
|
||||
|
||||
CalculatorPlusListeners calculatorPlusListeners = new CalculatorPlusListeners(switcher);
|
||||
if (configLocal != null) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
package com.graphhopper.jsprit.core.problem.job;
|
||||
|
||||
|
||||
import com.graphhopper.jsprit.core.problem.Location;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ShipmentWithMutablePickupDeliverOptions extends Shipment {
|
||||
List<Location> pickupPossibleLocations = new ArrayList<>();
|
||||
List<Location> deliverPossibleLocations = new ArrayList<>();
|
||||
|
||||
public ShipmentWithMutablePickupDeliverOptions(Builder builder, List<Location> pickupPossibleLocations, List<Location> deliverPossibleLocations) {
|
||||
super(builder);
|
||||
this.pickupPossibleLocations.addAll(pickupPossibleLocations);
|
||||
this.deliverPossibleLocations.addAll(deliverPossibleLocations);
|
||||
}
|
||||
|
||||
public List<Location> getDeliverPossibleLocations() {
|
||||
return deliverPossibleLocations;
|
||||
}
|
||||
|
||||
public List<Location> getPickupPossibleLocations() {
|
||||
return pickupPossibleLocations;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue