mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
optimize imports
This commit is contained in:
parent
1fa8afadb6
commit
330c87fc26
44 changed files with 176 additions and 243 deletions
|
|
@ -16,14 +16,14 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm;
|
package jsprit.core.algorithm;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.recreate.listener.InsertionEndsListener;
|
import jsprit.core.algorithm.recreate.listener.InsertionEndsListener;
|
||||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
public class RemoveEmptyVehicles implements InsertionEndsListener{
|
public class RemoveEmptyVehicles implements InsertionEndsListener{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm;
|
package jsprit.core.algorithm;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||||
import jsprit.core.problem.job.Job;
|
import jsprit.core.problem.job.Job;
|
||||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
public class ResetAndIniFleetManager implements InsertionStartsListener{
|
public class ResetAndIniFleetManager implements InsertionStartsListener{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.box;
|
package jsprit.core.algorithm.box;
|
||||||
|
|
||||||
import java.net.URL;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||||
import jsprit.core.algorithm.io.AlgorithmConfig;
|
import jsprit.core.algorithm.io.AlgorithmConfig;
|
||||||
import jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
import jsprit.core.algorithm.io.AlgorithmConfigXmlReader;
|
||||||
|
|
@ -25,6 +23,8 @@ import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.util.Resource;
|
import jsprit.core.util.Resource;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.listener;
|
package jsprit.core.algorithm.listener;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,12 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.listener;
|
package jsprit.core.algorithm.listener;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.listener;
|
package jsprit.core.algorithm.listener;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.listener;
|
package jsprit.core.algorithm.listener;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,12 +16,12 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.listener;
|
package jsprit.core.algorithm.listener;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.SearchStrategyManager;
|
import jsprit.core.algorithm.SearchStrategyManager;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,18 +16,13 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.listener;
|
package jsprit.core.algorithm.listener;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.Comparator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.TreeSet;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.SearchStrategyManager;
|
import jsprit.core.algorithm.SearchStrategyManager;
|
||||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,5 @@
|
||||||
package jsprit.core.algorithm.recreate;
|
package jsprit.core.algorithm.recreate;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
import jsprit.core.algorithm.recreate.InsertionData.NoInsertionFound;
|
|
||||||
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||||
import jsprit.core.problem.driver.Driver;
|
import jsprit.core.problem.driver.Driver;
|
||||||
import jsprit.core.problem.job.Job;
|
import jsprit.core.problem.job.Job;
|
||||||
|
|
@ -13,6 +9,10 @@ import jsprit.core.util.RandomNumberGeneration;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
class CalculatesServiceInsertionWithTimeScheduling implements JobInsertionCostsCalculator{
|
class CalculatesServiceInsertionWithTimeScheduling implements JobInsertionCostsCalculator{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,14 +17,14 @@
|
||||||
package jsprit.core.algorithm.recreate;
|
package jsprit.core.algorithm.recreate;
|
||||||
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||||
import jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
import jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.job.Job;
|
import jsprit.core.problem.job.Job;
|
||||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
final class ConfigureFixCostCalculator implements InsertionStartsListener, JobInsertedListener{
|
final class ConfigureFixCostCalculator implements InsertionStartsListener, JobInsertedListener{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.recreate;
|
package jsprit.core.algorithm.recreate;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
import jsprit.core.algorithm.recreate.listener.InsertionStartsListener;
|
||||||
import jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
import jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
||||||
import jsprit.core.problem.constraint.SoftRouteConstraint;
|
import jsprit.core.problem.constraint.SoftRouteConstraint;
|
||||||
|
|
@ -28,6 +26,8 @@ import jsprit.core.problem.misc.JobInsertionContext;
|
||||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||||
import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
public class DellAmicoFixCostCalculator implements SoftRouteConstraint, InsertionStartsListener, JobInsertedListener{
|
public class DellAmicoFixCostCalculator implements SoftRouteConstraint, InsertionStartsListener, JobInsertedListener{
|
||||||
|
|
||||||
private int nuOfJobsToRecreate;
|
private int nuOfJobsToRecreate;
|
||||||
|
|
|
||||||
|
|
@ -18,14 +18,14 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.recreate;
|
package jsprit.core.algorithm.recreate;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import jsprit.core.problem.driver.Driver;
|
import jsprit.core.problem.driver.Driver;
|
||||||
import jsprit.core.problem.job.Job;
|
import jsprit.core.problem.job.Job;
|
||||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||||
import jsprit.core.problem.vehicle.Vehicle;
|
import jsprit.core.problem.vehicle.Vehicle;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
class JobCalculatorSwitcher implements JobInsertionCostsCalculator{
|
class JobCalculatorSwitcher implements JobInsertionCostsCalculator{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.recreate.listener;
|
package jsprit.core.algorithm.recreate.listener;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface InsertionEndsListener extends InsertionListener {
|
public interface InsertionEndsListener extends InsertionListener {
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.recreate.listener;
|
package jsprit.core.algorithm.recreate.listener;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.problem.job.Job;
|
import jsprit.core.problem.job.Job;
|
||||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface InsertionStartsListener extends InsertionListener {
|
public interface InsertionStartsListener extends InsertionListener {
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.selector;
|
package jsprit.core.algorithm.selector;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.selector;
|
package jsprit.core.algorithm.selector;
|
||||||
|
|
||||||
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
import jsprit.core.util.RandomNumberGeneration;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
|
||||||
import jsprit.core.util.RandomNumberGeneration;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.selector;
|
package jsprit.core.algorithm.selector;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface SolutionSelector {
|
public interface SolutionSelector {
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.problem.constraint;
|
package jsprit.core.problem.constraint;
|
||||||
|
|
||||||
|
import jsprit.core.problem.misc.JobInsertionContext;
|
||||||
|
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
import jsprit.core.problem.misc.JobInsertionContext;
|
|
||||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
|
||||||
|
|
||||||
class SoftActivityConstraintManager implements SoftActivityConstraint{
|
class SoftActivityConstraintManager implements SoftActivityConstraint{
|
||||||
|
|
||||||
private Collection<SoftActivityConstraint> softConstraints = new ArrayList<SoftActivityConstraint>();
|
private Collection<SoftActivityConstraint> softConstraints = new ArrayList<SoftActivityConstraint>();
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,12 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.problem.constraint;
|
package jsprit.core.problem.constraint;
|
||||||
|
|
||||||
|
import jsprit.core.problem.misc.JobInsertionContext;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
import jsprit.core.problem.misc.JobInsertionContext;
|
|
||||||
|
|
||||||
class SoftRouteConstraintManager implements SoftRouteConstraint{
|
class SoftRouteConstraintManager implements SoftRouteConstraint{
|
||||||
|
|
||||||
private Collection<SoftRouteConstraint> softConstraints = new ArrayList<SoftRouteConstraint>();
|
private Collection<SoftRouteConstraint> softConstraints = new ArrayList<SoftRouteConstraint>();
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,13 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.problem.solution.route;
|
package jsprit.core.problem.solution.route;
|
||||||
|
|
||||||
|
import jsprit.core.problem.solution.route.activity.ReverseActivityVisitor;
|
||||||
|
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import jsprit.core.problem.solution.route.activity.ReverseActivityVisitor;
|
|
||||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
|
||||||
|
|
||||||
|
|
||||||
public class ReverseRouteActivityVisitor implements RouteVisitor{
|
public class ReverseRouteActivityVisitor implements RouteVisitor{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,16 +16,16 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.util;
|
package jsprit.core.util;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.listener.AlgorithmEndsListener;
|
import jsprit.core.algorithm.listener.AlgorithmEndsListener;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.job.Job;
|
import jsprit.core.problem.job.Job;
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
||||||
public class SolutionVerifier implements AlgorithmEndsListener{
|
public class SolutionVerifier implements AlgorithmEndsListener{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,10 +16,10 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.util;
|
package jsprit.core.util;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
public class Solutions {
|
public class Solutions {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import jsprit.core.algorithm.ruin.distance.AvgServiceDistance;
|
||||||
import jsprit.core.algorithm.selector.SelectBest;
|
import jsprit.core.algorithm.selector.SelectBest;
|
||||||
import jsprit.core.algorithm.state.InternalStates;
|
import jsprit.core.algorithm.state.InternalStates;
|
||||||
import jsprit.core.algorithm.state.StateManager;
|
import jsprit.core.algorithm.state.StateManager;
|
||||||
import jsprit.core.algorithm.state.UpdateVariableCosts;
|
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.constraint.ConstraintManager;
|
import jsprit.core.problem.constraint.ConstraintManager;
|
||||||
import jsprit.core.problem.io.VrpXMLReader;
|
import jsprit.core.problem.io.VrpXMLReader;
|
||||||
|
|
|
||||||
|
|
@ -18,20 +18,19 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm;
|
package jsprit.core.algorithm;
|
||||||
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.box.SchrimpfFactory;
|
import jsprit.core.algorithm.box.SchrimpfFactory;
|
||||||
import jsprit.core.algorithm.recreate.NoSolutionFoundException;
|
import jsprit.core.algorithm.recreate.NoSolutionFoundException;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.io.VrpXMLReader;
|
import jsprit.core.problem.io.VrpXMLReader;
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
public class FiniteVehicleFleetManagerIdentifiesDistinctVehicle_IT {
|
public class FiniteVehicleFleetManagerIdentifiesDistinctVehicle_IT {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm;
|
package jsprit.core.algorithm;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.box.SchrimpfFactory;
|
import jsprit.core.algorithm.box.SchrimpfFactory;
|
||||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||||
import jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
import jsprit.core.algorithm.recreate.listener.JobInsertedListener;
|
||||||
|
|
@ -36,9 +29,15 @@ import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||||
import jsprit.core.problem.vehicle.Vehicle;
|
import jsprit.core.problem.vehicle.Vehicle;
|
||||||
import jsprit.core.util.Solutions;
|
import jsprit.core.util.Solutions;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
public class MeetTimeWindowConstraint_IT {
|
public class MeetTimeWindowConstraint_IT {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm;
|
package jsprit.core.algorithm;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.box.SchrimpfFactory;
|
import jsprit.core.algorithm.box.SchrimpfFactory;
|
||||||
import jsprit.core.algorithm.recreate.NoSolutionFoundException;
|
import jsprit.core.algorithm.recreate.NoSolutionFoundException;
|
||||||
import jsprit.core.problem.Location;
|
import jsprit.core.problem.Location;
|
||||||
|
|
@ -29,17 +25,19 @@ import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.job.Service;
|
import jsprit.core.problem.job.Service;
|
||||||
import jsprit.core.problem.job.Shipment;
|
import jsprit.core.problem.job.Shipment;
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
import jsprit.core.problem.vehicle.Vehicle;
|
|
||||||
import jsprit.core.problem.vehicle.VehicleImpl;
|
import jsprit.core.problem.vehicle.VehicleImpl;
|
||||||
import jsprit.core.problem.vehicle.VehicleType;
|
import jsprit.core.problem.vehicle.VehicleType;
|
||||||
import jsprit.core.problem.vehicle.VehicleTypeImpl;
|
import jsprit.core.problem.vehicle.VehicleTypeImpl;
|
||||||
import jsprit.core.util.Coordinate;
|
import jsprit.core.util.Coordinate;
|
||||||
import jsprit.core.util.GreatCircleCosts;
|
import jsprit.core.util.GreatCircleCosts;
|
||||||
import jsprit.core.util.Solutions;
|
import jsprit.core.util.Solutions;
|
||||||
|
|
||||||
import jsprit.core.util.TestUtils;
|
import jsprit.core.util.TestUtils;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
public class OpenRoutesTest {
|
public class OpenRoutesTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -18,18 +18,17 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm;
|
package jsprit.core.algorithm;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.io.VrpXMLReader;
|
import jsprit.core.problem.io.VrpXMLReader;
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
import jsprit.core.util.Solutions;
|
import jsprit.core.util.Solutions;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
public class PickupsAndDeliveries_IT {
|
public class PickupsAndDeliveries_IT {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -16,15 +16,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm;
|
package jsprit.core.algorithm;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.box.GreedySchrimpfFactory;
|
import jsprit.core.algorithm.box.GreedySchrimpfFactory;
|
||||||
import jsprit.core.algorithm.termination.IterationWithoutImprovementTermination;
|
import jsprit.core.algorithm.termination.IterationWithoutImprovementTermination;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
|
|
@ -39,9 +30,13 @@ import jsprit.core.reporting.SolutionPrinter.Print;
|
||||||
import jsprit.core.util.Solutions;
|
import jsprit.core.util.Solutions;
|
||||||
import jsprit.core.util.VehicleRoutingTransportCostsMatrix;
|
import jsprit.core.util.VehicleRoutingTransportCostsMatrix;
|
||||||
import jsprit.core.util.VehicleRoutingTransportCostsMatrix.Builder;
|
import jsprit.core.util.VehicleRoutingTransportCostsMatrix.Builder;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_IT {
|
public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_IT {
|
||||||
|
|
|
||||||
|
|
@ -16,15 +16,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm;
|
package jsprit.core.algorithm;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileNotFoundException;
|
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.box.GreedySchrimpfFactory;
|
import jsprit.core.algorithm.box.GreedySchrimpfFactory;
|
||||||
import jsprit.core.algorithm.termination.IterationWithoutImprovementTermination;
|
import jsprit.core.algorithm.termination.IterationWithoutImprovementTermination;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
|
|
@ -39,9 +30,13 @@ import jsprit.core.reporting.SolutionPrinter.Print;
|
||||||
import jsprit.core.util.Solutions;
|
import jsprit.core.util.Solutions;
|
||||||
import jsprit.core.util.VehicleRoutingTransportCostsMatrix;
|
import jsprit.core.util.VehicleRoutingTransportCostsMatrix;
|
||||||
import jsprit.core.util.VehicleRoutingTransportCostsMatrix.Builder;
|
import jsprit.core.util.VehicleRoutingTransportCostsMatrix.Builder;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_withTimeAndDistanceCosts_IT {
|
public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_withTimeAndDistanceCosts_IT {
|
||||||
|
|
|
||||||
|
|
@ -16,19 +16,18 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.acceptor;
|
package jsprit.core.algorithm.acceptor;
|
||||||
|
|
||||||
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import static org.hamcrest.CoreMatchers.is;
|
import static org.hamcrest.CoreMatchers.is;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertThat;
|
import static org.junit.Assert.assertThat;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,28 +16,23 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.recreate;
|
package jsprit.core.algorithm.recreate;
|
||||||
|
|
||||||
import static org.hamcrest.CoreMatchers.is;
|
|
||||||
import static org.junit.Assert.assertThat;
|
|
||||||
import static org.mockito.Mockito.mock;
|
|
||||||
import static org.mockito.Mockito.when;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
|
|
||||||
import jsprit.core.problem.Capacity;
|
import jsprit.core.problem.Capacity;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.job.Service;
|
import jsprit.core.problem.job.Service;
|
||||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||||
import jsprit.core.problem.solution.route.activity.TimeWindow;
|
import jsprit.core.problem.solution.route.activity.TimeWindow;
|
||||||
import jsprit.core.problem.vehicle.Vehicle;
|
import jsprit.core.problem.vehicle.*;
|
||||||
import jsprit.core.problem.vehicle.VehicleFleetManager;
|
|
||||||
import jsprit.core.problem.vehicle.VehicleImpl;
|
|
||||||
import jsprit.core.problem.vehicle.VehicleType;
|
|
||||||
import jsprit.core.problem.vehicle.VehicleTypeImpl;
|
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
|
import static org.hamcrest.CoreMatchers.is;
|
||||||
|
import static org.junit.Assert.assertThat;
|
||||||
|
import static org.mockito.Mockito.mock;
|
||||||
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
|
|
||||||
public class CalcVehicleTypeDependentServiceInsertionTest {
|
public class CalcVehicleTypeDependentServiceInsertionTest {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.recreate;
|
package jsprit.core.algorithm.recreate;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||||
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
import jsprit.core.algorithm.io.VehicleRoutingAlgorithms;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
|
|
@ -36,10 +31,13 @@ import jsprit.core.problem.vehicle.VehicleImpl;
|
||||||
import jsprit.core.problem.vehicle.VehicleTypeImpl;
|
import jsprit.core.problem.vehicle.VehicleTypeImpl;
|
||||||
import jsprit.core.util.Coordinate;
|
import jsprit.core.util.Coordinate;
|
||||||
import jsprit.core.util.Solutions;
|
import jsprit.core.util.Solutions;
|
||||||
|
|
||||||
import org.junit.Ignore;
|
import org.junit.Ignore;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
@Ignore
|
@Ignore
|
||||||
public class TestDepartureTimeOpt {
|
public class TestDepartureTimeOpt {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,24 +18,22 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.ruin;
|
package jsprit.core.algorithm.ruin;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.ruin.RuinRadial.JobNeighborhoodsImpl;
|
|
||||||
import jsprit.core.algorithm.ruin.distance.EuclideanServiceDistance;
|
import jsprit.core.algorithm.ruin.distance.EuclideanServiceDistance;
|
||||||
import jsprit.core.algorithm.ruin.distance.JobDistance;
|
import jsprit.core.algorithm.ruin.distance.JobDistance;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.job.Job;
|
import jsprit.core.problem.job.Job;
|
||||||
import jsprit.core.problem.job.Service;
|
import jsprit.core.problem.job.Service;
|
||||||
import jsprit.core.util.Coordinate;
|
import jsprit.core.util.Coordinate;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
|
||||||
public class JobNeighborhoodsImplTest {
|
public class JobNeighborhoodsImplTest {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,24 +18,22 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.ruin;
|
package jsprit.core.algorithm.ruin;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.ruin.RuinRadial.JobNeighborhoodsImplWithCapRestriction;
|
|
||||||
import jsprit.core.algorithm.ruin.distance.EuclideanServiceDistance;
|
import jsprit.core.algorithm.ruin.distance.EuclideanServiceDistance;
|
||||||
import jsprit.core.algorithm.ruin.distance.JobDistance;
|
import jsprit.core.algorithm.ruin.distance.JobDistance;
|
||||||
import jsprit.core.problem.VehicleRoutingProblem;
|
import jsprit.core.problem.VehicleRoutingProblem;
|
||||||
import jsprit.core.problem.job.Job;
|
import jsprit.core.problem.job.Job;
|
||||||
import jsprit.core.problem.job.Service;
|
import jsprit.core.problem.job.Service;
|
||||||
import jsprit.core.util.Coordinate;
|
import jsprit.core.util.Coordinate;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
|
|
||||||
public class JobNeighborhoodsWithCapRestrictionImplTest {
|
public class JobNeighborhoodsWithCapRestrictionImplTest {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,20 +16,18 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.selector;
|
package jsprit.core.algorithm.selector;
|
||||||
|
|
||||||
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
import static org.hamcrest.CoreMatchers.is;
|
import static org.hamcrest.CoreMatchers.is;
|
||||||
import static org.junit.Assert.assertNull;
|
import static org.junit.Assert.assertNull;
|
||||||
import static org.junit.Assert.assertThat;
|
import static org.junit.Assert.assertThat;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collections;
|
|
||||||
|
|
||||||
import jsprit.core.algorithm.selector.SelectBest;
|
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,20 +16,18 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.algorithm.selector;
|
package jsprit.core.algorithm.selector;
|
||||||
|
|
||||||
import static org.hamcrest.CoreMatchers.is;
|
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||||
import static org.junit.Assert.assertNull;
|
import org.junit.Test;
|
||||||
import static org.junit.Assert.assertThat;
|
|
||||||
import static org.mockito.Mockito.mock;
|
|
||||||
import static org.mockito.Mockito.when;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import jsprit.core.algorithm.selector.SelectRandomly;
|
import static org.hamcrest.CoreMatchers.is;
|
||||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
import static org.junit.Assert.assertNull;
|
||||||
|
import static org.junit.Assert.assertThat;
|
||||||
import org.junit.Test;
|
import static org.mockito.Mockito.mock;
|
||||||
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,11 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.problem;
|
package jsprit.core.problem;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import org.junit.Test;
|
||||||
import static org.junit.Assert.assertFalse;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import org.junit.Test;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
public class CapacityTest {
|
public class CapacityTest {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.problem.constraint;
|
package jsprit.core.problem.constraint;
|
||||||
|
|
||||||
|
import jsprit.core.problem.misc.JobInsertionContext;
|
||||||
|
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
import jsprit.core.problem.misc.JobInsertionContext;
|
|
||||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
public class SoftActivityConstraintManagerTest {
|
public class SoftActivityConstraintManagerTest {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,9 @@
|
||||||
package jsprit.core.problem.constraint;
|
package jsprit.core.problem.constraint;
|
||||||
|
|
||||||
import jsprit.core.problem.misc.JobInsertionContext;
|
import jsprit.core.problem.misc.JobInsertionContext;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,14 +18,14 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.problem.solution.route.activity;
|
package jsprit.core.problem.solution.route.activity;
|
||||||
|
|
||||||
import static org.junit.Assert.assertNotNull;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
import jsprit.core.problem.job.Delivery;
|
import jsprit.core.problem.job.Delivery;
|
||||||
import jsprit.core.problem.job.Pickup;
|
import jsprit.core.problem.job.Pickup;
|
||||||
import jsprit.core.problem.job.Service;
|
import jsprit.core.problem.job.Service;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
public class DefaultTourActivityFactoryTest {
|
public class DefaultTourActivityFactoryTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
|
|
@ -16,15 +16,15 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.problem.vehicle;
|
package jsprit.core.problem.vehicle;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
import org.junit.Before;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.junit.Before;
|
import static org.junit.Assert.*;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
public class TestVehicleFleetManagerImpl {
|
public class TestVehicleFleetManagerImpl {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package jsprit.core.problem.vehicle;
|
package jsprit.core.problem.vehicle;
|
||||||
|
|
||||||
import static org.junit.Assert.*;
|
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
public class VehicleTypeImplTest {
|
public class VehicleTypeImplTest {
|
||||||
|
|
||||||
@Test(expected=IllegalArgumentException.class)
|
@Test(expected=IllegalArgumentException.class)
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,24 @@
|
||||||
<problem xmlns="http://www.w3schools.com"
|
<problem xmlns="http://www.w3schools.com"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com vrp_xml_schema.xsd">
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com vrp_xml_schema.xsd">
|
||||||
<problemType>
|
<problemType>
|
||||||
<fleetSize>INFINITE</fleetSize>
|
<fleetSize>FINITE</fleetSize>
|
||||||
</problemType>
|
</problemType>
|
||||||
<vehicles>
|
<vehicles>
|
||||||
|
<vehicle>
|
||||||
|
<id>v2</id>
|
||||||
|
<typeId>vehType2</typeId>
|
||||||
|
<startLocation>
|
||||||
|
<id>loc</id>
|
||||||
|
</startLocation>
|
||||||
|
<endLocation>
|
||||||
|
<id>loc</id>
|
||||||
|
</endLocation>
|
||||||
|
<timeSchedule>
|
||||||
|
<start>0.0</start>
|
||||||
|
<end>1.7976931348623157E308</end>
|
||||||
|
</timeSchedule>
|
||||||
|
<returnToDepot>true</returnToDepot>
|
||||||
|
</vehicle>
|
||||||
<vehicle>
|
<vehicle>
|
||||||
<id>v1</id>
|
<id>v1</id>
|
||||||
<typeId>vehType</typeId>
|
<typeId>vehType</typeId>
|
||||||
|
|
@ -33,58 +48,16 @@
|
||||||
<time>0.0</time>
|
<time>0.0</time>
|
||||||
</costs>
|
</costs>
|
||||||
</type>
|
</type>
|
||||||
|
<type>
|
||||||
|
<id>vehType2</id>
|
||||||
|
<capacity-dimensions>
|
||||||
|
<dimension index="0">200</dimension>
|
||||||
|
</capacity-dimensions>
|
||||||
|
<costs>
|
||||||
|
<fixed>0.0</fixed>
|
||||||
|
<distance>1.0</distance>
|
||||||
|
<time>0.0</time>
|
||||||
|
</costs>
|
||||||
|
</type>
|
||||||
</vehicleTypes>
|
</vehicleTypes>
|
||||||
<services>
|
|
||||||
<service id="1" type="service">
|
|
||||||
<location>
|
|
||||||
<id>loc</id>
|
|
||||||
</location>
|
|
||||||
<capacity-dimensions>
|
|
||||||
<dimension index="0">1</dimension>
|
|
||||||
</capacity-dimensions>
|
|
||||||
<duration>2.0</duration>
|
|
||||||
<timeWindows>
|
|
||||||
<timeWindow>
|
|
||||||
<start>0.0</start>
|
|
||||||
<end>1.7976931348623157E308</end>
|
|
||||||
</timeWindow>
|
|
||||||
</timeWindows>
|
|
||||||
</service>
|
|
||||||
<service id="2" type="service">
|
|
||||||
<location>
|
|
||||||
<id>loc2</id>
|
|
||||||
</location>
|
|
||||||
<capacity-dimensions>
|
|
||||||
<dimension index="0">1</dimension>
|
|
||||||
</capacity-dimensions>
|
|
||||||
<duration>4.0</duration>
|
|
||||||
<timeWindows>
|
|
||||||
<timeWindow>
|
|
||||||
<start>0.0</start>
|
|
||||||
<end>1.7976931348623157E308</end>
|
|
||||||
</timeWindow>
|
|
||||||
</timeWindows>
|
|
||||||
</service>
|
|
||||||
</services>
|
|
||||||
<solutions>
|
|
||||||
<solution>
|
|
||||||
<cost>10.0</cost>
|
|
||||||
<routes>
|
|
||||||
<route>
|
|
||||||
<driverId>noDriver</driverId>
|
|
||||||
<vehicleId>v1</vehicleId>
|
|
||||||
<start>0.0</start>
|
|
||||||
<act type="service">
|
|
||||||
<serviceId>1</serviceId>
|
|
||||||
<arrTime>0.0</arrTime>
|
|
||||||
<endTime>0.0</endTime>
|
|
||||||
</act>
|
|
||||||
<end>0.0</end>
|
|
||||||
</route>
|
|
||||||
</routes>
|
|
||||||
<unassignedJobs>
|
|
||||||
<job id="2"/>
|
|
||||||
</unassignedJobs>
|
|
||||||
</solution>
|
|
||||||
</solutions>
|
|
||||||
</problem>
|
</problem>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue