From 25e5c096f230e6a570942351e007b451a9cdbad2 Mon Sep 17 00:00:00 2001 From: oblonski Date: Fri, 11 Sep 2015 12:49:01 +0200 Subject: [PATCH] add editorconfig - #174 --- .../recreate/BestInsertionConcurrent.java | 4 +- .../recreate/RegretInsertionConcurrent.java | 102 ++-- .../core/algorithm/ruin/RuinClusters.java | 250 +++++---- .../ServiceLoadActivityLevelConstraint.java | 69 ++- .../constraint/TimeWindowConstraint.java | 4 +- ...VehicleDependentTimeWindowConstraints.java | 4 +- .../core/algorithm/InitialRoutesTest.java | 39 +- ...CostsHigherThanTimesAndFiniteFleet_IT.java | 4 +- ...niteFleet_withTimeAndDistanceCosts_IT.java | 4 +- .../core/algorithm/RefuseCollection_IT.java | 4 +- ...erviceAndShipmentsProblemOnRouteLevel.java | 4 +- ...iteVrpWithInitialSolutionForWriterTest.xml | 493 +++++++++--------- .../test/resources/infiniteWriterV2Test.xml | 171 +++--- .../jsprit/examples/BicycleMessenger.java | 4 +- ...nfigureAlgorithmInCodeInsteadOfPerXml.java | 4 +- .../jsprit/examples/CostMatrixExample.java | 2 +- ...ithMultipleDepotsAndOpenRoutesExample.java | 4 +- .../jsprit/examples/MultipleDepotExample.java | 4 +- .../examples/MultipleDepotExample2.java | 4 +- ...MultipleDepotWithInitialRoutesExample.java | 4 +- .../examples/PickupAndDeliveryExample.java | 4 +- .../examples/PickupAndDeliveryExample2.java | 4 +- .../PickupAndDeliveryOpenExample.java | 4 +- .../examples/RefuseCollectionExample.java | 4 +- ...RefuseCollectionWithFastMatrixExample.java | 4 +- ...rvicePickupsWithMultipleDepotsExample.java | 4 +- ...eDepotBoundedPickupAndDeliveryExample.java | 4 +- ...SimpleEnRoutePickupAndDeliveryExample.java | 4 +- ...utePickupAndDeliveryOpenRoutesExample.java | 4 +- ...veryWithDepotBoundedDeliveriesExample.java | 4 +- .../java/jsprit/examples/SimpleExample.java | 4 +- .../examples/SimpleExampleOpenRoutes.java | 4 +- .../examples/SimpleExampleWithSkills.java | 4 +- .../SimpleVRPWithBackhaulsExample.java | 4 +- .../java/jsprit/examples/SolomonExample.java | 4 +- ...ampleWithSpecifiedVehicleEndLocations.java | 4 +- ...pecifiedVehicleEndLocationsWithoutTWs.java | 4 +- .../jsprit/examples/SolomonOpenExample.java | 4 +- .../jsprit/examples/SolomonR101Example.java | 4 +- .../SolomonWithRegretInsertionExample.java | 4 +- .../examples/TransportOfDisabledPeople.java | 4 +- .../examples/VRPWithBackhaulsExample.java | 4 +- .../examples/VRPWithBackhaulsExample2.java | 4 +- 43 files changed, 625 insertions(+), 645 deletions(-) diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertionConcurrent.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertionConcurrent.java index 1b7e0520..fa9210d7 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertionConcurrent.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/BestInsertionConcurrent.java @@ -178,8 +178,8 @@ public final class BestInsertionConcurrent extends AbstractInsertionStrategy { } else { vehicleRoutes.add(VehicleRoute.emptyRoute()); } - /* - * distribute routes to batches equally + /* + * distribute routes to batches equally */ int count = 0; for (VehicleRoute route : vehicleRoutes) { diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RegretInsertionConcurrent.java b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RegretInsertionConcurrent.java index 0d303849..8e922728 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RegretInsertionConcurrent.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/recreate/RegretInsertionConcurrent.java @@ -32,63 +32,61 @@ import java.util.List; import java.util.concurrent.*; /** -* Insertion based on regret approach. -* -*

Basically calculates the insertion cost of the firstBest and the secondBest alternative. The score is then calculated as difference -* between secondBest and firstBest, plus additional scoring variables that can defined in this.ScoringFunction. -* The idea is that if the cost of the secondBest alternative is way higher than the first best, it seems to be important to insert this -* customer immediatedly. If difference is not that high, it might not impact solution if this customer is inserted later. -* -* @author stefan schroeder -* -*/ + * Insertion based on regret approach. + *

+ *

