mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
bugfix #155
This commit is contained in:
parent
a893fd9dc7
commit
917d5d3d2c
1 changed files with 5 additions and 1 deletions
|
|
@ -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() {
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue