diff --git a/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/ComputationalLaboratory.java b/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/ComputationalLaboratory.java index c649ff07..87d05a49 100644 --- a/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/ComputationalLaboratory.java +++ b/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/ComputationalLaboratory.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.analysis.toolbox; import java.util.ArrayList; diff --git a/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/GraphStreamViewer.java b/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/GraphStreamViewer.java index 7a5c83d2..303837b1 100644 --- a/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/GraphStreamViewer.java +++ b/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/GraphStreamViewer.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.analysis.toolbox; import java.awt.Color; diff --git a/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/NoLocationFoundException.java b/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/NoLocationFoundException.java index 4f0ee30d..77df2b6e 100644 --- a/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/NoLocationFoundException.java +++ b/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/NoLocationFoundException.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.analysis.toolbox; class NoLocationFoundException extends Exception{ diff --git a/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/XYLineChartBuilder.java b/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/XYLineChartBuilder.java index 18283114..533e503e 100644 --- a/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/XYLineChartBuilder.java +++ b/jsprit-analysis/src/main/java/jsprit/analysis/toolbox/XYLineChartBuilder.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.analysis.toolbox; import java.awt.Color; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/VariablePlusFixedSolutionCostCalculatorFactory.java b/jsprit-core/src/main/java/jsprit/core/algorithm/VariablePlusFixedSolutionCostCalculatorFactory.java index 7a35ecaa..ba57a510 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/VariablePlusFixedSolutionCostCalculatorFactory.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/VariablePlusFixedSolutionCostCalculatorFactory.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm; import jsprit.core.problem.solution.SolutionCostCalculator; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/VehicleRoutingAlgorithmBuilder.java b/jsprit-core/src/main/java/jsprit/core/algorithm/VehicleRoutingAlgorithmBuilder.java index ac2340c7..3cec6751 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/VehicleRoutingAlgorithmBuilder.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/VehicleRoutingAlgorithmBuilder.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm; import jsprit.core.algorithm.io.AlgorithmConfig; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/acceptor/SchrimpfInitialThresholdGenerator.java b/jsprit-core/src/main/java/jsprit/core/algorithm/acceptor/SchrimpfInitialThresholdGenerator.java index 50b8f41e..3873017f 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/acceptor/SchrimpfInitialThresholdGenerator.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/acceptor/SchrimpfInitialThresholdGenerator.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.acceptor; import java.net.URL; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/AdditionalAccessEgressCalculator.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/AdditionalAccessEgressCalculator.java index f4a5135f..9980b13e 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/AdditionalAccessEgressCalculator.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/AdditionalAccessEgressCalculator.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import jsprit.core.problem.cost.VehicleRoutingTransportCosts; @@ -57,4 +75,4 @@ class AdditionalAccessEgressCalculator { return delta_access + delta_egress; } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/AuxilliaryCostCalculator.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/AuxilliaryCostCalculator.java index 0010f9f5..5a777506 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/AuxilliaryCostCalculator.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/AuxilliaryCostCalculator.java @@ -39,15 +39,15 @@ final class AuxilliaryCostCalculator { this.routingCosts = routingCosts; this.activityCosts = actCosts; } - - /** - * - * @param path - * @param depTime - * @param driver - * @param vehicle - * @return - */ + + /** + * + * @param path activity path to get the costs for + * @param depTime departure time at first activity in path + * @param driver driver of vehicle + * @param vehicle vehicle running the path + * @return cost of path + */ public double costOfPath(final List path, final double depTime, final Driver driver, final Vehicle vehicle){ if(path.isEmpty()){ return 0.0; @@ -69,9 +69,7 @@ final class AuxilliaryCostCalculator { double transportTime = routingCosts.getTransportTime(prevAct.getLocationId(), act.getLocationId(), departureTimePrevAct, driver, vehicle); cost += transportCost; double actStartTime = departureTimePrevAct + transportTime; - double earliestOperationStartTime = Math.max(actStartTime, act.getTheoreticalEarliestOperationStartTime()); - double actEndTime = earliestOperationStartTime + act.getOperationTime(); - departureTimePrevAct = actEndTime; + departureTimePrevAct = Math.max(actStartTime, act.getTheoreticalEarliestOperationStartTime()) + act.getOperationTime(); cost += activityCosts.getActivityCost(act, actStartTime, driver, vehicle); prevAct = act; } diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertionBuilder.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertionBuilder.java index 695c92f8..8d524446 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertionBuilder.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertionBuilder.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import java.util.ArrayList; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/CalculatorBuilder.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/CalculatorBuilder.java index c87c2834..b1d4ec8d 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/CalculatorBuilder.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/CalculatorBuilder.java @@ -296,10 +296,11 @@ class CalculatorBuilder { } private CalculatorPlusListeners createStandardRoute(VehicleRoutingProblem vrp, RouteAndActivityStateGetter activityStates2, int forwardLooking, int solutionMemory){ - int after = forwardLooking; ActivityInsertionCostsCalculator routeLevelCostEstimator; if(activityInsertionCostCalculator == null && addDefaultCostCalc){ - routeLevelCostEstimator = new RouteLevelActivityInsertionCostsEstimator(vrp.getTransportCosts(), vrp.getActivityCosts(), activityStates2); + RouteLevelActivityInsertionCostsEstimator routeLevelActivityInsertionCostsEstimator = new RouteLevelActivityInsertionCostsEstimator(vrp.getTransportCosts(), vrp.getActivityCosts(), activityStates2); + routeLevelActivityInsertionCostsEstimator.setForwardLooking(forwardLooking); + routeLevelCostEstimator = routeLevelActivityInsertionCostsEstimator; } else if(activityInsertionCostCalculator == null && !addDefaultCostCalc){ routeLevelCostEstimator = new ActivityInsertionCostsCalculator(){ @@ -318,7 +319,7 @@ class CalculatorBuilder { routeLevelCostEstimator = activityInsertionCostCalculator; } JobInsertionCostsCalculator jobInsertionCalculator = new ServiceInsertionOnRouteLevelCalculator(vrp.getTransportCosts(), vrp.getActivityCosts(), routeLevelCostEstimator, constraintManager, constraintManager); - ((ServiceInsertionOnRouteLevelCalculator)jobInsertionCalculator).setNuOfActsForwardLooking(after); + ((ServiceInsertionOnRouteLevelCalculator)jobInsertionCalculator).setNuOfActsForwardLooking(forwardLooking); ((ServiceInsertionOnRouteLevelCalculator)jobInsertionCalculator).setMemorySize(solutionMemory); ((ServiceInsertionOnRouteLevelCalculator) jobInsertionCalculator).setStates(activityStates2); diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/DellAmicoFixCostCalculator.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/DellAmicoFixCostCalculator.java index 2a07c04e..82debf33 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/DellAmicoFixCostCalculator.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/DellAmicoFixCostCalculator.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import java.util.Collection; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/JobCalculatorSwitcher.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/JobCalculatorSwitcher.java index a4858749..b1be754e 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/JobCalculatorSwitcher.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/JobCalculatorSwitcher.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import java.util.HashMap; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/NoSolutionFoundException.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/NoSolutionFoundException.java index 5acb2936..985759a8 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/NoSolutionFoundException.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/NoSolutionFoundException.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; public class NoSolutionFoundException extends IllegalStateException{ diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/PenalyzeInsertionCostsWithPenaltyVehicle.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/PenalyzeInsertionCostsWithPenaltyVehicle.java index ef50a4d9..90b40c05 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/PenalyzeInsertionCostsWithPenaltyVehicle.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/PenalyzeInsertionCostsWithPenaltyVehicle.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import jsprit.core.problem.driver.Driver; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RouteLevelActivityInsertionCostsEstimator.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RouteLevelActivityInsertionCostsEstimator.java index d15d8d85..95f09735 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RouteLevelActivityInsertionCostsEstimator.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RouteLevelActivityInsertionCostsEstimator.java @@ -57,14 +57,13 @@ class RouteLevelActivityInsertionCostsEstimator implements ActivityInsertionCost path.add(prevAct); path.add(newAct); path.add(nextAct); int actIndex; if(prevAct instanceof Start) actIndex = 0; - else actIndex = iFacts.getRoute().getTourActivities().getActivities().indexOf(prevAct); + else actIndex = iFacts.getRoute().getTourActivities().getActivities().indexOf(nextAct); if(nuOfActivities2LookForward > 0){ path.addAll(getForwardLookingPath(iFacts.getRoute(),actIndex)); } - /** + /* * calculates the path costs with new vehicle, c(forwardPath,newVehicle). */ - double forwardPathCost_newVehicle = auxilliaryPathCostCalculator.costOfPath(path, depTimeAtPrevAct, iFacts.getNewDriver(), iFacts.getNewVehicle()); - + double forwardPathCost_newVehicle = auxilliaryPathCostCalculator.costOfPath(path, depTimeAtPrevAct, iFacts.getNewDriver(), iFacts.getNewVehicle()); double additionalCosts = forwardPathCost_newVehicle - (actCostsOld(iFacts.getRoute(), path.get(path.size()-1)) - actCostsOld(iFacts.getRoute(), prevAct)); return new ActivityInsertionCosts(additionalCosts, 0.0); @@ -93,4 +92,7 @@ class RouteLevelActivityInsertionCostsEstimator implements ActivityInsertionCost return forwardLookingPath; } + public void setForwardLooking(int nActivities) { + this.nuOfActivities2LookForward = nActivities; + } } diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/ServiceInsertionOnRouteLevelCalculator.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/ServiceInsertionOnRouteLevelCalculator.java index e943e7f9..d30c64a5 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/ServiceInsertionOnRouteLevelCalculator.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/ServiceInsertionOnRouteLevelCalculator.java @@ -44,7 +44,6 @@ import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter; import jsprit.core.problem.solution.route.state.StateFactory; import jsprit.core.problem.vehicle.Vehicle; import jsprit.core.problem.vehicle.VehicleImpl.NoVehicle; -import jsprit.core.util.Neighborhood; import org.apache.log4j.Logger; @@ -72,31 +71,17 @@ final class ServiceInsertionOnRouteLevelCalculator implements JobInsertionCostsC private ActivityInsertionCostsCalculator activityInsertionCostsCalculator; private int nuOfActsForwardLooking = 0; - +// private int memorySize = 2; private Start start; private End end; - - private Neighborhood neighborhood = new Neighborhood() { - - @Override - public boolean areNeighbors(String location1, String location2) { - return true; - } - - }; - + public void setTourActivityFactory(TourActivityFactory tourActivityFactory){ this.tourActivityFactory=tourActivityFactory; } - - public void setNeighborhood(Neighborhood neighborhood) { - this.neighborhood = neighborhood; - logger.info("initialise neighborhood " + neighborhood); - } - + public void setMemorySize(int memorySize) { this.memorySize = memorySize; logger.info("set [solutionMemory="+memorySize+"]"); @@ -182,35 +167,34 @@ final class ServiceInsertionOnRouteLevelCalculator implements JobInsertionCostsC * k=serviceAct2Insert */ for(TourActivity nextAct : tour.getActivities()){ - if(neighborhood.areNeighbors(serviceAct2Insert.getLocationId(), prevAct.getLocationId()) && neighborhood.areNeighbors(serviceAct2Insert.getLocationId(), nextAct.getLocationId())){ - ConstraintsStatus status = hardActivityLevelConstraint.fulfilled(insertionContext, prevAct, serviceAct2Insert, nextAct, prevActDepTime_newVehicle); - if(status.equals(ConstraintsStatus.FULFILLED)){ - /** - * builds a path on this route forwardPath={i,k,j,j+1,j+2,...,j+nuOfActsForwardLooking} - */ - ActivityInsertionCosts actInsertionCosts = activityInsertionCostsCalculator.getCosts(insertionContext, prevAct, nextAct, serviceAct2Insert, prevActDepTime_newVehicle); + ConstraintsStatus hardActivityConstraintsStatus = hardActivityLevelConstraint.fulfilled(insertionContext, prevAct, serviceAct2Insert, nextAct, prevActDepTime_newVehicle); + if(hardActivityConstraintsStatus.equals(ConstraintsStatus.FULFILLED)){ + /** + * builds a path on this route forwardPath={i,k,j,j+1,j+2,...,j+nuOfActsForwardLooking} + */ + ActivityInsertionCosts actInsertionCosts = activityInsertionCostsCalculator.getCosts(insertionContext, prevAct, nextAct, serviceAct2Insert, prevActDepTime_newVehicle); - /** - * insertion_cost_approximation = c({0,1,...,i},newVehicle) + c({i,k,j,j+1,j+2,...,j+nuOfActsForwardLooking},newVehicle) - c({0,1,...,i,j,j+1,...,j+nuOfActsForwardLooking},oldVehicle) - */ - double insertion_cost_approximation = sumOf_prevCosts_newVehicle - sumOf_prevCosts_oldVehicle(currentRoute,prevAct) + actInsertionCosts.getAdditionalCosts(); + /** + * insertion_cost_approximation = c({0,1,...,i},newVehicle) + c({i,k,j,j+1,j+2,...,j+nuOfActsForwardLooking},newVehicle) - c({0,1,...,i,j,j+1,...,j+nuOfActsForwardLooking},oldVehicle) + */ + double insertion_cost_approximation = sumOf_prevCosts_newVehicle - sumOf_prevCosts_oldVehicle(currentRoute,prevAct) + actInsertionCosts.getAdditionalCosts(); - /** - * memorize it in insertion-queue - */ - if(insertion_cost_approximation < best_known_insertion_costs){ - bestInsertionsQueue.add(new InsertionData(insertion_cost_approximation, InsertionData.NO_INDEX, actIndex, newVehicle, newDriver)); - } - } - else if(status.equals(ConstraintsStatus.NOT_FULFILLED_BREAK)){ - loopBroken = true; - break; - } - } + /** + * memorize it in insertion-queue + */ + if(insertion_cost_approximation < best_known_insertion_costs){ + bestInsertionsQueue.add(new InsertionData(insertion_cost_approximation, InsertionData.NO_INDEX, actIndex, newVehicle, newDriver)); + } + } + else if(hardActivityConstraintsStatus.equals(ConstraintsStatus.NOT_FULFILLED_BREAK)){ + loopBroken = true; + break; + } - /** - * calculate transport and activity costs with new vehicle (without inserting k) - */ + + /** + * calculate transport and activity costs with new vehicle (without inserting k) + */ double transportCost_prevAct_nextAct_newVehicle = transportCosts.getTransportCost(prevAct.getLocationId(), nextAct.getLocationId(), prevActDepTime_newVehicle, newDriver, newVehicle); double transportTime_prevAct_nextAct_newVehicle = transportCosts.getTransportTime(prevAct.getLocationId(), nextAct.getLocationId(), prevActDepTime_newVehicle, newDriver, newVehicle); double arrTime_nextAct_newVehicle = prevActDepTime_newVehicle + transportTime_prevAct_nextAct_newVehicle; @@ -237,26 +221,24 @@ final class ServiceInsertionOnRouteLevelCalculator implements JobInsertionCostsC } if(!loopBroken){ End nextAct = end; - if(neighborhood.areNeighbors(serviceAct2Insert.getLocationId(), prevAct.getLocationId()) && neighborhood.areNeighbors(serviceAct2Insert.getLocationId(), nextAct.getLocationId())){ - ConstraintsStatus status = hardActivityLevelConstraint.fulfilled(insertionContext, prevAct, serviceAct2Insert, nextAct, prevActDepTime_newVehicle); - if(status.equals(ConstraintsStatus.FULFILLED)){ - ActivityInsertionCosts actInsertionCosts = activityInsertionCostsCalculator.getCosts(insertionContext, prevAct, nextAct, serviceAct2Insert, prevActDepTime_newVehicle); - if(actInsertionCosts != null){ - /** - * insertion_cost_approximation = c({0,1,...,i},newVehicle) + c({i,k,j,j+1,j+2,...,j+nuOfActsForwardLooking},newVehicle) - c({0,1,...,i,j,j+1,...,j+nuOfActsForwardLooking},oldVehicle) - */ - double insertion_cost_approximation = sumOf_prevCosts_newVehicle - sumOf_prevCosts_oldVehicle(currentRoute,prevAct) + actInsertionCosts.getAdditionalCosts(); + ConstraintsStatus hardActivityConstraintsStatus = hardActivityLevelConstraint.fulfilled(insertionContext, prevAct, serviceAct2Insert, nextAct, prevActDepTime_newVehicle); + if(hardActivityConstraintsStatus.equals(ConstraintsStatus.FULFILLED)){ + ActivityInsertionCosts actInsertionCosts = activityInsertionCostsCalculator.getCosts(insertionContext, prevAct, nextAct, serviceAct2Insert, prevActDepTime_newVehicle); + if(actInsertionCosts != null){ + /** + * insertion_cost_approximation = c({0,1,...,i},newVehicle) + c({i,k,j,j+1,j+2,...,j+nuOfActsForwardLooking},newVehicle) - c({0,1,...,i,j,j+1,...,j+nuOfActsForwardLooking},oldVehicle) + */ + double insertion_cost_approximation = sumOf_prevCosts_newVehicle - sumOf_prevCosts_oldVehicle(currentRoute,prevAct) + actInsertionCosts.getAdditionalCosts(); - /** - * memorize it in insertion-queue - */ - if(insertion_cost_approximation < best_known_insertion_costs){ - bestInsertionsQueue.add(new InsertionData(insertion_cost_approximation, InsertionData.NO_INDEX, actIndex, newVehicle, newDriver)); - } - } - } - } - } + /** + * memorize it in insertion-queue + */ + if(insertion_cost_approximation < best_known_insertion_costs){ + bestInsertionsQueue.add(new InsertionData(insertion_cost_approximation, InsertionData.NO_INDEX, actIndex, newVehicle, newDriver)); + } + } + } + } /** diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/VariableTransportCostCalculator.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/VariableTransportCostCalculator.java index 748ec22e..6396c137 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/VariableTransportCostCalculator.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/VariableTransportCostCalculator.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import jsprit.core.problem.constraint.SoftActivityConstraint; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RadialRuinStrategyFactory.java b/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RadialRuinStrategyFactory.java index 418fc956..f9702429 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RadialRuinStrategyFactory.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RadialRuinStrategyFactory.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.ruin; import jsprit.core.algorithm.ruin.distance.JobDistance; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RandomRuinStrategyFactory.java b/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RandomRuinStrategyFactory.java index b475cc03..32901aa9 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RandomRuinStrategyFactory.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RandomRuinStrategyFactory.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.ruin; import jsprit.core.problem.VehicleRoutingProblem; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/listener/RuinListener.java b/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/listener/RuinListener.java index 7fb0779e..683f21c7 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/listener/RuinListener.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/listener/RuinListener.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.ruin.listener; import java.util.Collection; @@ -38,4 +56,4 @@ public interface RuinListener extends SearchStrategyModuleListener{ */ public void removed(Job job, VehicleRoute fromRoute); -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/state/StateUpdater.java b/jsprit-core/src/main/java/jsprit/core/algorithm/state/StateUpdater.java index 3d170794..4f3c9793 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/state/StateUpdater.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/state/StateUpdater.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; public interface StateUpdater { diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateActivityTimes.java b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateActivityTimes.java index 2698cc4a..ca748eab 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateActivityTimes.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateActivityTimes.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import jsprit.core.problem.cost.ForwardTransportTime; @@ -58,4 +76,4 @@ public class UpdateActivityTimes implements ActivityVisitor, StateUpdater{ route.getEnd().setArrTime(timeTracker.getActArrTime()); } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateEndLocationIfRouteIsOpen.java b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateEndLocationIfRouteIsOpen.java index a6958110..dec4dc0c 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateEndLocationIfRouteIsOpen.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateEndLocationIfRouteIsOpen.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import jsprit.core.problem.solution.route.RouteVisitor; diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateLoads.java b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateLoads.java index fff3ed52..59b37591 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateLoads.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateLoads.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import java.util.Collection; @@ -94,4 +112,4 @@ class UpdateLoads implements ActivityVisitor, StateUpdater, InsertionStartsListe } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtActivitiesByLookingBackwardInRoute.java b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtActivitiesByLookingBackwardInRoute.java index ba617dd4..8d934a0c 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtActivitiesByLookingBackwardInRoute.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtActivitiesByLookingBackwardInRoute.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import jsprit.core.problem.Capacity; @@ -41,4 +59,4 @@ class UpdateMaxCapacityUtilisationAtActivitiesByLookingBackwardInRoute implement @Override public void finish() {} -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtActivitiesByLookingForwardInRoute.java b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtActivitiesByLookingForwardInRoute.java index 1476567a..8482ebdf 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtActivitiesByLookingForwardInRoute.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtActivitiesByLookingForwardInRoute.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import jsprit.core.problem.Capacity; @@ -60,4 +78,4 @@ class UpdateMaxCapacityUtilisationAtActivitiesByLookingForwardInRoute implements @Override public void finish() {} -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtRoute.java b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtRoute.java index 8eaa66f5..d2f47664 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtRoute.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilisationAtRoute.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import jsprit.core.problem.Capacity; @@ -49,4 +67,4 @@ class UpdateMaxCapacityUtilisationAtRoute implements ActivityVisitor, StateUpdat public void finish() { stateManager.putTypedInternalRouteState(route, StateFactory.MAXLOAD, Capacity.class, maxLoad); } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdatePracticalTimeWindows.java b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdatePracticalTimeWindows.java index 4083f4c2..d759e89e 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdatePracticalTimeWindows.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdatePracticalTimeWindows.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import jsprit.core.problem.cost.VehicleRoutingTransportCosts; @@ -50,4 +68,4 @@ class UpdatePracticalTimeWindows implements ReverseActivityVisitor, StateUpdater @Override public void finish() {} -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateVariableCosts.java b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateVariableCosts.java index a716921e..92816b05 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateVariableCosts.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/state/UpdateVariableCosts.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import jsprit.core.problem.cost.ForwardTransportCost; @@ -99,4 +117,4 @@ public class UpdateVariableCosts implements ActivityVisitor,StateUpdater{ totalOperationCost = 0.0; } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/problem/Capacity.java b/jsprit-core/src/main/java/jsprit/core/problem/Capacity.java index f52fbdac..5022ed9b 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/Capacity.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/Capacity.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem; /** diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/AdditionalTransportationCosts.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/AdditionalTransportationCosts.java index b11885c0..c2682317 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/AdditionalTransportationCosts.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/AdditionalTransportationCosts.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.cost.VehicleRoutingTransportCosts; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/Constraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/Constraint.java index ee1feca1..63be9230 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/Constraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/Constraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; public interface Constraint { diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/ConstraintManager.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/ConstraintManager.java index 7669efe4..24a7b4e4 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/ConstraintManager.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/ConstraintManager.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import java.util.ArrayList; @@ -143,4 +161,4 @@ public class ConstraintManager implements HardActivityStateLevelConstraint, Hard return softActivityConstraintManager.getCosts(iFacts, prevAct, newAct, nextAct, prevActDepTime); } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardActivityLevelConstraintManager.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardActivityLevelConstraintManager.java index 84e619ca..fa13fbdb 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardActivityLevelConstraintManager.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardActivityLevelConstraintManager.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import java.util.ArrayList; @@ -83,4 +101,4 @@ class HardActivityLevelConstraintManager implements HardActivityStateLevelConstr return ConstraintsStatus.FULFILLED; } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardActivityStateLevelConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardActivityStateLevelConstraint.java index 94da886e..848beaf2 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardActivityStateLevelConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardActivityStateLevelConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.misc.JobInsertionContext; @@ -13,4 +31,4 @@ public interface HardActivityStateLevelConstraint extends HardConstraint{ public ConstraintsStatus fulfilled(JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime); -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardConstraint.java index 233475a2..eb57f4ba 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; public interface HardConstraint extends Constraint{ diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardRouteLevelConstraintManager.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardRouteLevelConstraintManager.java index 7ce307c7..224901f0 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardRouteLevelConstraintManager.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardRouteLevelConstraintManager.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import java.util.ArrayList; @@ -27,4 +45,4 @@ class HardRouteLevelConstraintManager implements HardRouteStateLevelConstraint { return true; } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardRouteStateLevelConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardRouteStateLevelConstraint.java index 196f405b..d7611cc2 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardRouteStateLevelConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/HardRouteStateLevelConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.misc.JobInsertionContext; @@ -7,4 +25,4 @@ public interface HardRouteStateLevelConstraint extends HardConstraint{ public boolean fulfilled(JobInsertionContext insertionContext); -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/PickupAndDeliverShipmentLoadActivityLevelConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/PickupAndDeliverShipmentLoadActivityLevelConstraint.java index f6613a0a..69a2502a 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/PickupAndDeliverShipmentLoadActivityLevelConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/PickupAndDeliverShipmentLoadActivityLevelConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.Capacity; @@ -74,4 +92,4 @@ public class PickupAndDeliverShipmentLoadActivityLevelConstraint implements Hard } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceDeliveriesFirstConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceDeliveriesFirstConstraint.java index 2cc0a952..2d33ba03 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceDeliveriesFirstConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceDeliveriesFirstConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.misc.JobInsertionContext; @@ -25,4 +43,4 @@ public class ServiceDeliveriesFirstConstraint implements HardActivityStateLevelC return ConstraintsStatus.FULFILLED; } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceLoadActivityLevelConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceLoadActivityLevelConstraint.java index 45898101..0a8b6767 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceLoadActivityLevelConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceLoadActivityLevelConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.Capacity; @@ -54,4 +72,4 @@ class ServiceLoadActivityLevelConstraint implements HardActivityStateLevelConstr } return ConstraintsStatus.FULFILLED; } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceLoadRouteLevelConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceLoadRouteLevelConstraint.java index 314698ab..beb5bee9 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceLoadRouteLevelConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/ServiceLoadRouteLevelConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.Capacity; @@ -48,4 +66,4 @@ class ServiceLoadRouteLevelConstraint implements HardRouteStateLevelConstraint { return true; } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/ShipmentPickupsFirstConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/ShipmentPickupsFirstConstraint.java index c2f334d6..85855795 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/ShipmentPickupsFirstConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/ShipmentPickupsFirstConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.misc.JobInsertionContext; @@ -14,4 +32,4 @@ public class ShipmentPickupsFirstConstraint implements HardActivityStateLevelCon return ConstraintsStatus.FULFILLED; } -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftActivityConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftActivityConstraint.java index 8817b2ad..77ec7ea4 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftActivityConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftActivityConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.misc.JobInsertionContext; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftActivityConstraintManager.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftActivityConstraintManager.java index bb8a1106..e3e75add 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftActivityConstraintManager.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftActivityConstraintManager.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import java.util.ArrayList; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftConstraint.java index 2f24defe..10dbde67 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; public interface SoftConstraint extends Constraint{ diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftRouteConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftRouteConstraint.java index 1cc1d6e5..73a902d9 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftRouteConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftRouteConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.misc.JobInsertionContext; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftRouteConstraintManager.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftRouteConstraintManager.java index 311ac857..110af7a9 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftRouteConstraintManager.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/SoftRouteConstraintManager.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import java.util.ArrayList; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/TimeWindowConstraint.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/TimeWindowConstraint.java index 73f90485..ae423293 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/TimeWindowConstraint.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/TimeWindowConstraint.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.cost.VehicleRoutingTransportCosts; @@ -104,4 +122,4 @@ import jsprit.core.util.CalculationUtils; } return ConstraintsStatus.FULFILLED; } - } \ No newline at end of file + } diff --git a/jsprit-core/src/main/java/jsprit/core/problem/cost/AbstractForwardVehicleRoutingTransportCosts.java b/jsprit-core/src/main/java/jsprit/core/problem/cost/AbstractForwardVehicleRoutingTransportCosts.java index 444fb9bb..212521a7 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/cost/AbstractForwardVehicleRoutingTransportCosts.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/cost/AbstractForwardVehicleRoutingTransportCosts.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.cost; import jsprit.core.problem.driver.Driver; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/job/Shipment.java b/jsprit-core/src/main/java/jsprit/core/problem/job/Shipment.java index 3f3bd3c3..4af71db5 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/job/Shipment.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/job/Shipment.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.job; import java.util.Collections; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/Activities.java b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/Activities.java index 89c80d8c..747b9276 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/Activities.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/Activities.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; class Activities { diff --git a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DefaultShipmentActivityFactory.java b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DefaultShipmentActivityFactory.java index 040f322e..2f428e2c 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DefaultShipmentActivityFactory.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DefaultShipmentActivityFactory.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import jsprit.core.problem.job.Shipment; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DeliverService.java b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DeliverService.java index 5f1e5b29..23086507 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DeliverService.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DeliverService.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import jsprit.core.problem.Capacity; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DeliverShipment.java b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DeliverShipment.java index 1c15a382..3e83e33e 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DeliverShipment.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/DeliverShipment.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import jsprit.core.problem.Capacity; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/PickupService.java b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/PickupService.java index fc7e1d2a..e42c452a 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/PickupService.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/PickupService.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import jsprit.core.problem.Capacity; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/PickupShipment.java b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/PickupShipment.java index f26dd6f6..40bb7d06 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/PickupShipment.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/PickupShipment.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import jsprit.core.problem.Capacity; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/TourShipmentActivityFactory.java b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/TourShipmentActivityFactory.java index 2c1ff9c9..3d53e196 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/TourShipmentActivityFactory.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/solution/route/activity/TourShipmentActivityFactory.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import jsprit.core.problem.job.Shipment; diff --git a/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleFleetManagerFactory.java b/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleFleetManagerFactory.java index 9a45154d..f8b5e295 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleFleetManagerFactory.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleFleetManagerFactory.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.vehicle; public interface VehicleFleetManagerFactory { diff --git a/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleTypeKey.java b/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleTypeKey.java index ebd0a8e4..019abfb8 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleTypeKey.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/vehicle/VehicleTypeKey.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.vehicle; /** @@ -85,4 +103,4 @@ public class VehicleTypeKey { -} \ No newline at end of file +} diff --git a/jsprit-core/src/main/java/jsprit/core/util/RouteUtils.java b/jsprit-core/src/main/java/jsprit/core/util/RouteUtils.java index a3294fb7..6407f63b 100644 --- a/jsprit-core/src/main/java/jsprit/core/util/RouteUtils.java +++ b/jsprit-core/src/main/java/jsprit/core/util/RouteUtils.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.util; import java.util.Collection; diff --git a/jsprit-core/src/main/java/jsprit/core/util/Time.java b/jsprit-core/src/main/java/jsprit/core/util/Time.java index b05f0a3c..6c5047d2 100644 --- a/jsprit-core/src/main/java/jsprit/core/util/Time.java +++ b/jsprit-core/src/main/java/jsprit/core/util/Time.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.util; public class Time { diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/FiniteVehicleFleetManagerIdentifiesDistinctVehicle_IT.java b/jsprit-core/src/test/java/jsprit/core/algorithm/FiniteVehicleFleetManagerIdentifiesDistinctVehicle_IT.java index 5ce610aa..0df84444 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/FiniteVehicleFleetManagerIdentifiesDistinctVehicle_IT.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/FiniteVehicleFleetManagerIdentifiesDistinctVehicle_IT.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm; import static org.junit.Assert.assertTrue; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/MeetTimeWindowConstraint_IT.java b/jsprit-core/src/test/java/jsprit/core/algorithm/MeetTimeWindowConstraint_IT.java index 517854b9..9df7853e 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/MeetTimeWindowConstraint_IT.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/MeetTimeWindowConstraint_IT.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/OpenRoutesTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/OpenRoutesTest.java index ccaa80c4..3c737bcc 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/OpenRoutesTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/OpenRoutesTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm; import static org.junit.Assert.*; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/PickupsAndDeliveries_IT.java b/jsprit-core/src/test/java/jsprit/core/algorithm/PickupsAndDeliveries_IT.java index cc2c90fd..5458724f 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/PickupsAndDeliveries_IT.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/PickupsAndDeliveries_IT.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm; import static org.junit.Assert.*; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/VehicleRoutingAlgorithmTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/VehicleRoutingAlgorithmTest.java index 166b2a3b..434681be 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/VehicleRoutingAlgorithmTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/VehicleRoutingAlgorithmTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/acceptor/SchrimpfAcceptanceTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/acceptor/SchrimpfAcceptanceTest.java index e5fb0574..becb5cb5 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/acceptor/SchrimpfAcceptanceTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/acceptor/SchrimpfAcceptanceTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.acceptor; import jsprit.core.problem.VehicleRoutingProblem; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/JobInsertionConsideringFixCostsCalculatorTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/JobInsertionConsideringFixCostsCalculatorTest.java index 063d73e6..59bcac6c 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/JobInsertionConsideringFixCostsCalculatorTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/JobInsertionConsideringFixCostsCalculatorTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/ServiceInsertionAndLoadConstraintsTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/ServiceInsertionAndLoadConstraintsTest.java index 62c129b1..bd7799e6 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/ServiceInsertionAndLoadConstraintsTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/ServiceInsertionAndLoadConstraintsTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/ShipmentInsertionCalculatorTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/ShipmentInsertionCalculatorTest.java index 71ad12c6..6223ac92 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/ShipmentInsertionCalculatorTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/ShipmentInsertionCalculatorTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestAuxilliaryCostCalculator.java b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestAuxilliaryCostCalculator.java index f0bb4d5c..1ebd06e2 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestAuxilliaryCostCalculator.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestAuxilliaryCostCalculator.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import static org.junit.Assert.*; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestInserter.java b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestInserter.java index 7b25692e..4de0730c 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestInserter.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestInserter.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestLocalActivityInsertionCostsCalculator.java b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestLocalActivityInsertionCostsCalculator.java index b391adfa..84c5bc6f 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestLocalActivityInsertionCostsCalculator.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestLocalActivityInsertionCostsCalculator.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestMixedServiceAndShipmentsProblemOnRouteLevel.java b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestMixedServiceAndShipmentsProblemOnRouteLevel.java index d90a33bc..d1ada070 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestMixedServiceAndShipmentsProblemOnRouteLevel.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestMixedServiceAndShipmentsProblemOnRouteLevel.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.recreate; import static org.junit.Assert.assertTrue; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestRouteLevelActivityInsertionCostEstimator.java b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestRouteLevelActivityInsertionCostEstimator.java new file mode 100644 index 00000000..6894eedf --- /dev/null +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestRouteLevelActivityInsertionCostEstimator.java @@ -0,0 +1,176 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ +package jsprit.core.algorithm.recreate; + +import jsprit.core.algorithm.state.StateManager; +import jsprit.core.algorithm.state.UpdateVariableCosts; +import jsprit.core.problem.cost.VehicleRoutingActivityCosts; +import jsprit.core.problem.cost.VehicleRoutingTransportCosts; +import jsprit.core.problem.driver.Driver; +import jsprit.core.problem.job.Job; +import jsprit.core.problem.job.Service; +import jsprit.core.problem.misc.JobInsertionContext; +import jsprit.core.problem.solution.route.VehicleRoute; +import jsprit.core.problem.solution.route.activity.PickupActivity; +import jsprit.core.problem.solution.route.activity.PickupService; +import jsprit.core.problem.solution.route.activity.TimeWindow; +import jsprit.core.problem.solution.route.activity.TourActivity; +import jsprit.core.problem.vehicle.Vehicle; +import jsprit.core.problem.vehicle.VehicleImpl; +import jsprit.core.problem.vehicle.VehicleType; +import jsprit.core.problem.vehicle.VehicleTypeImpl; +import jsprit.core.util.CostFactory; +import org.junit.Before; +import org.junit.Test; + +import java.util.Arrays; +import java.util.Collections; + +import static org.junit.Assert.assertEquals; + +/** + * Created by schroeder on 02.07.14. + */ +public class TestRouteLevelActivityInsertionCostEstimator { + + private VehicleRoute route; + + private VehicleRoutingTransportCosts routingCosts; + + private VehicleRoutingActivityCosts activityCosts; + + private StateManager stateManager; + + @Before + public void doBefore(){ + routingCosts = CostFactory.createEuclideanCosts(); + + activityCosts = new VehicleRoutingActivityCosts() { + + @Override + public double getActivityCost(TourActivity tourAct, double arrivalTime, Driver driver, Vehicle vehicle) { + return Math.max(0.,arrivalTime - tourAct.getTheoreticalLatestOperationStartTime()); + } + + }; + Service s1 = Service.Builder.newInstance("s1").setLocationId("10,0").setTimeWindow(TimeWindow.newInstance(10.,10.)).build(); + Service s2 = Service.Builder.newInstance("s2").setLocationId("20,0").setTimeWindow(TimeWindow.newInstance(20.,20.)).build(); + Service s3 = Service.Builder.newInstance("s3").setLocationId("30,0").setTimeWindow(TimeWindow.newInstance(30.,30.)).build(); + + VehicleType type = VehicleTypeImpl.Builder.newInstance("type").build(); + Vehicle vehicle = VehicleImpl.Builder.newInstance("vehicle").setStartLocationId("0,0").setType(type).build(); + + route = VehicleRoute.Builder.newInstance(vehicle).addService(s1).addService(s2).addService(s3).build(); + + stateManager = new StateManager(routingCosts); + stateManager.addStateUpdater(new UpdateVariableCosts(activityCosts,routingCosts,stateManager)); + stateManager.informInsertionStarts(Arrays.asList(route), Collections.emptyList()); + } + + @Test + public void whenNewActInBetweenFirstAndSecond_and_forwardLookingIs0_itShouldReturnCorrectCosts(){ + Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").build(); + PickupActivity pickupService = new PickupService(s4); + JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(0); + ActivityInsertionCostsCalculator.ActivityInsertionCosts iCosts = estimator.getCosts(context, route.getStart(), route.getActivities().get(0), pickupService, 0.); + assertEquals(0.,iCosts.getAdditionalCosts(),0.01); + } + + @Test + public void whenNewActWithTWInBetweenFirstAndSecond_and_forwardLookingIs0_itShouldReturnCorrectCosts(){ + Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").setTimeWindow(TimeWindow.newInstance(5.,5.)).build(); + PickupActivity pickupService = new PickupService(s4); + JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(0); + ActivityInsertionCostsCalculator.ActivityInsertionCosts iCosts = estimator.getCosts(context, route.getStart(), route.getActivities().get(0), pickupService, 0.); + assertEquals(0.,iCosts.getAdditionalCosts(),0.01); + } + + @Test + public void whenNewActWithTWAndServiceTimeInBetweenFirstAndSecond_and_forwardLookingIs0_itShouldReturnCorrectCosts(){ + Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").setServiceTime(10.).setTimeWindow(TimeWindow.newInstance(5.,5.)).build(); + PickupActivity pickupService = new PickupService(s4); + JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(0); + ActivityInsertionCostsCalculator.ActivityInsertionCosts iCosts = estimator.getCosts(context, route.getStart(), route.getActivities().get(0), pickupService, 0.); + double expectedTransportCosts = 0.; + double expectedActivityCosts = 10.; + assertEquals(expectedActivityCosts+expectedTransportCosts,iCosts.getAdditionalCosts(),0.01); + } + + @Test + public void whenNewActWithTWAndServiceTimeInBetweenFirstAndSecond_and_forwardLookingIs3_itShouldReturnCorrectCosts(){ + Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").setServiceTime(10.).setTimeWindow(TimeWindow.newInstance(5.,5.)).build(); + PickupActivity pickupService = new PickupService(s4); + JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(3); + ActivityInsertionCostsCalculator.ActivityInsertionCosts iCosts = estimator.getCosts(context, route.getStart(), route.getActivities().get(0), pickupService, 0.); + double expectedTransportCosts = 0.; + double expectedActivityCosts = 30.; + assertEquals(expectedActivityCosts+expectedTransportCosts,iCosts.getAdditionalCosts(),0.01); + } + + @Test + public void whenNewActInBetweenSecondAndThird_and_forwardLookingIs0_itShouldReturnCorrectCosts(){ + Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").build(); + PickupActivity pickupService = new PickupService(s4); + JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(0); + ActivityInsertionCostsCalculator.ActivityInsertionCosts iCosts = + estimator.getCosts(context, route.getActivities().get(0), route.getActivities().get(1), pickupService, 10.); + double expectedTransportCosts = 10.; + double expectedActivityCosts = 10.; + assertEquals(expectedTransportCosts+expectedActivityCosts,iCosts.getAdditionalCosts(),0.01); + } + + @Test + public void whenNewActInBetweenSecondAndThird_and_forwardLookingIs3_itShouldReturnCorrectCosts(){ + Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").build(); + PickupActivity pickupService = new PickupService(s4); + JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(3); + ActivityInsertionCostsCalculator.ActivityInsertionCosts iCosts = + estimator.getCosts(context, route.getActivities().get(0), route.getActivities().get(1), pickupService, 10.); + double expectedTransportCosts = 10.; + double expectedActivityCosts = 10.+10.; + assertEquals(expectedTransportCosts+expectedActivityCosts,iCosts.getAdditionalCosts(),0.01); + } + + @Test + public void whenNewActWithTWInBetweenSecondAndThird_and_forwardLookingIs3_itShouldReturnCorrectCosts(){ + Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").setTimeWindow(TimeWindow.newInstance(5.,5.)).build(); + PickupActivity pickupService = new PickupService(s4); + JobInsertionContext context = new JobInsertionContext(route,s4,route.getVehicle(),route.getDriver(),0.); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(3); + ActivityInsertionCostsCalculator.ActivityInsertionCosts iCosts = + estimator.getCosts(context, route.getActivities().get(0), route.getActivities().get(1), pickupService, 10.); + double expectedTransportCosts = 10.; + double expectedActivityCosts = 10.+10.+10.; + assertEquals(expectedTransportCosts+expectedActivityCosts,iCosts.getAdditionalCosts(),0.01); + } + +} diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestRouteLevelServiceInsertionCostEstimator.java b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestRouteLevelServiceInsertionCostEstimator.java new file mode 100644 index 00000000..15428f59 --- /dev/null +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/recreate/TestRouteLevelServiceInsertionCostEstimator.java @@ -0,0 +1,163 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ +package jsprit.core.algorithm.recreate; + +import static org.junit.Assert.assertEquals; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.util.Arrays; +import java.util.Collections; + +import jsprit.core.algorithm.state.StateManager; +import jsprit.core.algorithm.state.UpdateVariableCosts; +import jsprit.core.problem.VehicleRoutingProblem; +import jsprit.core.problem.constraint.ConstraintManager; +import jsprit.core.problem.cost.VehicleRoutingActivityCosts; +import jsprit.core.problem.cost.VehicleRoutingTransportCosts; +import jsprit.core.problem.driver.Driver; +import jsprit.core.problem.job.Job; +import jsprit.core.problem.job.Service; +import jsprit.core.problem.solution.route.VehicleRoute; +import jsprit.core.problem.solution.route.activity.TimeWindow; +import jsprit.core.problem.solution.route.activity.TourActivity; +import jsprit.core.problem.vehicle.Vehicle; +import jsprit.core.problem.vehicle.VehicleImpl; +import jsprit.core.problem.vehicle.VehicleType; +import jsprit.core.problem.vehicle.VehicleTypeImpl; +import jsprit.core.util.CostFactory; + +import org.junit.Before; +import org.junit.Test; + +/** + * Created by schroeder on 02.07.14. + */ +public class TestRouteLevelServiceInsertionCostEstimator { + + private VehicleRoute route; + + private VehicleRoutingTransportCosts routingCosts; + + private VehicleRoutingActivityCosts activityCosts; + + private StateManager stateManager; + + private ConstraintManager constraintManager; + + @Before + public void doBefore(){ + routingCosts = CostFactory.createEuclideanCosts(); + + activityCosts = new VehicleRoutingActivityCosts() { + + @Override + public double getActivityCost(TourActivity tourAct, double arrivalTime, Driver driver, Vehicle vehicle) { + return Math.max(0.,arrivalTime - tourAct.getTheoreticalLatestOperationStartTime()); + } + + }; + Service s1 = Service.Builder.newInstance("s1").setLocationId("10,0").setTimeWindow(TimeWindow.newInstance(10.,10.)).build(); + Service s2 = Service.Builder.newInstance("s2").setLocationId("20,0").setTimeWindow(TimeWindow.newInstance(20.,20.)).build(); + Service s3 = Service.Builder.newInstance("s3").setLocationId("30,0").setTimeWindow(TimeWindow.newInstance(30.,30.)).build(); + + VehicleType type = VehicleTypeImpl.Builder.newInstance("type").build(); + Vehicle vehicle = VehicleImpl.Builder.newInstance("vehicle").setStartLocationId("0,0").setType(type).build(); + + route = VehicleRoute.Builder.newInstance(vehicle).addService(s1).addService(s2).addService(s3).build(); + + stateManager = new StateManager(routingCosts); + stateManager.addStateUpdater(new UpdateVariableCosts(activityCosts,routingCosts,stateManager)); + stateManager.informInsertionStarts(Arrays.asList(route), Collections.emptyList()); + + VehicleRoutingProblem vrp = mock(VehicleRoutingProblem.class); + when(vrp.getTransportCosts()).thenReturn(routingCosts); + + constraintManager = new ConstraintManager(vrp,stateManager); + } + + @Test + public void whenNewServiceNeedToBeInserted_itShouldReturnCorrectInsertionCosts(){ + Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").setTimeWindow(TimeWindow.newInstance(5.,5.)).build(); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(0); + ServiceInsertionOnRouteLevelCalculator routeInserter = new ServiceInsertionOnRouteLevelCalculator(routingCosts, + activityCosts,estimator,constraintManager,constraintManager); + routeInserter.setStates(stateManager); + InsertionData iData = routeInserter.getInsertionData(route,s4,route.getVehicle(),route.getDepartureTime(),route.getDriver(),Double.MAX_VALUE); + assertEquals(0.,iData.getInsertionCost(),0.01); + } + + @Test + public void whenNewServiceNeedToBeInserted_itShouldReturnCorrectInsertionIndex(){ + Service s4 = Service.Builder.newInstance("s4").setLocationId("5,0").setTimeWindow(TimeWindow.newInstance(5.,5.)).build(); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(0); + ServiceInsertionOnRouteLevelCalculator routeInserter = new ServiceInsertionOnRouteLevelCalculator(routingCosts, + activityCosts,estimator,constraintManager,constraintManager); + routeInserter.setStates(stateManager); + InsertionData iData = routeInserter.getInsertionData(route,s4,route.getVehicle(),route.getDepartureTime(),route.getDriver(),Double.MAX_VALUE); + assertEquals(0,iData.getDeliveryInsertionIndex(),0.01); + } + + @Test + public void whenNewServiceWithServiceTimeNeedToBeInserted_itShouldReturnCorrectInsertionData(){ + Service s4 = Service.Builder.newInstance("s4").setServiceTime(10.).setLocationId("5,0").setTimeWindow(TimeWindow.newInstance(5.,5.)).build(); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(0); + ServiceInsertionOnRouteLevelCalculator routeInserter = new ServiceInsertionOnRouteLevelCalculator(routingCosts, + activityCosts,estimator,constraintManager,constraintManager); + routeInserter.setStates(stateManager); + InsertionData iData = routeInserter.getInsertionData(route,s4,route.getVehicle(),route.getDepartureTime(),route.getDriver(),Double.MAX_VALUE); + assertEquals(0,iData.getDeliveryInsertionIndex(),0.01); + assertEquals(30.,iData.getInsertionCost(),0.01); + } + + + @Test + public void whenNewServiceWithServiceTimeNeedToBeInsertedAndRouteIsEmpty_itShouldReturnCorrectInsertionData(){ + Service s4 = Service.Builder.newInstance("s4").setServiceTime(10.).setLocationId("5,0").setTimeWindow(TimeWindow.newInstance(5.,5.)).build(); +// PickupActivity pickupService = new PickupService(s4); + VehicleRoute emptyroute = VehicleRoute.emptyRoute(); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(0); + ServiceInsertionOnRouteLevelCalculator routeInserter = new ServiceInsertionOnRouteLevelCalculator(routingCosts, + activityCosts,estimator,constraintManager,constraintManager); + routeInserter.setStates(stateManager); + InsertionData iData = routeInserter.getInsertionData(emptyroute,s4,route.getVehicle(),route.getDepartureTime(),route.getDriver(),Double.MAX_VALUE); + assertEquals(0,iData.getDeliveryInsertionIndex(),0.01); + assertEquals(10.,iData.getInsertionCost(),0.01); + } + + @Test + public void whenNewServiceWithServiceTimeAndTWNeedToBeInsertedAndRouteIsEmpty_itShouldReturnCorrectInsertionData(){ + Service s4 = Service.Builder.newInstance("s4").setServiceTime(10.).setLocationId("5,0").setTimeWindow(TimeWindow.newInstance(3.,3.)).build(); +// PickupActivity pickupService = new PickupService(s4); + VehicleRoute emptyroute = VehicleRoute.emptyRoute(); + RouteLevelActivityInsertionCostsEstimator estimator = new RouteLevelActivityInsertionCostsEstimator(routingCosts,activityCosts,stateManager); + estimator.setForwardLooking(0); + ServiceInsertionOnRouteLevelCalculator routeInserter = new ServiceInsertionOnRouteLevelCalculator(routingCosts, + activityCosts,estimator,constraintManager,constraintManager); + routeInserter.setStates(stateManager); + InsertionData iData = routeInserter.getInsertionData(emptyroute,s4,route.getVehicle(),route.getDepartureTime(),route.getDriver(),Double.MAX_VALUE); + assertEquals(0,iData.getDeliveryInsertionIndex(),0.01); + assertEquals(10.+2.,iData.getInsertionCost(),0.01); + } + +} diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/JobNeighborhoodsImplTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/JobNeighborhoodsImplTest.java index 42260502..b19b5b42 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/JobNeighborhoodsImplTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/JobNeighborhoodsImplTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.ruin; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/JobNeighborhoodsWithCapRestrictionImplTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/JobNeighborhoodsWithCapRestrictionImplTest.java index 9fb1a17b..94c53b0d 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/JobNeighborhoodsWithCapRestrictionImplTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/JobNeighborhoodsWithCapRestrictionImplTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.ruin; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/distance/AverageJobDistanceTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/distance/AverageJobDistanceTest.java index 970bffa0..79047815 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/distance/AverageJobDistanceTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/ruin/distance/AverageJobDistanceTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.ruin.distance; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/state/GenericsTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/state/GenericsTest.java index 57e417a6..15580a51 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/state/GenericsTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/state/GenericsTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import java.util.HashMap; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/state/HardPickupAndDeliveryShipmentActivityConstraintTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/state/HardPickupAndDeliveryShipmentActivityConstraintTest.java index 3b9ea2b1..ef7a25b7 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/state/HardPickupAndDeliveryShipmentActivityConstraintTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/state/HardPickupAndDeliveryShipmentActivityConstraintTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/state/StateManagerTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/state/StateManagerTest.java index c3791629..34b403a8 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/state/StateManagerTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/state/StateManagerTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import static org.junit.Assert.*; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateLoadsTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateLoadsTest.java index 649f9113..ed046bac 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateLoadsTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateLoadsTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtActivitiesByLookingBackwardInRouteTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtActivitiesByLookingBackwardInRouteTest.java index dd70e104..9f493ebd 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtActivitiesByLookingBackwardInRouteTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtActivitiesByLookingBackwardInRouteTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtActivitiesByLookingForwardInRouteTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtActivitiesByLookingForwardInRouteTest.java index 343648ce..bac34ae9 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtActivitiesByLookingForwardInRouteTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtActivitiesByLookingForwardInRouteTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtRouteTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtRouteTest.java index 26e053c0..e21544dc 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtRouteTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateMaxCapacityUtilizationAtRouteTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdatePracticalTimeWindowTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdatePracticalTimeWindowTest.java index 7501b0ee..a9c14270 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdatePracticalTimeWindowTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdatePracticalTimeWindowTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateVariableCostsTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateVariableCostsTest.java index ae75642f..6c0f9ce9 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateVariableCostsTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/state/UpdateVariableCostsTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.algorithm.state; public class UpdateVariableCostsTest { diff --git a/jsprit-core/src/test/java/jsprit/core/problem/CapacityTest.java b/jsprit-core/src/test/java/jsprit/core/problem/CapacityTest.java index f8d5cefe..8f509175 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/CapacityTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/CapacityTest.java @@ -1,4 +1,21 @@ - +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/constraint/ServiceLoadRouteLevelConstraintTest.java b/jsprit-core/src/test/java/jsprit/core/problem/constraint/ServiceLoadRouteLevelConstraintTest.java index 90be3a14..72a373ae 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/constraint/ServiceLoadRouteLevelConstraintTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/constraint/ServiceLoadRouteLevelConstraintTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import static org.junit.Assert.assertFalse; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/constraint/SoftActivityConstraintManagerTest.java b/jsprit-core/src/test/java/jsprit/core/problem/constraint/SoftActivityConstraintManagerTest.java index 2f8b486f..3611b986 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/constraint/SoftActivityConstraintManagerTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/constraint/SoftActivityConstraintManagerTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/constraint/SoftRouteConstraintManagerTest.java b/jsprit-core/src/test/java/jsprit/core/problem/constraint/SoftRouteConstraintManagerTest.java index 75dab6b6..efaad832 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/constraint/SoftRouteConstraintManagerTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/constraint/SoftRouteConstraintManagerTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import jsprit.core.problem.misc.JobInsertionContext; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/constraint/TestConstraintManager.java b/jsprit-core/src/test/java/jsprit/core/problem/constraint/TestConstraintManager.java index 6f8ec250..71e4566c 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/constraint/TestConstraintManager.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/constraint/TestConstraintManager.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.constraint; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/job/DeliveryTest.java b/jsprit-core/src/test/java/jsprit/core/problem/job/DeliveryTest.java index adb920d1..8741cc23 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/job/DeliveryTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/job/DeliveryTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.job; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/job/PickupTest.java b/jsprit-core/src/test/java/jsprit/core/problem/job/PickupTest.java index ae76970c..d338c2fd 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/job/PickupTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/job/PickupTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.job; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/job/ShipmentTest.java b/jsprit-core/src/test/java/jsprit/core/problem/job/ShipmentTest.java index 79bda2a3..bb7df6ea 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/job/ShipmentTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/job/ShipmentTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.job; import jsprit.core.problem.solution.route.activity.TimeWindow; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/VehicleRoutingProblemSolutionTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/VehicleRoutingProblemSolutionTest.java index b08f03c8..4d55c600 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/solution/VehicleRoutingProblemSolutionTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/VehicleRoutingProblemSolutionTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution; import java.util.Arrays; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/VehicleRouteBuilderTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/VehicleRouteBuilderTest.java index e0217d9e..4862bdea 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/VehicleRouteBuilderTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/VehicleRouteBuilderTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DefaultShipmentActivityFactoryTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DefaultShipmentActivityFactoryTest.java index 426222a5..c03571dd 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DefaultShipmentActivityFactoryTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DefaultShipmentActivityFactoryTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import static org.junit.Assert.assertNotNull; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DefaultTourActivityFactoryTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DefaultTourActivityFactoryTest.java index 50000ac9..d8943301 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DefaultTourActivityFactoryTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DefaultTourActivityFactoryTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import static org.junit.Assert.assertNotNull; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DeliverServiceTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DeliverServiceTest.java index 2c450b92..4af06826 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DeliverServiceTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DeliverServiceTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DeliverShipmentTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DeliverShipmentTest.java index acab1a82..d0721ed4 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DeliverShipmentTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/DeliverShipmentTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/EndTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/EndTest.java index bb6aba00..4b5c7263 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/EndTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/EndTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/PickupServiceTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/PickupServiceTest.java index 8a3ff5e7..a89c09a9 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/PickupServiceTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/PickupServiceTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/PickupShipmentTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/PickupShipmentTest.java index f233862f..74df73f5 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/PickupShipmentTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/PickupShipmentTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/StartTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/StartTest.java index 3f2a0c47..eea9e492 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/StartTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/StartTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; import static org.junit.Assert.*; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/TimeWindowTest.java b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/TimeWindowTest.java index 0fbbe624..f2047a97 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/TimeWindowTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/solution/route/activity/TimeWindowTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.solution.route.activity; public class TimeWindowTest { diff --git a/jsprit-core/src/test/java/jsprit/core/problem/vehicle/FiniteVehicleFleetManagerFactoryTest.java b/jsprit-core/src/test/java/jsprit/core/problem/vehicle/FiniteVehicleFleetManagerFactoryTest.java index bc81c950..f21e0d7c 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/vehicle/FiniteVehicleFleetManagerFactoryTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/vehicle/FiniteVehicleFleetManagerFactoryTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.vehicle; import org.junit.Test; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/vehicle/VehicleImplTest.java b/jsprit-core/src/test/java/jsprit/core/problem/vehicle/VehicleImplTest.java index df3dfafd..0b799f16 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/vehicle/VehicleImplTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/vehicle/VehicleImplTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.vehicle; diff --git a/jsprit-core/src/test/java/jsprit/core/problem/vehicle/VehicleTypeImplTest.java b/jsprit-core/src/test/java/jsprit/core/problem/vehicle/VehicleTypeImplTest.java index 25b8bcc1..47839f6a 100644 --- a/jsprit-core/src/test/java/jsprit/core/problem/vehicle/VehicleTypeImplTest.java +++ b/jsprit-core/src/test/java/jsprit/core/problem/vehicle/VehicleTypeImplTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.problem.vehicle; import static org.junit.Assert.*; diff --git a/jsprit-core/src/test/java/jsprit/core/util/CostFactory.java b/jsprit-core/src/test/java/jsprit/core/util/CostFactory.java index f63c91a0..f42f680c 100644 --- a/jsprit-core/src/test/java/jsprit/core/util/CostFactory.java +++ b/jsprit-core/src/test/java/jsprit/core/util/CostFactory.java @@ -1,9 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.util; import jsprit.core.problem.cost.VehicleRoutingTransportCosts; public class CostFactory { - + + /** + * Return manhattanCosts. + *

+ * This retrieves coordinates from locationIds. LocationId has to be locId="{x},{y}". For example, + * locId="10,10" is interpreted such that x=10 and y=10. + * + * @return manhattanCosts + */ public static VehicleRoutingTransportCosts createManhattanCosts(){ Locations locations = new Locations(){ @@ -18,7 +44,15 @@ public class CostFactory { }; return new ManhattanCosts(locations); } - + + /** + * Return euclideanCosts. + *

+ * This retrieves coordinates from locationIds. LocationId has to be locId="{x},{y}". For example, + * locId="10,10" is interpreted such that x=10 and y=10. + * + * @return euclidean + */ public static VehicleRoutingTransportCosts createEuclideanCosts(){ Locations locations = new Locations(){ diff --git a/jsprit-core/src/test/java/jsprit/core/util/TimeTest.java b/jsprit-core/src/test/java/jsprit/core/util/TimeTest.java index a591300a..351b4026 100644 --- a/jsprit-core/src/test/java/jsprit/core/util/TimeTest.java +++ b/jsprit-core/src/test/java/jsprit/core/util/TimeTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.util; import static org.junit.Assert.*; diff --git a/jsprit-core/src/test/java/jsprit/core/util/VehicleRoutingTransportCostsMatrixTest.java b/jsprit-core/src/test/java/jsprit/core/util/VehicleRoutingTransportCostsMatrixTest.java index 2ec9dcb9..d17ab230 100644 --- a/jsprit-core/src/test/java/jsprit/core/util/VehicleRoutingTransportCostsMatrixTest.java +++ b/jsprit-core/src/test/java/jsprit/core/util/VehicleRoutingTransportCostsMatrixTest.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.core.util; import static org.junit.Assert.assertEquals; diff --git a/jsprit-core/src/test/resources/finiteVrpWithInitialSolutionForWriterTest.xml b/jsprit-core/src/test/resources/finiteVrpWithInitialSolutionForWriterTest.xml index e5ffcfb8..6186c30c 100644 --- a/jsprit-core/src/test/resources/finiteVrpWithInitialSolutionForWriterTest.xml +++ b/jsprit-core/src/test/resources/finiteVrpWithInitialSolutionForWriterTest.xml @@ -5,23 +5,6 @@ FINITE - - v5 - vehType3 - - startLoc - - - - endLoc - - - - 0.0 - 1000.0 - - true - v2 vehType2 @@ -56,6 +39,23 @@ true + + v5 + vehType3 + + startLoc + + + + endLoc + + + + 0.0 + 1000.0 + + true + v4 vehType2 diff --git a/jsprit-examples/.gitignore b/jsprit-examples/.gitignore index fb67e2b9..d1980dba 100644 --- a/jsprit-examples/.gitignore +++ b/jsprit-examples/.gitignore @@ -12,3 +12,4 @@ # Eclipse .project .classpath +.settings diff --git a/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java b/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java index 13951aa9..d01ddfae 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java +++ b/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.examples; import java.io.BufferedReader; diff --git a/jsprit-examples/src/main/java/jsprit/examples/HVRPBenchmarkExample.java b/jsprit-examples/src/main/java/jsprit/examples/HVRPBenchmarkExample.java index 4908669f..773d2bc6 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/HVRPBenchmarkExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/HVRPBenchmarkExample.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.examples; import java.util.Collection; diff --git a/jsprit-examples/src/main/java/jsprit/examples/HVRPExample.java b/jsprit-examples/src/main/java/jsprit/examples/HVRPExample.java index ee8fba26..87bda898 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/HVRPExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/HVRPExample.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.examples; import java.util.Collection; diff --git a/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java b/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java index 39491358..65576ac1 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java +++ b/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.examples; import java.util.Collection; diff --git a/jsprit-examples/src/main/java/jsprit/util/Examples.java b/jsprit-examples/src/main/java/jsprit/util/Examples.java index 37a4463a..24a1d9f0 100644 --- a/jsprit-examples/src/main/java/jsprit/util/Examples.java +++ b/jsprit-examples/src/main/java/jsprit/util/Examples.java @@ -1,3 +1,21 @@ +/******************************************************************************* + * Copyright (c) 2014 Stefan Schroeder. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3.0 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library. If not, see . + * + * Contributors: + * Stefan Schroeder - initial API and implementation + ******************************************************************************/ package jsprit.util; import java.io.File;