mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
migrated from log4j1x to log4j2
This commit is contained in:
parent
8ebae73847
commit
11300b90d3
13 changed files with 93 additions and 134 deletions
|
|
@ -16,17 +16,16 @@
|
|||
******************************************************************************/
|
||||
package jsprit.analysis.toolbox;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.listener.AlgorithmEndsListener;
|
||||
import jsprit.core.algorithm.listener.AlgorithmStartsListener;
|
||||
import jsprit.core.algorithm.listener.IterationEndsListener;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -40,7 +39,7 @@ import org.apache.log4j.Logger;
|
|||
|
||||
public class AlgorithmSearchProgressChartListener implements IterationEndsListener, AlgorithmEndsListener, AlgorithmStartsListener {
|
||||
|
||||
private static Logger log = Logger.getLogger(AlgorithmSearchProgressChartListener.class);
|
||||
private static Logger log = LogManager.getLogger(AlgorithmSearchProgressChartListener.class);
|
||||
|
||||
private String filename;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,24 +18,18 @@
|
|||
******************************************************************************/
|
||||
package jsprit.analysis.toolbox;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithmFactory;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.util.BenchmarkInstance;
|
||||
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
public class ComputationalLaboratory {
|
||||
|
||||
|
|
@ -267,7 +261,7 @@ public class ComputationalLaboratory {
|
|||
private int threads = Runtime.getRuntime().availableProcessors()+1;
|
||||
|
||||
public ComputationalLaboratory() {
|
||||
Logger.getRootLogger().setLevel(Level.ERROR);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -306,9 +300,8 @@ public class ComputationalLaboratory {
|
|||
|
||||
/**
|
||||
* Adds instance.
|
||||
*
|
||||
* @param name
|
||||
* @param problem
|
||||
*
|
||||
* @param instance the instance to be added
|
||||
* @throws IllegalStateException if there is already an instance with the same name.
|
||||
*/
|
||||
public void addInstance(BenchmarkInstance instance){
|
||||
|
|
@ -319,9 +312,8 @@ public class ComputationalLaboratory {
|
|||
|
||||
/**
|
||||
* Adds collection of instances.
|
||||
*
|
||||
* @param name
|
||||
* @param problem
|
||||
*
|
||||
* @param instances collection of instances to be added
|
||||
* @throws IllegalStateException if there is already an instance with the same name.
|
||||
*/
|
||||
public void addAllInstances(Collection<BenchmarkInstance> instances){
|
||||
|
|
|
|||
|
|
@ -16,15 +16,6 @@
|
|||
******************************************************************************/
|
||||
package jsprit.analysis.toolbox;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import jsprit.analysis.util.BenchmarkWriter;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithmFactory;
|
||||
|
|
@ -35,10 +26,12 @@ import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
|||
import jsprit.core.util.BenchmarkInstance;
|
||||
import jsprit.core.util.BenchmarkResult;
|
||||
import jsprit.core.util.Solutions;
|
||||
|
||||
import org.apache.commons.math.stat.descriptive.DescriptiveStatistics;
|
||||
import org.apache.log4j.Level;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.*;
|
||||
|
||||
|
||||
public class ConcurrentBenchmarker {
|
||||
|
|
@ -75,7 +68,7 @@ public class ConcurrentBenchmarker {
|
|||
public ConcurrentBenchmarker(String algorithmConfig) {
|
||||
super();
|
||||
this.algorithmConfig = algorithmConfig;
|
||||
Logger.getRootLogger().setLevel(Level.ERROR);
|
||||
// LogManager.getRootLogger().setLevel(Level.ERROR);
|
||||
}
|
||||
|
||||
public ConcurrentBenchmarker(VehicleRoutingAlgorithmFactory algorithmFactory){
|
||||
|
|
|
|||
|
|
@ -16,38 +16,17 @@
|
|||
******************************************************************************/
|
||||
package jsprit.analysis.toolbox;
|
||||
|
||||
import java.awt.BasicStroke;
|
||||
import java.awt.Color;
|
||||
import java.awt.Paint;
|
||||
import java.awt.Shape;
|
||||
import java.awt.geom.Ellipse2D;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.job.Delivery;
|
||||
import jsprit.core.problem.job.Job;
|
||||
import jsprit.core.problem.job.Pickup;
|
||||
import jsprit.core.problem.job.Service;
|
||||
import jsprit.core.problem.job.Shipment;
|
||||
import jsprit.core.problem.job.*;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import jsprit.core.problem.solution.route.VehicleRoute;
|
||||
import jsprit.core.problem.solution.route.activity.TourActivity;
|
||||
import jsprit.core.problem.vehicle.Vehicle;
|
||||
import jsprit.core.util.Coordinate;
|
||||
import jsprit.core.util.Locations;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.jfree.chart.ChartUtilities;
|
||||
import org.jfree.chart.JFreeChart;
|
||||
import org.jfree.chart.LegendItem;
|
||||
import org.jfree.chart.LegendItemCollection;
|
||||
import org.jfree.chart.LegendItemSource;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.jfree.chart.*;
|
||||
import org.jfree.chart.axis.NumberAxis;
|
||||
import org.jfree.chart.labels.XYItemLabelGenerator;
|
||||
import org.jfree.chart.plot.XYPlot;
|
||||
|
|
@ -62,6 +41,12 @@ import org.jfree.data.xy.XYSeriesCollection;
|
|||
import org.jfree.ui.RectangleEdge;
|
||||
import org.jfree.util.ShapeUtilities;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.geom.Ellipse2D;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
|
||||
/**
|
||||
* Visualizes problem and solution.
|
||||
|
|
@ -154,7 +139,7 @@ public class Plotter {
|
|||
}
|
||||
|
||||
|
||||
private static Logger log = Logger.getLogger(Plotter.class);
|
||||
private static Logger log = LogManager.getLogger(Plotter.class);
|
||||
|
||||
/**
|
||||
* Label to label ID (=jobId), SIZE (=jobSize=jobCapacityDimensions)
|
||||
|
|
|
|||
|
|
@ -16,20 +16,20 @@
|
|||
******************************************************************************/
|
||||
package jsprit.analysis.toolbox;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import jsprit.core.algorithm.VehicleRoutingAlgorithm;
|
||||
import jsprit.core.algorithm.listener.AlgorithmEndsListener;
|
||||
import jsprit.core.algorithm.listener.AlgorithmStartsListener;
|
||||
import jsprit.core.problem.VehicleRoutingProblem;
|
||||
import jsprit.core.problem.solution.VehicleRoutingProblemSolution;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import java.util.Collection;
|
||||
|
||||
|
||||
public class StopWatch implements AlgorithmStartsListener, AlgorithmEndsListener{
|
||||
|
||||
private static Logger log = Logger.getLogger(StopWatch.class);
|
||||
private static Logger log = LogManager.getLogger(StopWatch.class);
|
||||
|
||||
private double ran;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue