mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
removed constructor from StateManager and its according implications
This commit is contained in:
parent
279826f061
commit
00eef79679
6 changed files with 28 additions and 196 deletions
|
|
@ -18,15 +18,8 @@
|
|||
******************************************************************************/
|
||||
package jsprit.examples;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import jsprit.analysis.toolbox.SolutionPrinter;
|
||||
import jsprit.core.algorithm.InsertionInitialSolutionFactory;
|
||||
import jsprit.core.algorithm.RemoveEmptyVehicles;
|
||||
import jsprit.core.algorithm.SearchStrategy;
|
||||
import jsprit.core.algorithm.SearchStrategyManager;
|
||||
import jsprit.core.algorithm.VariablePlusFixedSolutionCostCalculatorFactory;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.*;
|
||||
import jsprit.core.algorithm.acceptor.GreedyAcceptance;
|
||||
import jsprit.core.algorithm.module.RuinAndRecreateModule;
|
||||
import jsprit.core.algorithm.recreate.BestInsertionBuilder;
|
||||
|
|
@ -49,6 +42,8 @@ import jsprit.core.util.Solutions;
|
|||
import jsprit.instance.reader.SolomonReader;
|
||||
import jsprit.util.Examples;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class BuildAlgorithmFromScratch {
|
||||
|
||||
/**
|
||||
|
|
@ -99,7 +94,7 @@ public class BuildAlgorithmFromScratch {
|
|||
/*
|
||||
* manages route and activity states.
|
||||
*/
|
||||
StateManager stateManager = new StateManager(vrp.getTransportCosts());
|
||||
StateManager stateManager = new StateManager(vrp);
|
||||
/*
|
||||
* tells stateManager to update load states
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,15 +18,8 @@
|
|||
******************************************************************************/
|
||||
package jsprit.examples;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import jsprit.analysis.toolbox.SolutionPrinter;
|
||||
import jsprit.core.algorithm.InsertionInitialSolutionFactory;
|
||||
import jsprit.core.algorithm.RemoveEmptyVehicles;
|
||||
import jsprit.core.algorithm.SearchStrategy;
|
||||
import jsprit.core.algorithm.SearchStrategyManager;
|
||||
import jsprit.core.algorithm.VariablePlusFixedSolutionCostCalculatorFactory;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.*;
|
||||
import jsprit.core.algorithm.acceptor.GreedyAcceptance;
|
||||
import jsprit.core.algorithm.module.RuinAndRecreateModule;
|
||||
import jsprit.core.algorithm.recreate.BestInsertionBuilder;
|
||||
|
|
@ -49,6 +42,8 @@ import jsprit.core.util.Solutions;
|
|||
import jsprit.instance.reader.SolomonReader;
|
||||
import jsprit.util.Examples;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class BuildAlgorithmFromScratchWithHardAndSoftConstraints {
|
||||
|
||||
/**
|
||||
|
|
@ -99,7 +94,7 @@ public class BuildAlgorithmFromScratchWithHardAndSoftConstraints {
|
|||
/*
|
||||
* manages route and activity states.
|
||||
*/
|
||||
StateManager stateManager = new StateManager(vrp.getTransportCosts());
|
||||
StateManager stateManager = new StateManager(vrp);
|
||||
/*
|
||||
* tells stateManager to update load states
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -18,8 +18,6 @@
|
|||
******************************************************************************/
|
||||
package jsprit.examples;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import jsprit.analysis.toolbox.GraphStreamViewer;
|
||||
import jsprit.analysis.toolbox.GraphStreamViewer.Label;
|
||||
import jsprit.analysis.toolbox.Plotter;
|
||||
|
|
@ -45,6 +43,8 @@ import jsprit.core.util.Coordinate;
|
|||
import jsprit.core.util.Solutions;
|
||||
import jsprit.util.Examples;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class TransportOfDisabledPeople {
|
||||
|
||||
static int WHEELCHAIRSPACE_INDEX = 0;
|
||||
|
|
@ -166,7 +166,7 @@ public class TransportOfDisabledPeople {
|
|||
//build the problem
|
||||
VehicleRoutingProblem problem = vrpBuilder.build();
|
||||
|
||||
StateManager stateManager = new StateManager(problem.getTransportCosts());
|
||||
StateManager stateManager = new StateManager(problem);
|
||||
|
||||
ConstraintManager constraintManager = new ConstraintManager(problem, stateManager);
|
||||
constraintManager.addConstraint(wheelchair_bus_passenger_pickup_constraint);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue