mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
enable serialize vehicles
This commit is contained in:
parent
c0218b3927
commit
dfd9d47b18
3 changed files with 14 additions and 9 deletions
|
|
@ -41,16 +41,14 @@ import com.graphhopper.jsprit.core.problem.solution.SolutionCostCalculator;
|
|||
import com.graphhopper.jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import com.graphhopper.jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.FiniteFleetManagerFactory;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.Vehicle;
|
||||
import com.graphhopper.jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||
import com.graphhopper.jsprit.core.reporting.SolutionPrinter;
|
||||
import com.graphhopper.jsprit.core.util.Solutions;
|
||||
import com.graphhopper.jsprit.instance.reader.CordeauReader;
|
||||
import com.graphhopper.jsprit.util.Examples;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
public class BuildAlgorithmFromScratch {
|
||||
|
||||
|
|
@ -129,8 +127,9 @@ public class BuildAlgorithmFromScratch {
|
|||
|
||||
|
||||
public static VehicleRoutingAlgorithm createAlgorithm(final VehicleRoutingProblem vrp) {
|
||||
|
||||
VehicleFleetManager fleetManager = new FiniteFleetManagerFactory(vrp.getVehicles()).createFleetManager();
|
||||
Set<Vehicle> vehicles = new HashSet<>();
|
||||
vehicles.addAll(vrp.getVehicles());
|
||||
VehicleFleetManager fleetManager = new FiniteFleetManagerFactory(vehicles).createFleetManager();
|
||||
StateManager stateManager = new StateManager(vrp);
|
||||
ConstraintManager constraintManager = new ConstraintManager(vrp, stateManager);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue