mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
OPTI-871: enable serialization of VehicleRoutingProblem
This commit is contained in:
parent
4102a3d488
commit
c0218b3927
1 changed files with 5 additions and 1 deletions
|
|
@ -599,7 +599,11 @@ public class VehicleRoutingProblem {
|
|||
this.jobs = builder.jobs;
|
||||
this.fleetSize = builder.fleetSize;
|
||||
this.vehicles = builder.uniqueVehicles;
|
||||
this.vehicleTypes = builder.vehicleTypes.values();
|
||||
|
||||
//this allow us to serialize the vrp object, as builder.vehicleTypes.values() return transient collection
|
||||
this.vehicleTypes = new HashSet<>();
|
||||
vehicleTypes.addAll(builder.vehicleTypes.values());
|
||||
|
||||
this.initialVehicleRoutes = builder.initialRoutes;
|
||||
this.transportCosts = builder.transportCosts;
|
||||
this.activityCosts = builder.activityCosts;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue