1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00
This commit is contained in:
oblonski 2015-04-22 00:43:13 +02:00
parent a893fd9dc7
commit 917d5d3d2c

View file

@ -256,6 +256,8 @@ public class Jsprit {
private boolean addCoreConstraints;
private SolutionCostCalculator objectiveFunction = null;
private Properties properties;
private Jsprit(Builder builder) {
@ -265,6 +267,7 @@ public class Jsprit {
this.noThreads = builder.noThreads;
this.addCoreConstraints = builder.addConstraints;
this.properties = builder.properties;
this.objectiveFunction = builder.objectiveFunction;
}
private VehicleRoutingAlgorithm create(final VehicleRoutingProblem vrp){
@ -503,7 +506,8 @@ public class Jsprit {
return Double.valueOf(string);
}
private static SolutionCostCalculator getObjectiveFunction(final VehicleRoutingProblem vrp, final double maxCosts) {
private SolutionCostCalculator getObjectiveFunction(final VehicleRoutingProblem vrp, final double maxCosts) {
if(objectiveFunction != null) return objectiveFunction;
return new SolutionCostCalculator() {