diff --git a/jsprit-io/src/main/java/com/graphhopper/jsprit/io/algorithm/VehicleRoutingAlgorithms.java b/jsprit-io/src/main/java/com/graphhopper/jsprit/io/algorithm/VehicleRoutingAlgorithms.java index e1bee0cd..400167a6 100644 --- a/jsprit-io/src/main/java/com/graphhopper/jsprit/io/algorithm/VehicleRoutingAlgorithms.java +++ b/jsprit-io/src/main/java/com/graphhopper/jsprit/io/algorithm/VehicleRoutingAlgorithms.java @@ -413,11 +413,11 @@ public class VehicleRoutingAlgorithms { return createAlgo(vrp, algorithmConfig.getXMLConfiguration(), 0, stateManager, null); } - public static VehicleRoutingAlgorithm readAndCreateAlgorithm(final VehicleRoutingProblem vrp, int nThreads, final String configFileName, StateManager stateManager) { + public static VehicleRoutingAlgorithm readAndCreateAlgorithm(final VehicleRoutingProblem vrp, int nThreads, final String configFileName, StateManager stateManager, SolutionCostCalculator solutionCostCalculator) { AlgorithmConfig algorithmConfig = new AlgorithmConfig(); AlgorithmConfigXmlReader xmlReader = new AlgorithmConfigXmlReader(algorithmConfig); xmlReader.read(configFileName); - return createAlgo(vrp, algorithmConfig.getXMLConfiguration(), nThreads, stateManager, null); + return createAlgo(vrp, algorithmConfig.getXMLConfiguration(), nThreads, stateManager, solutionCostCalculator); } public static VehicleRoutingAlgorithm readAndCreateAlgorithm(VehicleRoutingProblem vrp, int nThreads, String configFileName) { @@ -427,13 +427,6 @@ public class VehicleRoutingAlgorithms { return createAlgo(vrp, algorithmConfig.getXMLConfiguration(), nThreads, null, null); } - public static VehicleRoutingAlgorithm readAndCreateAlgorithm(VehicleRoutingProblem vrp, int nThreads, String configFileName, StateManager stateMan, SolutionCostCalculator solutionCostCalculator) { - AlgorithmConfig algorithmConfig = new AlgorithmConfig(); - AlgorithmConfigXmlReader xmlReader = new AlgorithmConfigXmlReader(algorithmConfig); - xmlReader.read(configFileName); - return createAlgo(vrp, algorithmConfig.getXMLConfiguration(), nThreads, stateMan, solutionCostCalculator); - } - private static class OpenRouteStateVerifier implements StateUpdater, ReverseActivityVisitor { private End end;