mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
issue #144 - change VehicleRoutingTransportCosts from String to Location
This commit is contained in:
parent
7e39d08e3d
commit
7ea5c5d650
51 changed files with 904 additions and 800 deletions
|
|
@ -23,6 +23,7 @@ import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
|||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||
import jsprit.core.algorithm.selector.SelectBest;
|
||||
import jsprit.core.analysis.SolutionAnalyser;
|
||||
import jsprit.core.problem.Location;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.io.VrpXMLReader;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
|
|
@ -99,8 +100,8 @@ public class PickupAndDeliveryExample {
|
|||
SolutionAnalyser analyser = new SolutionAnalyser(vrp,solution,new SolutionAnalyser.DistanceCalculator() {
|
||||
|
||||
@Override
|
||||
public double getDistance(String fromLocationId, String toLocationId) {
|
||||
return vrp.getTransportCosts().getTransportCost(fromLocationId,toLocationId,0.,null,null);
|
||||
public double getDistance(Location from, Location to) {
|
||||
return vrp.getTransportCosts().getTransportCost(from, to,0.,null,null);
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue