mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
relax api
This commit is contained in:
parent
e21d1ff7c5
commit
5437d384db
405 changed files with 13 additions and 100552 deletions
|
|
@ -22,9 +22,9 @@ package algorithms;
|
|||
|
||||
import basics.route.TourActivity;
|
||||
|
||||
interface ActivityInsertionCostsCalculator {
|
||||
public interface ActivityInsertionCostsCalculator {
|
||||
|
||||
class ActivityInsertionCosts {
|
||||
public class ActivityInsertionCosts {
|
||||
|
||||
private double additionalCosts;
|
||||
private double additionalTime;
|
||||
|
|
@ -50,6 +50,6 @@ interface ActivityInsertionCostsCalculator {
|
|||
|
||||
}
|
||||
|
||||
ActivityInsertionCosts calculate(InsertionContext iContext, TourActivity prevAct, TourActivity nextAct, TourActivity newAct, double depTimeAtPrevAct);
|
||||
public ActivityInsertionCosts calculate(InsertionContext iContext, TourActivity prevAct, TourActivity nextAct, TourActivity newAct, double depTimeAtPrevAct);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,27 +30,32 @@ public class BestInsertionBuilder implements InsertionStrategyBuilder{
|
|||
this.constraintManager = new ConstraintManager();
|
||||
}
|
||||
|
||||
public void addConstraint(HardActivityLevelConstraint hardActvitiyLevelConstraint){
|
||||
public BestInsertionBuilder addConstraint(HardActivityLevelConstraint hardActvitiyLevelConstraint){
|
||||
constraintManager.addConstraint(hardActvitiyLevelConstraint);
|
||||
return this;
|
||||
};
|
||||
|
||||
public void addConstraint(HardRouteLevelConstraint hardRouteLevelConstraint){
|
||||
public BestInsertionBuilder addConstraint(HardRouteLevelConstraint hardRouteLevelConstraint){
|
||||
constraintManager.addConstraint(hardRouteLevelConstraint);
|
||||
return this;
|
||||
};
|
||||
|
||||
//public void setRouteLevel(int forwardLooking, int memory){};
|
||||
|
||||
public void setLocalLevel(){
|
||||
public BestInsertionBuilder setLocalLevel(){
|
||||
local = true;
|
||||
return this;
|
||||
};
|
||||
|
||||
public void considerFixedCosts(double weightOfFixedCosts){
|
||||
public BestInsertionBuilder considerFixedCosts(double weightOfFixedCosts){
|
||||
this.weightOfFixedCosts = weightOfFixedCosts;
|
||||
this.considerFixedCosts = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public void setFleetManager(VehicleFleetManager fleetManager){
|
||||
public BestInsertionBuilder setFleetManager(VehicleFleetManager fleetManager){
|
||||
this.fleetManager = fleetManager;
|
||||
return this;
|
||||
}
|
||||
|
||||
//public void setActivityInsertionCostCalculator(ActivityInsertionCostCalculator costCalc){};
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ final class CalculatesServiceInsertion implements JobInsertionCalculator{
|
|||
|
||||
|
||||
public CalculatesServiceInsertion(VehicleRoutingTransportCosts routingCosts, ActivityInsertionCostsCalculator activityInsertionCostsCalculator, HardRouteLevelConstraint hardRouteLevelConstraint) {
|
||||
|
||||
super();
|
||||
this.activityInsertionCostsCalculator = activityInsertionCostsCalculator;
|
||||
this.hardRouteLevelConstraint = hardRouteLevelConstraint;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue