1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

Merge remote-tracking branch 'origin/master'

This commit is contained in:
oblonski 2014-08-07 21:00:35 +02:00
commit ae83eadad7
2 changed files with 11 additions and 0 deletions

View file

@ -1,5 +1,7 @@
jsprit jsprit
====== ======
[![Build Status](https://travis-ci.org/jsprit/jsprit.svg?branch=master)](https://travis-ci.org/jsprit/jsprit)
jsprit is a java based, open source toolkit for solving rich <a href="http://en.wikipedia.org/wiki/Travelling_salesman_problem" target="_blank">traveling salesman</a> (TSP) and <a href="http://neo.lcc.uma.es/vrp/vehicle-routing-problem/" target="_blank">vehicle routing problems</a> (VRP). jsprit is a java based, open source toolkit for solving rich <a href="http://en.wikipedia.org/wiki/Travelling_salesman_problem" target="_blank">traveling salesman</a> (TSP) and <a href="http://neo.lcc.uma.es/vrp/vehicle-routing-problem/" target="_blank">vehicle routing problems</a> (VRP).
It is lightweight, flexible and easy-to-use, and based on a single all-purpose <a href="https://github.com/jsprit/jsprit/wiki/Meta-Heuristic" target="_blank">meta-heuristic</a> currently solving It is lightweight, flexible and easy-to-use, and based on a single all-purpose <a href="https://github.com/jsprit/jsprit/wiki/Meta-Heuristic" target="_blank">meta-heuristic</a> currently solving
- Capacitated VRP - Capacitated VRP

View file

@ -368,6 +368,9 @@ public class VehicleRoutingAlgorithms {
public static VehicleRoutingAlgorithm createAlgorithm(final VehicleRoutingProblem vrp, final AlgorithmConfig algorithmConfig){ public static VehicleRoutingAlgorithm createAlgorithm(final VehicleRoutingProblem vrp, final AlgorithmConfig algorithmConfig){
return createAlgo(vrp,algorithmConfig.getXMLConfiguration(),0, null); return createAlgo(vrp,algorithmConfig.getXMLConfiguration(),0, null);
} }
public static VehicleRoutingAlgorithm createAlgorithm(final VehicleRoutingProblem vrp, int nThreads, final AlgorithmConfig algorithmConfig){
return createAlgo(vrp,algorithmConfig.getXMLConfiguration(),nThreads, null);
}
/** /**
* Read and creates a {@link VehicleRoutingAlgorithm} from an url. * Read and creates a {@link VehicleRoutingAlgorithm} from an url.
@ -382,6 +385,12 @@ public class VehicleRoutingAlgorithms {
xmlReader.read(configURL); xmlReader.read(configURL);
return createAlgo(vrp,algorithmConfig.getXMLConfiguration(),0, null); return createAlgo(vrp,algorithmConfig.getXMLConfiguration(),0, null);
} }
public static VehicleRoutingAlgorithm readAndCreateAlgorithm(final VehicleRoutingProblem vrp, int nThreads, final URL configURL){
AlgorithmConfig algorithmConfig = new AlgorithmConfig();
AlgorithmConfigXmlReader xmlReader = new AlgorithmConfigXmlReader(algorithmConfig);
xmlReader.read(configURL);
return createAlgo(vrp,algorithmConfig.getXMLConfiguration(),nThreads, null);
}
/** /**
* Read and creates {@link jsprit.core.problem.VehicleRoutingProblem} from config-file. * Read and creates {@link jsprit.core.problem.VehicleRoutingProblem} from config-file.