1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

replace HashMap by LinkedHashMap to ensure reproducibility (#156)

This commit is contained in:
oblonski 2015-04-27 14:37:56 +02:00
parent 3772436140
commit 62e1057518

View file

@ -122,17 +122,17 @@ public class VrpXMLReader{
public VrpXMLReader(VehicleRoutingProblem.Builder vrpBuilder, Collection<VehicleRoutingProblemSolution> solutions){ public VrpXMLReader(VehicleRoutingProblem.Builder vrpBuilder, Collection<VehicleRoutingProblemSolution> solutions){
this.vrpBuilder = vrpBuilder; this.vrpBuilder = vrpBuilder;
this.vehicleMap = new HashMap<String, Vehicle>(); this.vehicleMap = new LinkedHashMap<String, Vehicle>();
this.serviceMap = new HashMap<String, Service>(); this.serviceMap = new LinkedHashMap<String, Service>();
this.shipmentMap = new HashMap<String, Shipment>(); this.shipmentMap = new LinkedHashMap<String, Shipment>();
this.solutions = solutions; this.solutions = solutions;
} }
public VrpXMLReader(VehicleRoutingProblem.Builder vrpBuilder){ public VrpXMLReader(VehicleRoutingProblem.Builder vrpBuilder){
this.vrpBuilder = vrpBuilder; this.vrpBuilder = vrpBuilder;
this.vehicleMap = new HashMap<String, Vehicle>(); this.vehicleMap = new LinkedHashMap<String, Vehicle>();
this.serviceMap = new HashMap<String, Service>(); this.serviceMap = new LinkedHashMap<String, Service>();
this.shipmentMap = new HashMap<String, Shipment>(); this.shipmentMap = new LinkedHashMap<String, Shipment>();
this.solutions = null; this.solutions = null;
} }