Basically calculates the insertion cost of the firstBest and the secondBest alternative. The score is then calculated as difference + * between secondBest and firstBest, plus additional scoring variables that can defined in this.ScoringFunction. + * The idea is that if the cost of the secondBest alternative is way higher than the first best, it seems to be important to insert this + * customer immediatedly. If difference is not that high, it might not impact solution if this customer is inserted later. + * + * @author stefan schroeder + */ public class RegretInsertionConcurrent extends AbstractInsertionStrategy { private static Logger logger = LogManager.getLogger(RegretInsertionConcurrent.class); - private ScoringFunction scoringFunction; + private ScoringFunction scoringFunction; private final JobInsertionCostsCalculator insertionCostsCalculator; private final ExecutorCompletionService completionService; /** - * Sets the scoring function. - * - *

By default, the this.TimeWindowScorer is used. - * - * @param scoringFunction to score - */ - public void setScoringFunction(ScoringFunction scoringFunction) { - this.scoringFunction = scoringFunction; - } + * Sets the scoring function. + *

+ *

By default, the this.TimeWindowScorer is used. + * + * @param scoringFunction to score + */ + public void setScoringFunction(ScoringFunction scoringFunction) { + this.scoringFunction = scoringFunction; + } - public RegretInsertionConcurrent(JobInsertionCostsCalculator jobInsertionCalculator, VehicleRoutingProblem vehicleRoutingProblem, ExecutorService executorService) { - super(vehicleRoutingProblem); + public RegretInsertionConcurrent(JobInsertionCostsCalculator jobInsertionCalculator, VehicleRoutingProblem vehicleRoutingProblem, ExecutorService executorService) { + super(vehicleRoutingProblem); this.scoringFunction = new DefaultScorer(vehicleRoutingProblem); - this.insertionCostsCalculator = jobInsertionCalculator; + this.insertionCostsCalculator = jobInsertionCalculator; this.vrp = vehicleRoutingProblem; completionService = new ExecutorCompletionService(executorService); - logger.debug("initialise " + this); - } + logger.debug("initialise " + this); + } - @Override - public String toString() { - return "[name=regretInsertion][additionalScorer="+scoringFunction+"]"; - } + @Override + public String toString() { + return "[name=regretInsertion][additionalScorer=" + scoringFunction + "]"; + } - /** - * Runs insertion. - * - *

Before inserting a job, all unassigned jobs are scored according to its best- and secondBest-insertion plus additional scoring variables. + /** + * Runs insertion. + *

+ *

Before inserting a job, all unassigned jobs are scored according to its best- and secondBest-insertion plus additional scoring variables. * * @throws java.lang.RuntimeException if smth went wrong with thread execution - * - */ - @Override - public Collection insertUnassignedJobs(Collection routes, Collection unassignedJobs) { + */ + @Override + public Collection insertUnassignedJobs(Collection routes, Collection unassignedJobs) { List badJobs = new ArrayList(unassignedJobs.size()); List jobs = new ArrayList(unassignedJobs); @@ -96,14 +94,14 @@ public class RegretInsertionConcurrent extends AbstractInsertionStrategy { List unassignedJobList = new ArrayList(jobs); List badJobList = new ArrayList(); ScoredJob bestScoredJob = nextJob(routes, unassignedJobList, badJobList); - if(bestScoredJob != null){ - if(bestScoredJob.isNewRoute()){ + if (bestScoredJob != null) { + if (bestScoredJob.isNewRoute()) { routes.add(bestScoredJob.getRoute()); } - insertJob(bestScoredJob.getJob(),bestScoredJob.getInsertionData(),bestScoredJob.getRoute()); + insertJob(bestScoredJob.getJob(), bestScoredJob.getInsertionData(), bestScoredJob.getRoute()); jobs.remove(bestScoredJob.getJob()); } - for(Job j : badJobList) { + for (Job j : badJobList) { jobs.remove(j); badJobs.add(j); } @@ -125,26 +123,23 @@ public class RegretInsertionConcurrent extends AbstractInsertionStrategy { }); } - try{ - for(int i=0; i < unassignedJobList.size(); i++){ + try { + for (int i = 0; i < unassignedJobList.size(); i++) { Future fsj = completionService.take(); ScoredJob sJob = fsj.get(); - if(sJob instanceof RegretInsertion.BadJob){ + if (sJob instanceof RegretInsertion.BadJob) { badJobList.add(sJob.getJob()); continue; } - if(bestScoredJob == null){ + if (bestScoredJob == null) { bestScoredJob = sJob; - } - else if(sJob.getScore() > bestScoredJob.getScore()){ + } else if (sJob.getScore() > bestScoredJob.getScore()) { bestScoredJob = sJob; } } - } - catch(InterruptedException e){ + } catch (InterruptedException e) { Thread.currentThread().interrupt(); - } - catch (ExecutionException e) { + } catch (ExecutionException e) { throw new RuntimeException(e); } @@ -152,9 +147,4 @@ public class RegretInsertionConcurrent extends AbstractInsertionStrategy { } - - - - - } diff --git a/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RuinClusters.java b/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RuinClusters.java index 313fbf5b..cdc7e349 100644 --- a/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RuinClusters.java +++ b/jsprit-core/src/main/java/jsprit/core/algorithm/ruin/RuinClusters.java @@ -11,7 +11,7 @@ * 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 + * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see . ******************************************************************************/ package jsprit.core.algorithm.ruin; @@ -33,160 +33,158 @@ import java.util.*; /** * Ruin strategy that ruins current solution randomly. I.e. * customer are removed randomly from current solution. - * + * * @author stefan schroeder - * */ public final class RuinClusters extends AbstractRuinStrategy implements IterationStartsListener { - @Override - public void informIterationStarts(int i, VehicleRoutingProblem problem, Collection solutions) { - minPts = 1 + random.nextInt(2); - epsFactor = 0.5 + random.nextDouble(); - } + @Override + public void informIterationStarts(int i, VehicleRoutingProblem problem, Collection solutions) { + minPts = 1 + random.nextInt(2); + epsFactor = 0.5 + random.nextDouble(); + } - public static class JobActivityWrapper implements Clusterable { + public static class JobActivityWrapper implements Clusterable { - private TourActivity.JobActivity jobActivity; + private TourActivity.JobActivity jobActivity; - public JobActivityWrapper(TourActivity.JobActivity jobActivity) { - this.jobActivity = jobActivity; - } + public JobActivityWrapper(TourActivity.JobActivity jobActivity) { + this.jobActivity = jobActivity; + } - @Override - public double[] getPoint() { - return new double[]{ jobActivity.getLocation().getCoordinate().getX(), jobActivity.getLocation().getCoordinate().getY() }; - } + @Override + public double[] getPoint() { + return new double[]{jobActivity.getLocation().getCoordinate().getX(), jobActivity.getLocation().getCoordinate().getY()}; + } - public TourActivity.JobActivity getActivity(){ - return jobActivity; - } - } + public TourActivity.JobActivity getActivity() { + return jobActivity; + } + } - private Logger logger = LogManager.getLogger(RuinClusters.class); + private Logger logger = LogManager.getLogger(RuinClusters.class); - private VehicleRoutingProblem vrp; + private VehicleRoutingProblem vrp; - private JobNeighborhoods jobNeighborhoods; + private JobNeighborhoods jobNeighborhoods; - private int noClusters = 2; + private int noClusters = 2; - private int minPts = 1; + private int minPts = 1; - private double epsFactor = 0.8; + private double epsFactor = 0.8; - public RuinClusters(VehicleRoutingProblem vrp, final int initialNumberJobsToRemove, JobNeighborhoods jobNeighborhoods) { - super(vrp); - this.vrp = vrp; - setRuinShareFactory(new RuinShareFactory() { - @Override - public int createNumberToBeRemoved() { - return initialNumberJobsToRemove; - } - }); - this.jobNeighborhoods = jobNeighborhoods; + public RuinClusters(VehicleRoutingProblem vrp, final int initialNumberJobsToRemove, JobNeighborhoods jobNeighborhoods) { + super(vrp); + this.vrp = vrp; + setRuinShareFactory(new RuinShareFactory() { + @Override + public int createNumberToBeRemoved() { + return initialNumberJobsToRemove; + } + }); + this.jobNeighborhoods = jobNeighborhoods; logger.debug("initialise {}", this); - } + } - public void setNoClusters(int noClusters) { - this.noClusters = noClusters; - } + public void setNoClusters(int noClusters) { + this.noClusters = noClusters; + } - /** - * Removes a fraction of jobs from vehicleRoutes. - * - *

The number of jobs is calculated as follows: Math.ceil(vrp.getJobs().values().size() * fractionOfAllNodes2beRuined). - */ - @Override - public Collection ruinRoutes(Collection vehicleRoutes) { + /** + * Removes a fraction of jobs from vehicleRoutes. + *

+ *

The number of jobs is calculated as follows: Math.ceil(vrp.getJobs().values().size() * fractionOfAllNodes2beRuined). + */ + @Override + public Collection ruinRoutes(Collection vehicleRoutes) { List unassignedJobs = new ArrayList(); - int nOfJobs2BeRemoved = getRuinShareFactory().createNumberToBeRemoved(); - ruin(vehicleRoutes, nOfJobs2BeRemoved, unassignedJobs); + int nOfJobs2BeRemoved = getRuinShareFactory().createNumberToBeRemoved(); + ruin(vehicleRoutes, nOfJobs2BeRemoved, unassignedJobs); return unassignedJobs; - } + } - /** - * Removes nOfJobs2BeRemoved from vehicleRoutes, including targetJob. - */ - @Override - public Collection ruinRoutes(Collection vehicleRoutes, Job targetJob, int nOfJobs2BeRemoved) { + /** + * Removes nOfJobs2BeRemoved from vehicleRoutes, including targetJob. + */ + @Override + public Collection ruinRoutes(Collection vehicleRoutes, Job targetJob, int nOfJobs2BeRemoved) { throw new IllegalStateException("not supported"); - } + } - private void ruin(Collection vehicleRoutes, int nOfJobs2BeRemoved, List unassignedJobs) { - if(vrp.getJobs().values().size() == 0) return; - Map mappedRoutes = map(vehicleRoutes); - int toRemove = nOfJobs2BeRemoved; + private void ruin(Collection vehicleRoutes, int nOfJobs2BeRemoved, List unassignedJobs) { + if (vrp.getJobs().values().size() == 0) return; + Map mappedRoutes = map(vehicleRoutes); + int toRemove = nOfJobs2BeRemoved; - Collection lastRemoved = new ArrayList(); - Set ruined = new HashSet(); - Set removed = new HashSet(); - Set cycleCandidates = new HashSet(); - while(toRemove > 0) { - Job target; - VehicleRoute targetRoute = null; - if(lastRemoved.isEmpty()){ - target = RandomUtils.nextJob(vrp.getJobs().values(), random); - targetRoute = mappedRoutes.get(target); - } - else{ - target = RandomUtils.nextJob(lastRemoved, random); - Iterator neighborIterator = jobNeighborhoods.getNearestNeighborsIterator(nOfJobs2BeRemoved,target); - while(neighborIterator.hasNext()){ - Job j = neighborIterator.next(); - if(!removed.contains(j) && !ruined.contains(mappedRoutes.get(j))){ - targetRoute = mappedRoutes.get(j); - break; - } - } - lastRemoved.clear(); - } - if(targetRoute == null) break; - if(cycleCandidates.contains(targetRoute)) break; - if(ruined.contains(targetRoute)) { - cycleCandidates.add(targetRoute); - break; - } - DBSCANClusterer dbscan = new DBSCANClusterer(vrp.getTransportCosts()); - dbscan.setRandom(random); - dbscan.setMinPts(minPts); - dbscan.setEpsFactor(epsFactor); - List cluster = dbscan.getRandomCluster(targetRoute); - for(Job j : cluster){ - if(toRemove == 0) break; - if(removeJob(j, vehicleRoutes)) { - lastRemoved.add(j); - unassignedJobs.add(j); - } - toRemove--; - } - ruined.add(targetRoute); - } - } + Collection lastRemoved = new ArrayList(); + Set ruined = new HashSet(); + Set removed = new HashSet(); + Set cycleCandidates = new HashSet(); + while (toRemove > 0) { + Job target; + VehicleRoute targetRoute = null; + if (lastRemoved.isEmpty()) { + target = RandomUtils.nextJob(vrp.getJobs().values(), random); + targetRoute = mappedRoutes.get(target); + } else { + target = RandomUtils.nextJob(lastRemoved, random); + Iterator neighborIterator = jobNeighborhoods.getNearestNeighborsIterator(nOfJobs2BeRemoved, target); + while (neighborIterator.hasNext()) { + Job j = neighborIterator.next(); + if (!removed.contains(j) && !ruined.contains(mappedRoutes.get(j))) { + targetRoute = mappedRoutes.get(j); + break; + } + } + lastRemoved.clear(); + } + if (targetRoute == null) break; + if (cycleCandidates.contains(targetRoute)) break; + if (ruined.contains(targetRoute)) { + cycleCandidates.add(targetRoute); + break; + } + DBSCANClusterer dbscan = new DBSCANClusterer(vrp.getTransportCosts()); + dbscan.setRandom(random); + dbscan.setMinPts(minPts); + dbscan.setEpsFactor(epsFactor); + List cluster = dbscan.getRandomCluster(targetRoute); + for (Job j : cluster) { + if (toRemove == 0) break; + if (removeJob(j, vehicleRoutes)) { + lastRemoved.add(j); + unassignedJobs.add(j); + } + toRemove--; + } + ruined.add(targetRoute); + } + } - private List wrap(List activities) { - List wl = new ArrayList(); - for(TourActivity act : activities){ - wl.add(new JobActivityWrapper((TourActivity.JobActivity) act)); - } - return wl; - } + private List wrap(List activities) { + List wl = new ArrayList(); + for (TourActivity act : activities) { + wl.add(new JobActivityWrapper((TourActivity.JobActivity) act)); + } + return wl; + } - private Map map(Collection vehicleRoutes) { - Map map = new HashMap(vrp.getJobs().size()); - for(VehicleRoute r : vehicleRoutes){ - for(Job j : r.getTourActivities().getJobs()){ - map.put(j,r); - } - } - return map; - } + private Map map(Collection vehicleRoutes) { + Map map = new HashMap(vrp.getJobs().size()); + for (VehicleRoute r : vehicleRoutes) { + for (Job j : r.getTourActivities().getJobs()) { + map.put(j, r); + } + } + return map; + } - @Override - public String toString() { - return "[name=clusterRuin]"; - } + @Override + public String toString() { + return "[name=clusterRuin]"; + } } 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 47be0943..3d45b3d0 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 @@ -25,52 +25,49 @@ import jsprit.core.problem.solution.route.state.RouteAndActivityStateGetter; /** * Ensures load constraint for inserting ServiceActivity. - * + *

*

When using this, you need to use
* - * * @author schroeder - * */ public class ServiceLoadActivityLevelConstraint implements HardActivityConstraint { - private RouteAndActivityStateGetter stateManager; + private RouteAndActivityStateGetter stateManager; private Capacity defaultValue; - public ServiceLoadActivityLevelConstraint(RouteAndActivityStateGetter stateManager) { - super(); - this.stateManager = stateManager; + public ServiceLoadActivityLevelConstraint(RouteAndActivityStateGetter stateManager) { + super(); + this.stateManager = stateManager; defaultValue = Capacity.Builder.newInstance().build(); - } + } - @Override - public ConstraintsStatus fulfilled(JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { - Capacity futureMaxLoad; - Capacity prevMaxLoad; - if(prevAct instanceof Start){ - futureMaxLoad = stateManager.getRouteState(iFacts.getRoute(), InternalStates.MAXLOAD, Capacity.class); - if(futureMaxLoad == null) futureMaxLoad = defaultValue; - prevMaxLoad = stateManager.getRouteState(iFacts.getRoute(), InternalStates.LOAD_AT_BEGINNING, Capacity.class); - if(prevMaxLoad == null) prevMaxLoad = defaultValue; - } - else{ - futureMaxLoad = stateManager.getActivityState(prevAct, InternalStates.FUTURE_MAXLOAD, Capacity.class); - if(futureMaxLoad == null) futureMaxLoad = defaultValue; - prevMaxLoad = stateManager.getActivityState(prevAct, InternalStates.PAST_MAXLOAD, Capacity.class); - if(prevMaxLoad == null) prevMaxLoad = defaultValue; + @Override + public ConstraintsStatus fulfilled(JobInsertionContext iFacts, TourActivity prevAct, TourActivity newAct, TourActivity nextAct, double prevActDepTime) { + Capacity futureMaxLoad; + Capacity prevMaxLoad; + if (prevAct instanceof Start) { + futureMaxLoad = stateManager.getRouteState(iFacts.getRoute(), InternalStates.MAXLOAD, Capacity.class); + if (futureMaxLoad == null) futureMaxLoad = defaultValue; + prevMaxLoad = stateManager.getRouteState(iFacts.getRoute(), InternalStates.LOAD_AT_BEGINNING, Capacity.class); + if (prevMaxLoad == null) prevMaxLoad = defaultValue; + } else { + futureMaxLoad = stateManager.getActivityState(prevAct, InternalStates.FUTURE_MAXLOAD, Capacity.class); + if (futureMaxLoad == null) futureMaxLoad = defaultValue; + prevMaxLoad = stateManager.getActivityState(prevAct, InternalStates.PAST_MAXLOAD, Capacity.class); + if (prevMaxLoad == null) prevMaxLoad = defaultValue; - } - if(newAct instanceof PickupService || newAct instanceof ServiceActivity){ - if(!Capacity.addup(newAct.getSize(), futureMaxLoad).isLessOrEqual(iFacts.getNewVehicle().getType().getCapacityDimensions())){ - return ConstraintsStatus.NOT_FULFILLED; - } - } - if(newAct instanceof DeliverService){ - if(!Capacity.addup(Capacity.invert(newAct.getSize()), prevMaxLoad).isLessOrEqual(iFacts.getNewVehicle().getType().getCapacityDimensions())){ - return ConstraintsStatus.NOT_FULFILLED_BREAK; - } - } - return ConstraintsStatus.FULFILLED; - } + } + if (newAct instanceof PickupService || newAct instanceof ServiceActivity) { + if (!Capacity.addup(newAct.getSize(), futureMaxLoad).isLessOrEqual(iFacts.getNewVehicle().getType().getCapacityDimensions())) { + return ConstraintsStatus.NOT_FULFILLED; + } + } + if (newAct instanceof DeliverService) { + if (!Capacity.addup(Capacity.invert(newAct.getSize()), prevMaxLoad).isLessOrEqual(iFacts.getNewVehicle().getType().getCapacityDimensions())) { + return ConstraintsStatus.NOT_FULFILLED_BREAK; + } + } + return ConstraintsStatus.FULFILLED; + } } 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 cdf32be7..dd351639 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 @@ -72,7 +72,7 @@ class TimeWindowConstraint implements HardActivityConstraint { return ConstraintsStatus.NOT_FULFILLED_BREAK; } /* - * if the latest operation start-time of new activity is smaller than the earliest start of prev. activity, + * if the latest operation start-time of new activity is smaller than the earliest start of prev. activity, * then * * |--- prevAct ---| @@ -83,7 +83,7 @@ class TimeWindowConstraint implements HardActivityConstraint { } /* - * |--- prevAct ---| + * |--- prevAct ---| * |- earliest arrival of vehicle * |--- nextAct ---| */ diff --git a/jsprit-core/src/main/java/jsprit/core/problem/constraint/VehicleDependentTimeWindowConstraints.java b/jsprit-core/src/main/java/jsprit/core/problem/constraint/VehicleDependentTimeWindowConstraints.java index 7d18a3ee..c48756cb 100644 --- a/jsprit-core/src/main/java/jsprit/core/problem/constraint/VehicleDependentTimeWindowConstraints.java +++ b/jsprit-core/src/main/java/jsprit/core/problem/constraint/VehicleDependentTimeWindowConstraints.java @@ -79,7 +79,7 @@ public class VehicleDependentTimeWindowConstraints implements HardActivityConstr return ConstraintsStatus.NOT_FULFILLED_BREAK; } /* - * if the latest operation start-time of new activity is smaller than the earliest start of prev. activity, + * if the latest operation start-time of new activity is smaller than the earliest start of prev. activity, * then * * |--- prevAct ---| @@ -90,7 +90,7 @@ public class VehicleDependentTimeWindowConstraints implements HardActivityConstr } /* - * |--- prevAct ---| + * |--- prevAct ---| * |- earliest arrival of vehicle * |--- nextAct ---| */ diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/InitialRoutesTest.java b/jsprit-core/src/test/java/jsprit/core/algorithm/InitialRoutesTest.java index 45f1e0ae..1e395411 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/InitialRoutesTest.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/InitialRoutesTest.java @@ -18,13 +18,6 @@ package jsprit.core.algorithm; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import java.util.Collection; -import java.util.List; - import jsprit.core.algorithm.box.GreedySchrimpfFactory; import jsprit.core.algorithm.box.Jsprit; import jsprit.core.algorithm.box.Jsprit.Builder; @@ -53,9 +46,13 @@ import jsprit.core.problem.vehicle.VehicleTypeImpl; import jsprit.core.reporting.SolutionPrinter; import jsprit.core.util.Coordinate; import jsprit.core.util.Solutions; - import org.junit.Test; +import java.util.Collection; +import java.util.List; + +import static org.junit.Assert.*; + public class InitialRoutesTest { @Test @@ -396,9 +393,9 @@ public class InitialRoutesTest { } @Test - public void whenAllJobsInInitialRoute_itShouldWork(){ - Service s = Service.Builder.newInstance("s").setLocation(Location.newInstance(0,10)).build(); - VehicleImpl v = VehicleImpl.Builder.newInstance("v").setStartLocation(Location.newInstance(0,0)).build(); + public void whenAllJobsInInitialRoute_itShouldWork() { + Service s = Service.Builder.newInstance("s").setLocation(Location.newInstance(0, 10)).build(); + VehicleImpl v = VehicleImpl.Builder.newInstance("v").setStartLocation(Location.newInstance(0, 0)).build(); VehicleRoute iniRoute = VehicleRoute.Builder.newInstance(v).addService(s).build(); VehicleRoutingProblem vrp = VehicleRoutingProblem.Builder.newInstance().addInitialVehicleRoute(iniRoute).build(); VehicleRoutingAlgorithm vra = Jsprit.createAlgorithm(vrp); @@ -406,18 +403,18 @@ public class InitialRoutesTest { vra.searchSolutions(); assertTrue(true); } - + @Test public void buildWithoutTimeConstraints() { - Service s1 = Service.Builder.newInstance("s1").setLocation(Location.newInstance(0,10)).addSizeDimension(0, 10).build(); - Service s2 = Service.Builder.newInstance("s2").setLocation(Location.newInstance(10,20)).addSizeDimension(0, 12).build(); - + Service s1 = Service.Builder.newInstance("s1").setLocation(Location.newInstance(0, 10)).addSizeDimension(0, 10).build(); + Service s2 = Service.Builder.newInstance("s2").setLocation(Location.newInstance(10, 20)).addSizeDimension(0, 12).build(); + VehicleTypeImpl vt = VehicleTypeImpl.Builder.newInstance("vt").addCapacityDimension(0, 15).build(); - VehicleImpl v = VehicleImpl.Builder.newInstance("v").setType(vt).setStartLocation(Location.newInstance(0,0)).build(); - + VehicleImpl v = VehicleImpl.Builder.newInstance("v").setType(vt).setStartLocation(Location.newInstance(0, 0)).build(); + VehicleRoutingProblem vrp = VehicleRoutingProblem.Builder.newInstance().addJob(s1).addJob(s2).addVehicle(v).build(); Builder algBuilder = Jsprit.Builder.newInstance(vrp).addCoreStateAndConstraintStuff(false); - + // only required constraints StateManager stateManager = new StateManager(vrp); ConstraintManager constraintManager = new ConstraintManager(vrp, stateManager); @@ -426,16 +423,16 @@ public class InitialRoutesTest { stateManager.updateLoadStates(); stateManager.addStateUpdater(new UpdateEndLocationIfRouteIsOpen()); stateManager.addStateUpdater(new UpdateVariableCosts(vrp.getActivityCosts(), vrp.getTransportCosts(), stateManager)); - + algBuilder.setStateAndConstraintManager(stateManager, constraintManager); VehicleRoutingAlgorithm vra = algBuilder.buildAlgorithm(); vra.setMaxIterations(20); Collection searchSolutions = vra.searchSolutions(); VehicleRoutingProblemSolution bestOf = Solutions.bestOf(searchSolutions); - + //ensure 2 routes assertEquals(2, bestOf.getRoutes().size()); - + //ensure no time information in first service of first route assertEquals(0, bestOf.getRoutes().iterator().next().getActivities().iterator().next().getArrTime(), 0.001); } diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_IT.java b/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_IT.java index 9422d38e..0cf200ea 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_IT.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_IT.java @@ -118,14 +118,14 @@ public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_IT { Vehicle bigVehicle = vehicleBuilder.build(); /* - * start building the problem + * start building the problem */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); vrpBuilder.setFleetSize(FleetSize.INFINITE); vrpBuilder.addVehicle(bigVehicle); /* - * create cost-matrix + * create cost-matrix */ VehicleRoutingTransportCostsMatrix.Builder matrixBuilder = VehicleRoutingTransportCostsMatrix.Builder.newInstance(true); /* diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_withTimeAndDistanceCosts_IT.java b/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_withTimeAndDistanceCosts_IT.java index a73cc2a4..7a30bb56 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_withTimeAndDistanceCosts_IT.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_withTimeAndDistanceCosts_IT.java @@ -118,14 +118,14 @@ public class RefuseCollectionWithCostsHigherThanTimesAndFiniteFleet_withTimeAndD Vehicle bigVehicle = vehicleBuilder.build(); /* - * start building the problem + * start building the problem */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); vrpBuilder.setFleetSize(FleetSize.INFINITE); vrpBuilder.addVehicle(bigVehicle); /* - * create cost-matrix + * create cost-matrix */ VehicleRoutingTransportCostsMatrix.Builder matrixBuilder = VehicleRoutingTransportCostsMatrix.Builder.newInstance(true); /* diff --git a/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollection_IT.java b/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollection_IT.java index bb98e637..56df4c93 100644 --- a/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollection_IT.java +++ b/jsprit-core/src/test/java/jsprit/core/algorithm/RefuseCollection_IT.java @@ -67,10 +67,10 @@ public class RefuseCollection_IT { vrpBuilder.addVehicle(bigVehicle); /* - * create cost-matrix + * create cost-matrix */ VehicleRoutingTransportCostsMatrix.Builder matrixBuilder = VehicleRoutingTransportCostsMatrix.Builder.newInstance(true); - /* + /* * read demand quantities */ readDemandQuantitiesAsServices(vrpBuilder); 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 f7db47ec..57f96113 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 @@ -44,7 +44,7 @@ public class TestMixedServiceAndShipmentsProblemOnRouteLevel { VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" + * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" */ Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle"); vehicleBuilder.setStartLocation(Location.newInstance(10, 10)); @@ -52,7 +52,7 @@ public class TestMixedServiceAndShipmentsProblemOnRouteLevel { VehicleImpl vehicle = vehicleBuilder.build(); /* - * build shipments at the required locations, each with a capacity-demand of 1. + * build shipments at the required locations, each with a capacity-demand of 1. * 4 shipments * 1: (5,7)->(6,9) * 2: (5,13)->(6,11) diff --git a/jsprit-core/src/test/resources/finiteVrpWithInitialSolutionForWriterTest.xml b/jsprit-core/src/test/resources/finiteVrpWithInitialSolutionForWriterTest.xml index 9c77fd3c..ef4c344b 100644 --- a/jsprit-core/src/test/resources/finiteVrpWithInitialSolutionForWriterTest.xml +++ b/jsprit-core/src/test/resources/finiteVrpWithInitialSolutionForWriterTest.xml @@ -1,256 +1,255 @@ - - FINITE - - - - v3 - vehType2 - - startLoc - - - - endLoc - - - - 0.0 - 1000.0 - - true - - - v2 - vehType2 - - depotLoc - - - - depotLoc - - - - 0.0 - 1000.0 - - false - - - v4 - vehType2 - - startLoc - - - - endLoc - - - - 0.0 - 1000.0 - - true - - - v5 - vehType3 - - startLoc - - - - endLoc - - - - 0.0 - 1000.0 - - true - - - v1 - vehType - - depotLoc2 - - - - depotLoc2 - - - - 0.0 - 1000.0 - - true - - - - - vehType - - 20 - - - 0.0 - 0.0 - - - - - vehType2 - - 200 - - - 0.0 - 0.0 - - - - - vehType3 - - 100 - 1000 - 10000 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 100000 - - - 0.0 - 0.0 - - - - - - - - j(1,5) - - - - 1 - - 10.0 - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com vrp_xml_schema.xsd"> + + FINITE + + + + v3 + vehType2 + + startLoc + + + + endLoc + + + 0.0 - 4000.0 - - - - - - i(3,9) - - - - 1 - - 0.0 - - + 1000.0 + + true + + + v2 + vehType2 + + depotLoc + + + + depotLoc + + + 0.0 - 4000.0 - - - - - - - - + 1000.0 + + false + + + v4 + vehType2 + + startLoc + + + + endLoc + + + + 0.0 + 1000.0 + + true + + + v5 + vehType3 + + startLoc + + + + endLoc + + + + 0.0 + 1000.0 + + true + + + v1 + vehType + + depotLoc2 + + + + depotLoc2 + + + + 0.0 + 1000.0 + + true + + + + + vehType + + 20 + + + 0.0 + 0.0 + + + + + vehType2 + + 200 + + + 0.0 + 0.0 + + + + + vehType3 + + 100 + 1000 + 10000 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 100000 + + + 0.0 + 0.0 + + + + + + + + j(1,5) + + + + 1 + + 10.0 + + + 0.0 + 4000.0 + + + + + i(3,9) - - 10.0 - + + + 1 + + 0.0 + - 1000.0 - 4000.0 + 0.0 + 4000.0 - - - - - i(9,9) - - - 100.0 - - - 6000.0 - 10000.0 - - - - - 10 - - - - - - [x=10.0][y=10.0] - - - 0.0 - - - 1000.0 - 4000.0 - - - - - - [x=10.0][y=0.0] - - - 100.0 - - - 6000.0 - 10000.0 - - - - - 10 - - - - - - noDriver - v1 - 10.0 - - 4 - 0.0 - 0.0 - - - 4 - 0.0 - 0.0 - - 0.0 - - + + + + + + + + i(3,9) + + + 10.0 + + + 1000.0 + 4000.0 + + + + + + i(9,9) + + + 100.0 + + + 6000.0 + 10000.0 + + + + + 10 + + + + + + [x=10.0][y=10.0] + + + 0.0 + + + 1000.0 + 4000.0 + + + + + + [x=10.0][y=0.0] + + + 100.0 + + + 6000.0 + 10000.0 + + + + + 10 + + + + + + noDriver + v1 + 10.0 + + 4 + 0.0 + 0.0 + + + 4 + 0.0 + 0.0 + + 0.0 + + diff --git a/jsprit-core/src/test/resources/infiniteWriterV2Test.xml b/jsprit-core/src/test/resources/infiniteWriterV2Test.xml index 617218e2..2d9058ab 100644 --- a/jsprit-core/src/test/resources/infiniteWriterV2Test.xml +++ b/jsprit-core/src/test/resources/infiniteWriterV2Test.xml @@ -1,91 +1,90 @@ - - INFINITE - - - - v1 - vehType - - loc - - - loc - - - 0.0 - 1.7976931348623157E308 - - true - - - - - vehType - - 20 - - - 0.0 - 1.0 - - - - - - - - loc - - - 1 - - 2.0 - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com vrp_xml_schema.xsd"> + + INFINITE + + + + v1 + vehType + + loc + + + loc + + 0.0 1.7976931348623157E308 - - - - - - loc2 - - - 1 - - 4.0 - - - 0.0 - 1.7976931348623157E308 - - - - - - - 10.0 - - - noDriver - v1 - 0.0 - - 1 - 0.0 - 0.0 - - 0.0 - - - - - - - + + true + + + + + vehType + + 20 + + + 0.0 + 1.0 + + + + + + + + loc + + + 1 + + 2.0 + + + 0.0 + 1.7976931348623157E308 + + + + + + loc2 + + + 1 + + 4.0 + + + 0.0 + 1.7976931348623157E308 + + + + + + + 10.0 + + + noDriver + v1 + 0.0 + + 1 + 0.0 + 0.0 + + 0.0 + + + + + + + diff --git a/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java b/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java index 3851e897..92bd6b0c 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java +++ b/jsprit-examples/src/main/java/jsprit/examples/BicycleMessenger.java @@ -382,8 +382,8 @@ public class BicycleMessenger { String line; boolean firstLine = true; VehicleType messengerType = VehicleTypeImpl.Builder.newInstance("messengerType").addCapacityDimension(0, 15).setCostPerDistance(1).build(); - /* - * the algo requires some time and space to search for a valid solution. if you ommit a penalty-type, it probably throws an Exception once it cannot insert an envelope anymore + /* + * the algo requires some time and space to search for a valid solution. if you ommit a penalty-type, it probably throws an Exception once it cannot insert an envelope anymore * thus, give it space by defining a penalty/shadow vehicle with higher variable and fixed costs to up the pressure to find solutions without penalty type * * it is important to give it the same typeId as the type you want to shadow diff --git a/jsprit-examples/src/main/java/jsprit/examples/ConfigureAlgorithmInCodeInsteadOfPerXml.java b/jsprit-examples/src/main/java/jsprit/examples/ConfigureAlgorithmInCodeInsteadOfPerXml.java index 36f640e2..9fa6567a 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/ConfigureAlgorithmInCodeInsteadOfPerXml.java +++ b/jsprit-examples/src/main/java/jsprit/examples/ConfigureAlgorithmInCodeInsteadOfPerXml.java @@ -46,13 +46,13 @@ public class ConfigureAlgorithmInCodeInsteadOfPerXml { Examples.createOutputFolder(); /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 */ VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 2); VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" + * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" */ Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle"); vehicleBuilder.setStartLocation(Location.newInstance(10, 10)); diff --git a/jsprit-examples/src/main/java/jsprit/examples/CostMatrixExample.java b/jsprit-examples/src/main/java/jsprit/examples/CostMatrixExample.java index 7326ca13..a43cfdeb 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/CostMatrixExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/CostMatrixExample.java @@ -59,7 +59,7 @@ public class CostMatrixExample { /* - * Assume the following symmetric distance-matrix + * Assume the following symmetric distance-matrix * from,to,distance * 0,1,10.0 * 0,2,20.0 diff --git a/jsprit-examples/src/main/java/jsprit/examples/EnRoutePickupAndDeliveryWithMultipleDepotsAndOpenRoutesExample.java b/jsprit-examples/src/main/java/jsprit/examples/EnRoutePickupAndDeliveryWithMultipleDepotsAndOpenRoutesExample.java index 68de4a37..9639a4b4 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/EnRoutePickupAndDeliveryWithMultipleDepotsAndOpenRoutesExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/EnRoutePickupAndDeliveryWithMultipleDepotsAndOpenRoutesExample.java @@ -49,14 +49,14 @@ public class EnRoutePickupAndDeliveryWithMultipleDepotsAndOpenRoutesExample { Examples.createOutputFolder(); /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 */ VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 2); vehicleTypeBuilder.setCostPerDistance(1.0); VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * define two vehicles and their start-locations + * define two vehicles and their start-locations * * the first two do need to return to depot */ diff --git a/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotExample.java b/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotExample.java index e322cb66..7376c4b8 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotExample.java @@ -48,8 +48,8 @@ public class MultipleDepotExample { Examples.createOutputFolder(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); - /* - * Read cordeau-instance p01, BUT only its services without any vehicles + /* + * Read cordeau-instance p01, BUT only its services without any vehicles */ new VrpXMLReader(vrpBuilder).read("input/vrp_cordeau_01.xml"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotExample2.java b/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotExample2.java index c50c05ed..582fe188 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotExample2.java +++ b/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotExample2.java @@ -50,8 +50,8 @@ public class MultipleDepotExample2 { Examples.createOutputFolder(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); - /* - * Read cordeau-instance p01, BUT only its services without any vehicles + /* + * Read cordeau-instance p01, BUT only its services without any vehicles */ new CordeauReader(vrpBuilder).read("input/p08"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotWithInitialRoutesExample.java b/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotWithInitialRoutesExample.java index e0c019b7..1e1a0317 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotWithInitialRoutesExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/MultipleDepotWithInitialRoutesExample.java @@ -45,8 +45,8 @@ public class MultipleDepotWithInitialRoutesExample { Examples.createOutputFolder(); VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); - /* - * Read cordeau-instance p01 + /* + * Read cordeau-instance p01 */ new VrpXMLReader(vrpBuilder).read("input/cordeau01.xml"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryExample.java b/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryExample.java index 1220c2da..16c5740d 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryExample.java @@ -43,14 +43,14 @@ public class PickupAndDeliveryExample { Examples.createOutputFolder(); /* - * Build the problem. + * Build the problem. * * But define a problem-builder first. */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); /* - * A solomonReader reads solomon-instance files, and stores the required information in the builder. + * A solomonReader reads solomon-instance files, and stores the required information in the builder. */ new VrpXMLReader(vrpBuilder).read("input/pickups_and_deliveries_solomon_r101_withoutTWs.xml"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryExample2.java b/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryExample2.java index 491f18ec..70535a99 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryExample2.java +++ b/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryExample2.java @@ -49,12 +49,12 @@ public class PickupAndDeliveryExample2 { VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); /* - * A solomonReader reads solomon-instance files, and stores the required information in the builder. + * A solomonReader reads solomon-instance files, and stores the required information in the builder. */ new VrpXMLReader(vrpBuilder).read("input/pd_christophides_vrpnc1_vcap50.xml"); /* - * Finally, the problem can be built. By default, transportCosts are crowFlyDistances (as usually used for vrp-instances). + * Finally, the problem can be built. By default, transportCosts are crowFlyDistances (as usually used for vrp-instances). */ VehicleRoutingProblem vrp = vrpBuilder.build(); diff --git a/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryOpenExample.java b/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryOpenExample.java index e0025961..6b166743 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryOpenExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/PickupAndDeliveryOpenExample.java @@ -41,14 +41,14 @@ public class PickupAndDeliveryOpenExample { Examples.createOutputFolder(); /* - * Build the problem. + * Build the problem. * * But define a problem-builder first. */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); /* - * A solomonReader reads solomon-instance files, and stores the required information in the builder. + * A solomonReader reads solomon-instance files, and stores the required information in the builder. */ new VrpXMLReader(vrpBuilder).read("input/pickups_and_deliveries_solomon_r101_withoutTWs_open.xml"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/RefuseCollectionExample.java b/jsprit-examples/src/main/java/jsprit/examples/RefuseCollectionExample.java index deb74799..71357b8d 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/RefuseCollectionExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/RefuseCollectionExample.java @@ -55,7 +55,7 @@ public class RefuseCollectionExample { Examples.createOutputFolder(); /* - * create vehicle-type and vehicle + * create vehicle-type and vehicle */ VehicleTypeImpl.Builder typeBuilder = VehicleTypeImpl.Builder.newInstance("vehicle-type").addCapacityDimension(0, 23); typeBuilder.setCostPerDistance(1.0); @@ -67,7 +67,7 @@ public class RefuseCollectionExample { VehicleImpl bigVehicle = vehicleBuilder.build(); /* - * start building the problem + * start building the problem */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); vrpBuilder.setFleetSize(FleetSize.INFINITE); diff --git a/jsprit-examples/src/main/java/jsprit/examples/RefuseCollectionWithFastMatrixExample.java b/jsprit-examples/src/main/java/jsprit/examples/RefuseCollectionWithFastMatrixExample.java index ee8ca180..e770f424 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/RefuseCollectionWithFastMatrixExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/RefuseCollectionWithFastMatrixExample.java @@ -54,7 +54,7 @@ public class RefuseCollectionWithFastMatrixExample { Examples.createOutputFolder(); /* - * create vehicle-type and vehicle + * create vehicle-type and vehicle */ VehicleTypeImpl.Builder typeBuilder = VehicleTypeImpl.Builder.newInstance("vehicle-type").addCapacityDimension(0, 23); typeBuilder.setCostPerDistance(1.0); @@ -66,7 +66,7 @@ public class RefuseCollectionWithFastMatrixExample { VehicleImpl bigVehicle = vehicleBuilder.build(); /* - * start building the problem + * start building the problem */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); vrpBuilder.setFleetSize(FleetSize.INFINITE); diff --git a/jsprit-examples/src/main/java/jsprit/examples/ServicePickupsWithMultipleDepotsExample.java b/jsprit-examples/src/main/java/jsprit/examples/ServicePickupsWithMultipleDepotsExample.java index f437e145..924024c9 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/ServicePickupsWithMultipleDepotsExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/ServicePickupsWithMultipleDepotsExample.java @@ -47,14 +47,14 @@ public class ServicePickupsWithMultipleDepotsExample { Examples.createOutputFolder(); /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 */ VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 8); vehicleTypeBuilder.setCostPerDistance(1.0); VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * define two depots, i.e. two vehicle locations ([10,10],[50,50]) and equip them with an infinite number of vehicles of type 'vehicleType' + * define two depots, i.e. two vehicle locations ([10,10],[50,50]) and equip them with an infinite number of vehicles of type 'vehicleType' */ Builder vehicleBuilder1 = VehicleImpl.Builder.newInstance("vehicles@[10,10]"); vehicleBuilder1.setStartLocation(Location.newInstance(10, 10)); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SimpleDepotBoundedPickupAndDeliveryExample.java b/jsprit-examples/src/main/java/jsprit/examples/SimpleDepotBoundedPickupAndDeliveryExample.java index ecbb84f3..70650203 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SimpleDepotBoundedPickupAndDeliveryExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SimpleDepotBoundedPickupAndDeliveryExample.java @@ -46,13 +46,13 @@ public class SimpleDepotBoundedPickupAndDeliveryExample { Examples.createOutputFolder(); /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 */ VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 2); VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" + * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" */ Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle"); vehicleBuilder.setStartLocation(Location.newInstance(10, 10)); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryExample.java b/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryExample.java index d9fc3828..ad9878d5 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryExample.java @@ -47,13 +47,13 @@ public class SimpleEnRoutePickupAndDeliveryExample { Examples.createOutputFolder(); /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 */ VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 2); VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" + * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" */ Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle"); vehicleBuilder.setStartLocation(loc(Coordinate.newInstance(10, 10))); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryOpenRoutesExample.java b/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryOpenRoutesExample.java index 0ea5f25e..c622c0c7 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryOpenRoutesExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryOpenRoutesExample.java @@ -46,13 +46,13 @@ public class SimpleEnRoutePickupAndDeliveryOpenRoutesExample { Examples.createOutputFolder(); /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 */ VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 2); VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" + * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" */ Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle"); vehicleBuilder.setStartLocation(loc(Coordinate.newInstance(10, 10))); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryWithDepotBoundedDeliveriesExample.java b/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryWithDepotBoundedDeliveriesExample.java index 31d099ed..b6594b77 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryWithDepotBoundedDeliveriesExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SimpleEnRoutePickupAndDeliveryWithDepotBoundedDeliveriesExample.java @@ -49,13 +49,13 @@ public class SimpleEnRoutePickupAndDeliveryWithDepotBoundedDeliveriesExample { Examples.createOutputFolder(); /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 */ VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 2); VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" + * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" */ Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle"); vehicleBuilder.setStartLocation(loc(Coordinate.newInstance(10, 10))); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SimpleExample.java b/jsprit-examples/src/main/java/jsprit/examples/SimpleExample.java index d8011bae..22be08b1 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SimpleExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SimpleExample.java @@ -52,14 +52,14 @@ public class SimpleExample { } /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and one capacity dimension, i.e. weight, and capacity dimension value of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and one capacity dimension, i.e. weight, and capacity dimension value of 2 */ final int WEIGHT_INDEX = 0; VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(WEIGHT_INDEX, 2); VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" + * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" */ Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle"); vehicleBuilder.setStartLocation(Location.newInstance(10, 10)); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SimpleExampleOpenRoutes.java b/jsprit-examples/src/main/java/jsprit/examples/SimpleExampleOpenRoutes.java index b1d4434e..8dc221da 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SimpleExampleOpenRoutes.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SimpleExampleOpenRoutes.java @@ -44,14 +44,14 @@ public class SimpleExampleOpenRoutes { Examples.createOutputFolder(); /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 */ VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 2); vehicleTypeBuilder.setFixedCost(100); VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" + * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" */ Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle"); vehicleBuilder.setStartLocation(Location.newInstance(10, 10)); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SimpleExampleWithSkills.java b/jsprit-examples/src/main/java/jsprit/examples/SimpleExampleWithSkills.java index 063006eb..d20f543f 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SimpleExampleWithSkills.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SimpleExampleWithSkills.java @@ -54,14 +54,14 @@ public class SimpleExampleWithSkills { } /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and one capacity dimension, i.e. weight, and capacity dimension value of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and one capacity dimension, i.e. weight, and capacity dimension value of 2 */ final int WEIGHT_INDEX = 0; VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(WEIGHT_INDEX, 2); VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" + * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" */ Builder vehicleBuilder = Builder.newInstance("vehicle"); vehicleBuilder.setStartLocation(Location.newInstance(10, 10)); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SimpleVRPWithBackhaulsExample.java b/jsprit-examples/src/main/java/jsprit/examples/SimpleVRPWithBackhaulsExample.java index c9b9da01..fe50d249 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SimpleVRPWithBackhaulsExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SimpleVRPWithBackhaulsExample.java @@ -49,13 +49,13 @@ public class SimpleVRPWithBackhaulsExample { Examples.createOutputFolder(); /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 */ VehicleTypeImpl.Builder vehicleTypeBuilder = VehicleTypeImpl.Builder.newInstance("vehicleType").addCapacityDimension(0, 2); VehicleType vehicleType = vehicleTypeBuilder.build(); /* - * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" + * get a vehicle-builder and build a vehicle located at (10,10) with type "vehicleType" */ Builder vehicleBuilder = VehicleImpl.Builder.newInstance("vehicle"); vehicleBuilder.setStartLocation(Location.newInstance(10, 10)); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SolomonExample.java b/jsprit-examples/src/main/java/jsprit/examples/SolomonExample.java index 95a82267..088ab813 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SolomonExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SolomonExample.java @@ -40,14 +40,14 @@ public class SolomonExample { Examples.createOutputFolder(); /* - * Build the problem. + * Build the problem. * * But define a problem-builder first. */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); /* - * A solomonReader reads solomon-instance files, and stores the required information in the builder. + * A solomonReader reads solomon-instance files, and stores the required information in the builder. */ new SolomonReader(vrpBuilder).read("input/C101_solomon.txt"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SolomonExampleWithSpecifiedVehicleEndLocations.java b/jsprit-examples/src/main/java/jsprit/examples/SolomonExampleWithSpecifiedVehicleEndLocations.java index a5f903c4..a08355b4 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SolomonExampleWithSpecifiedVehicleEndLocations.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SolomonExampleWithSpecifiedVehicleEndLocations.java @@ -47,14 +47,14 @@ public class SolomonExampleWithSpecifiedVehicleEndLocations { } /* - * Build the problem. + * Build the problem. * * But define a problem-builder first. */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); /* - * A solomonReader reads solomon-instance files, and stores the required information in the builder. + * A solomonReader reads solomon-instance files, and stores the required information in the builder. */ new VrpXMLReader(vrpBuilder).read("input/deliveries_solomon_specifiedVehicleEndLocations_c101.xml"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SolomonExampleWithSpecifiedVehicleEndLocationsWithoutTWs.java b/jsprit-examples/src/main/java/jsprit/examples/SolomonExampleWithSpecifiedVehicleEndLocationsWithoutTWs.java index b3db9d3d..9217fadf 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SolomonExampleWithSpecifiedVehicleEndLocationsWithoutTWs.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SolomonExampleWithSpecifiedVehicleEndLocationsWithoutTWs.java @@ -46,14 +46,14 @@ public class SolomonExampleWithSpecifiedVehicleEndLocationsWithoutTWs { } /* - * Build the problem. + * Build the problem. * * But define a problem-builder first. */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); /* - * A solomonReader reads solomon-instance files, and stores the required information in the builder. + * A solomonReader reads solomon-instance files, and stores the required information in the builder. */ new VrpXMLReader(vrpBuilder).read("input/pickups_and_deliveries_solomon_c101_withoutTWs_and_specifiedVehicleEndLocations.xml"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SolomonOpenExample.java b/jsprit-examples/src/main/java/jsprit/examples/SolomonOpenExample.java index af0d2415..564e124d 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SolomonOpenExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SolomonOpenExample.java @@ -40,14 +40,14 @@ public class SolomonOpenExample { Examples.createOutputFolder(); /* - * Build the problem. + * Build the problem. * * But define a problem-builder first. */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); /* - * A solomonReader reads solomon-instance files, and stores the required information in the builder. + * A solomonReader reads solomon-instance files, and stores the required information in the builder. */ new VrpXMLReader(vrpBuilder).read("input/deliveries_solomon_open_c101.xml"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SolomonR101Example.java b/jsprit-examples/src/main/java/jsprit/examples/SolomonR101Example.java index 2e3589f6..070ab8e8 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SolomonR101Example.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SolomonR101Example.java @@ -39,14 +39,14 @@ public class SolomonR101Example { Examples.createOutputFolder(); /* - * Build the problem. + * Build the problem. * * But define a problem-builder first. */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); /* - * A solomonReader reads solomon-instance files, and stores the required information in the builder. + * A solomonReader reads solomon-instance files, and stores the required information in the builder. */ // new SolomonReader(vrpBuilder).read("/Users/schroeder/IdeaProjects/jsprit/jsprit-instances/instances/solomon/R211.txt"); new VrpXMLReader(vrpBuilder).read("output/R211.xml"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/SolomonWithRegretInsertionExample.java b/jsprit-examples/src/main/java/jsprit/examples/SolomonWithRegretInsertionExample.java index b3b5f9a9..1a843c1c 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/SolomonWithRegretInsertionExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/SolomonWithRegretInsertionExample.java @@ -42,14 +42,14 @@ public class SolomonWithRegretInsertionExample { Examples.createOutputFolder(); /* - * Build the problem. + * Build the problem. * * But define a problem-builder first. */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); /* - * A solomonReader reads solomon-instance files, and stores the required information in the builder. + * A solomonReader reads solomon-instance files, and stores the required information in the builder. */ new SolomonReader(vrpBuilder).read("input/C101_solomon.txt"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java b/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java index c4a76a12..be416e75 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java +++ b/jsprit-examples/src/main/java/jsprit/examples/TransportOfDisabledPeople.java @@ -55,7 +55,7 @@ public class TransportOfDisabledPeople { Examples.createOutputFolder(); /* - * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 + * get a vehicle type-builder and build a type with the typeId "vehicleType" and a capacity of 2 */ VehicleTypeImpl.Builder wheelChairTypeBuilder = VehicleTypeImpl.Builder.newInstance("wheelChairBusType") .addCapacityDimension(WHEELCHAIRSPACE_INDEX, 2) //can transport two people with wheelchair @@ -67,7 +67,7 @@ public class TransportOfDisabledPeople { VehicleType vehicleType_solelypassenger = soleyPassengerTypeBuilder.build(); /* - * define two vehicles and their locations. + * define two vehicles and their locations. * * this example employs two vehicles. one that has to return to its start-location (vehicle1) and one that has a different * end-location. diff --git a/jsprit-examples/src/main/java/jsprit/examples/VRPWithBackhaulsExample.java b/jsprit-examples/src/main/java/jsprit/examples/VRPWithBackhaulsExample.java index 98205a14..990211e7 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/VRPWithBackhaulsExample.java +++ b/jsprit-examples/src/main/java/jsprit/examples/VRPWithBackhaulsExample.java @@ -43,14 +43,14 @@ public class VRPWithBackhaulsExample { Examples.createOutputFolder(); /* - * Build the problem. + * Build the problem. * * But define a problem-builder first. */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); /* - * A solomonReader reads solomon-instance files, and stores the required information in the builder. + * A solomonReader reads solomon-instance files, and stores the required information in the builder. */ new VrpXMLReader(vrpBuilder).read("input/pickups_and_deliveries_solomon_r101.xml"); diff --git a/jsprit-examples/src/main/java/jsprit/examples/VRPWithBackhaulsExample2.java b/jsprit-examples/src/main/java/jsprit/examples/VRPWithBackhaulsExample2.java index 11313b8d..629e03dc 100644 --- a/jsprit-examples/src/main/java/jsprit/examples/VRPWithBackhaulsExample2.java +++ b/jsprit-examples/src/main/java/jsprit/examples/VRPWithBackhaulsExample2.java @@ -48,14 +48,14 @@ public class VRPWithBackhaulsExample2 { Examples.createOutputFolder(); /* - * Build the problem. + * Build the problem. * * But define a problem-builder first. */ VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance(); /* - * A solomonReader reads solomon-instance files, and stores the required information in the builder. + * A solomonReader reads solomon-instance files, and stores the required information in the builder. */ new VrpXMLReader(vrpBuilder).read("input/pd_christophides_vrpnc1_vcap50.xml");