From 463d87b30bf9ee279ce924d17023f551ac64acd7 Mon Sep 17 00:00:00 2001
From: Stefan Schroeder <4sschroeder@gmail.com>
Date: Tue, 12 Nov 2013 16:28:36 +0100
Subject: [PATCH] clean redundant files
---
.../algorithms/BestInsertionConcurrent.java | 198 ------------------
1 file changed, 198 deletions(-)
delete mode 100644 jsprit-core/src/main/java/algorithms/BestInsertionConcurrent.java
diff --git a/jsprit-core/src/main/java/algorithms/BestInsertionConcurrent.java b/jsprit-core/src/main/java/algorithms/BestInsertionConcurrent.java
deleted file mode 100644
index 6f343d63..00000000
--- a/jsprit-core/src/main/java/algorithms/BestInsertionConcurrent.java
+++ /dev/null
@@ -1,198 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2013 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 .
- ******************************************************************************/
-package algorithms;
-
-
-//
-//
-///**
-// *
-// * @author stefan schroeder
-// *
-// */
-//
-//final class BestInsertionConcurrent implements InsertionStrategy{
-//
-// public static BestInsertionConcurrent newInstance(RouteAlgorithm routeAlgorithm, ExecutorService executor, int nuOfThreads){
-// return new BestInsertionConcurrent(routeAlgorithm, executor, nuOfThreads);
-// }
-//
-// static class Batch {
-// List routes = new ArrayList();
-//
-// }
-//
-// private static Logger logger = Logger.getLogger(BestInsertionConcurrent.class);
-//
-// private Random random = RandomNumberGeneration.getRandom();
-//
-// private RouteAlgorithm routeAlgorithm;
-//
-//// private ExecutorService executor;
-//
-// private int nuOfBatches;
-//
-// private ExecutorCompletionService completionService;
-//
-// public void setRandom(Random random) {
-// this.random = random;
-// }
-//
-// private BestInsertionConcurrent(RouteAlgorithm routeAlgorithm, ExecutorService executor, int nuOfThreads) {
-// super();
-// this.routeAlgorithm = routeAlgorithm;
-//// this.executor = executor;
-// logger.info("initialise " + this);
-// this.nuOfBatches = nuOfThreads;
-// completionService = new ExecutorCompletionService(executor);
-// }
-//
-// @Override
-// public String toString() {
-// return "[name=concurrentBestInsertion]";
-// }
-//
-// @Override
-// public void insertJobs(Collection vehicleRoutes, Collection unassignedJobs) {
-// List unassignedJobList = new ArrayList(unassignedJobs);
-// Collections.shuffle(unassignedJobList, random);
-//// informInsertionStarts(vehicleRoutes,unassignedJobs.size());
-// int inserted = 0;
-// for(final Job unassignedJob : unassignedJobList){
-// VehicleRoute insertIn = null;
-// Insertion bestInsertion = null;
-// double bestInsertionCost = Double.MAX_VALUE;
-//
-// List batches = distributeRoutes(vehicleRoutes,nuOfBatches);
-//
-// for(final Batch batch : batches){
-// completionService.submit(new Callable() {
-//
-// @Override
-// public Insertion call() throws Exception {
-// return getBestInsertion(batch,unassignedJob);
-// }
-//
-// });
-//
-// }
-//
-// try{
-// for(int i=0;i futureIData = completionService.take();
-// Insertion insertion = futureIData.get();
-// if(insertion == null) continue;
-// if(insertion.getInsertionData().getInsertionCost() < bestInsertionCost){
-// bestInsertion = insertion;
-// bestInsertionCost = insertion.getInsertionData().getInsertionCost();
-// }
-// }
-// }
-// catch(InterruptedException e){
-// Thread.currentThread().interrupt();
-// }
-// catch (ExecutionException e) {
-// e.printStackTrace();
-// logger.error(e.getCause().toString());
-// System.exit(1);
-// }
-//
-// if(bestInsertion != null){
-//// informBeforeJobInsertion(unassignedJob, bestInsertion.getInsertionData(), bestInsertion.getRoute());
-// insertIn = bestInsertion.getRoute();
-//// logger.debug("insert job="+unassignedJob+" at index=" + bestInsertion.getInsertionData().getInsertionIndex() + " delta cost=" + bestInsertion.getInsertionData().getInsertionCost());
-// routeAlgorithm.insertJob(unassignedJob, bestInsertion.getInsertionData(), bestInsertion.getRoute());
-// }
-// else {
-//// VehicleRoute newRoute = VehicleRoute.emptyRoute();
-//// InsertionData bestI = routeAlgorithm.calculateBestInsertion(newRoute, unassignedJob, Double.MAX_VALUE);
-//// if(bestI instanceof InsertionData.NoInsertionFound)
-// throw new IllegalStateException("given the vehicles, could not create a valid solution.\n\tthe reason might be" +
-// " inappropriate vehicle capacity.\n\tthe job that does not fit in any vehicle anymore is \n\t" + unassignedJob);
-//// insertIn = newRoute;
-//// informBeforeJobInsertion(unassignedJob,bestI,newRoute);
-//// routeAlgorithm.insertJob(unassignedJob,bestI,newRoute);
-//// vehicleRoutes.add(newRoute);
-// }
-// inserted++;
-//// informJobInserted((unassignedJobList.size()-inserted), unassignedJob, insertIn);
-// }
-//// informInsertionEndsListeners(vehicleRoutes);
-// }
-//
-// private Insertion getBestInsertion(Batch batch, Job unassignedJob) {
-// Insertion bestInsertion = null;
-// double bestInsertionCost = Double.MAX_VALUE;
-// for(VehicleRoute vehicleRoute : batch.routes){
-// InsertionData iData = routeAlgorithm.calculateBestInsertion(vehicleRoute, unassignedJob, bestInsertionCost);
-// if(iData instanceof NoInsertionFound) continue;
-// if(iData.getInsertionCost() < bestInsertionCost){
-// bestInsertion = new Insertion(vehicleRoute,iData);
-// bestInsertionCost = iData.getInsertionCost();
-// }
-// }
-// return bestInsertion;
-// }
-//
-// private List distributeRoutes(Collection vehicleRoutes, int nuOfBatches) {
-// List batches = new ArrayList();
-// for(int i=0;i getListeners() {
-// // TODO Auto-generated method stub
-// return null;
-// }
-//
-// @Override
-// public void addListener(InsertionListener insertionListener) {
-// // TODO Auto-generated method stub
-//
-// }
-//
-//}