mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Merge pull request #350 from jsroyal/master
Fixed some link and typo of markdown language
This commit is contained in:
commit
119d803d04
7 changed files with 77 additions and 30 deletions
15
README.md
15
README.md
|
|
@ -2,8 +2,9 @@ jsprit
|
|||
======
|
||||
[](https://travis-ci.org/graphhopper/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).
|
||||
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
|
||||
jsprit is a java based, open source toolkit for solving rich [Traveling Salesman Problems(TSP)](http://en.wikipedia.org/wiki/Travelling_salesman_problem") and [Vehicle Routing Problems(VRP)](http://neo.lcc.uma.es/vrp/vehicle-routing-problem/).
|
||||
It is lightweight, flexible and easy-to-use, and based on a single all-purpose [meta-heuristic](../docs/Meta-Heuristic.md) currently solving
|
||||
|
||||
- Capacitated VRP
|
||||
- Multiple Depot VRP
|
||||
- VRP with Time Windows
|
||||
|
|
@ -16,10 +17,10 @@ It is lightweight, flexible and easy-to-use, and based on a single all-purpose <
|
|||
- Various combination of these types
|
||||
|
||||
Setting up the problem, defining additional constraints, modifying the algorithms and visualising the discovered solutions is as easy and handy as
|
||||
reading classical VRP instances to benchmark your algorithm. It is fit for change and extension due to a modular design and a comprehensive set of unit and integration-tests. [More features ...](https://github.com/jsprit/jsprit/wiki/features)
|
||||
reading classical VRP instances to benchmark your algorithm. It is fit for change and extension due to a modular design and a comprehensive set of unit and integration-tests. [More features ...](../docs/Features.textile)
|
||||
|
||||
## Getting Started and Documentation
|
||||
Please visit [docs](https://github.com/graphhopper/jsprit/blob/master/docs/Home.md) to learn more. For older versions (<v1.7) use [old-docs](https://github.com/graphhopper/jsprit/blob/%3C1.7/docs/Home.md). The best way to get to know jsprit is by looking at [code examples](https://github.com/graphhopper/jsprit/tree/master/jsprit-examples/src/main/java/com/graphhopper/jsprit/examples).
|
||||
## Getting Started with Documentation
|
||||
Please visit [docs](https://github.com/graphhopper/jsprit/blob/master/docs/Home.md) to learn more.The best way to get to know jsprit is by looking at [code examples](https://github.com/graphhopper/jsprit/tree/master/jsprit-examples/src/main/java/com/graphhopper/jsprit/examples).
|
||||
|
||||
## Modules and Dependencies
|
||||
Please read [Notice.md](https://github.com/graphhopper/jsprit/blob/master/NOTICE.md) to get to know the direct dependencies of each module.
|
||||
|
|
@ -42,7 +43,7 @@ Developing this would be much more difficult without the help of [these companie
|
|||
## Contact
|
||||
|
||||
#### Mailing List:
|
||||
In the [mailing list](https://discuss.graphhopper.com/) ([old mailing list](https://groups.google.com/group/jsprit-mailing-list)) you can discuss jsprit related issues and you will probably get answers to your questions.
|
||||
In the [Graphhopper Forum ](https://discuss.graphhopper.com/) ([Also you can see the old mailing list](https://groups.google.com/group/jsprit-mailing-list)) you can discuss jsprit related issues and you will probably get answers to your questions.
|
||||
|
||||
#### Stackoverflow:
|
||||
You can also use [stackoverflow](http://stackoverflow.com/questions/tagged/jsprit) to discuss your issues. Tag it with <em>jsprit</em> then it is easier to keep track of your topic.
|
||||
|
|
@ -51,7 +52,7 @@ You can also use [stackoverflow](http://stackoverflow.com/questions/tagged/jspri
|
|||
For bugs, feature requests or similar use the [issue tracker](https://github.com/jsprit/jsprit/issues).
|
||||
|
||||
#### Email:
|
||||
If you cannot get help in the mailing list or you just do not want to discuss your topic publicly, contact us via https://graphhopper.com/#contact
|
||||
If you cannot get help in the mailing list or you just do not want to discuss your topic publicly, [contact us via mail](https://graphhopper.com/#contact)
|
||||
|
||||
|
||||
## About
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
- Capacitated VRP<a href="https://github.com/jsprit/jsprit/wiki/Simple-Example"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"> </a><a href="https://github.com/jsprit/jsprit/wiki/Network-Based-VRPs"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/network_small.png" title="Code Example - NetworkBased VRP"></a><a href="https://github.com/jsprit/jsprit/wiki/Benchmark-CVRP"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/1372278707_table_chart.png" title="Benchmark"> </a>
|
||||
- Multiple Depot VRP <a href="https://github.com/jsprit/jsprit/wiki/Multiple-Depot-VRP"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a><a href="https://github.com/jsprit/jsprit/wiki/Benchmark-MDVRP"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/1372278707_table_chart.png" title="Benchmark"></a>
|
||||
- VRP with Time Windows<a href="https://github.com/jsprit/jsprit/wiki/VRP-with-time-windows-example"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a><a href="https://github.com/jsprit/jsprit/wiki/Benchmark-VRPTW"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/1372278707_table_chart.png" title="Benchmark"></a>
|
||||
- VRP with Backhauls (Deliveries first)<a href="https://github.com/jsprit/jsprit/wiki/VRP-with-backhauls-example"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a>
|
||||
- VRP with Backhauls (mixed Pickups and Deliveries)<a href="https://github.com/jsprit/jsprit/wiki/VRP-with-depot-bounded-pickups-and-deliveries"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a>
|
||||
- VRP with Pickups and Deliveries<a href="https://github.com/jsprit/jsprit/wiki/VRP-with-pickups-and-deliveries"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a>
|
||||
- VRP with Heterogeneous Fleet<a href="https://github.com/jsprit/jsprit/wiki/Heterogeneous-fleet"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a><a href="https://github.com/jsprit/jsprit/wiki/Benchmark-VRPH"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/1372278707_table_chart.png" title="Benchmark"></a>
|
||||
- Traveling Salesman Problem<a href="https://github.com/jsprit/jsprit/wiki/Traveling-Salesman-Problem"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a>
|
||||
- Dial-a-Ride Problem<a href="https://github.com/jsprit/jsprit/wiki/Dial-a-Ride-Problem"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a>
|
||||
- Capacitated VRP<a href="https://github.com/graphhopper/jsprit/blob/master/docs/Simple-Example.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"> </a><a href="https://github.com/jsprit/jsprit/wiki/Network-Based-VRPs.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/network_small.png" title="Code Example - NetworkBased VRP"></a><a href="https://github.com/jsprit/jsprit/wiki/Benchmark-CVRP.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/1372278707_table_chart.png" title="Benchmark"> </a>
|
||||
- Multiple Depot VRP <a href="https://github.com/graphhopper/jsprit/blob/master/docs/Multiple-Depot-VRP.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a><a href="https://github.com/jsprit/jsprit/wiki/Benchmark-MDVRP.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/1372278707_table_chart.png" title="Benchmark"></a>
|
||||
- VRP with Time Windows<a href="https://github.com/graphhopper/jsprit/blob/master/docs/VRP-with-time-windows-example.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a><a href="https://github.com/jsprit/jsprit/wiki/Benchmark-VRPTW"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/1372278707_table_chart.png" title="Benchmark"></a>
|
||||
- VRP with Backhauls (Deliveries first)<a href="https://github.com/graphhopper/jsprit/blob/master/docs/VRP-with-backhauls-example.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a>
|
||||
- VRP with Backhauls (mixed Pickups and Deliveries)<a href="https://github.com/graphhopper/jsprit/blob/master/docs/VRP-with-depot-bounded-pickups-and-deliveries.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a>
|
||||
- VRP with Pickups and Deliveries<a href="https://github.com/graphhopper/jsprit/blob/master/docs/Vrp-with-pickups-and-deliveries.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a>
|
||||
- VRP with Heterogeneous Fleet<a href="https://github.com/graphhopper/jsprit/blob/master/docs/Heterogeneous-Fleet.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a><a href="https://github.com/jsprit/jsprit/wiki/Benchmark-VRPH"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/1372278707_table_chart.png" title="Benchmark"></a>
|
||||
- Traveling Salesman Problem<a href="https://github.com/jsprit/jsprit/wiki/Traveling-Salesman-Problem.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a>
|
||||
- Dial-a-Ride Problem<a href="https://github.com/jsprit/jsprit/wiki/Dial-a-Ride-Problem.md"><img src="https://github.com/jsprit/misc-rep/raw/master/wiki-images/examples_small.png" title="Code Example"></a>
|
||||
|
|
@ -1 +1 @@
|
|||
You model a dial-a-ride problem much like a vehicle routing problem with pickups and deliveries. The capacity of vehicles can be interpreted as number of seats available. A shipment is here understood as a ride from one location to another (probably you want the shipment to have a capacity-demand of 1). See [VRP with pickups and deliveries](https://github.com/jsprit/jsprit/wiki/VRP-with-pickups-and-deliveries).
|
||||
You model a dial-a-ride problem much like a vehicle routing problem with pickups and deliveries. The capacity of vehicles can be interpreted as number of seats available. A shipment is here understood as a ride from one location to another (probably you want the shipment to have a capacity-demand of 1). See [VRP with pickups and deliveries](../docs/Vrp-with-pickups-and-deliveries.md).
|
||||
|
|
@ -12,14 +12,15 @@ jsprit is a multi-module project and consists of:
|
|||
#### Maven way
|
||||
If you want to use the latest release of jsprit-core, add the following lines to your pom:
|
||||
|
||||
<pre><code><dependency>
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.graphhopper</groupId>
|
||||
<artifactId>jsprit-core</artifactId>
|
||||
<version>{version}</version>
|
||||
</dependency>
|
||||
</code></pre>
|
||||
```
|
||||
|
||||
Find the latest versions here: [mvn repository](https://mvnrepository.com/artifact/com.graphhopper/jsprit-core).
|
||||
Find the latest versions here: [mvn repository](https://mvnrepository.com/artifact/com.graphhopper/jsprit-core)
|
||||
|
||||
#### Build yourself
|
||||
If you want to build the master branch yourself, do this:
|
||||
|
|
@ -39,6 +40,7 @@ the following documentation is recommended:
|
|||
Here you learn to setup the Java environment and an Integrated Development Environment (IDE). In the subsection <em>Adding Jars to your Project</em> you learn to integrate external libraries in your project. Just copy/paste the above jsprit releases/snapshots to your pom.xml instead of the GeoTools-artifacts.
|
||||
|
||||
#### If you do not want Maven
|
||||
|
||||
to manage your dependencies, go to [maven central](https://search.maven.org/), search for jsprit and download the latest binaries to put them into your classpath.
|
||||
|
||||
Go ahead and show me a [simple example](Simple-Example.md) of how to setup and solve a vehicle routing problem.
|
||||
|
|
|
|||
|
|
@ -108,4 +108,4 @@ Collection<VehicleRoutingProblemSolution> solutions = algorithm.searchSolutions(
|
|||
VehicleRoutingProblemSolution bestSolution = Solutions.bestOf(solutions);
|
||||
</code></pre>
|
||||
|
||||
Please visit <a href="https://github.com/jsprit/jsprit/wiki/Simple-Example">Simple Example</a> to get to know how you can analyse the solution.
|
||||
Please visit [Simple Example](https://github.com/graphhopper/jsprit/blob/master/jsprit-examples/src/main/java/com/graphhopper/jsprit/examples/SimpleExample.java) to get to know how you can analyse the solution.
|
||||
|
|
@ -2,8 +2,11 @@ It is assumed that you know the basics of the [applied algorithm](Meta-Heuristic
|
|||
removed job is re-inserted into the ruined solution again (one after another). To actually insert a job, the algorithm
|
||||
calculates its "best" insertion position. This implies also to check the feasibility of the insertion step
|
||||
which is in turn dependent on constraints (such as capacity constraints).
|
||||
jsprit knows hard and soft constraints. Whereas hard constraints must be met and cannot be broken, soft constraints
|
||||
are always fulfilled but uses penalties to express "good" and "bad" insertions.
|
||||
|
||||
## jsprit knows hard and soft constraints.
|
||||
|
||||
- Hard constraints must be met and cannot be broken
|
||||
- soft constraints are always fulfilled but uses penalties to express "good" and "bad" insertions.
|
||||
|
||||
jsprit comes with built-in or default constraints (such as capacity and time-window constraints) and allows you to add
|
||||
custom constraints. However, you can also disable the default constraints. To add custom constraints use
|
||||
|
|
|
|||
41
jsprit-io/src/test/resources/infiniteWriterV2Test.xml
Normal file
41
jsprit-io/src/test/resources/infiniteWriterV2Test.xml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problem xmlns="http://www.w3schools.com"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3schools.com vrp_xml_schema.xsd">
|
||||
<problemType>
|
||||
<fleetSize>INFINITE</fleetSize>
|
||||
</problemType>
|
||||
<shipments>
|
||||
<shipment id="1">
|
||||
<pickup>
|
||||
<location>
|
||||
<id>[x=1.0][y=2.0]</id>
|
||||
<coord x="1.0" y="2.0"/>
|
||||
</location>
|
||||
<duration>100.0</duration>
|
||||
<timeWindows>
|
||||
<timeWindow>
|
||||
<start>1.0</start>
|
||||
<end>2.0</end>
|
||||
</timeWindow>
|
||||
</timeWindows>
|
||||
</pickup>
|
||||
<delivery>
|
||||
<location>
|
||||
<id>delLoc</id>
|
||||
<coord x="5.0" y="6.0"/>
|
||||
</location>
|
||||
<duration>50.0</duration>
|
||||
<timeWindows>
|
||||
<timeWindow>
|
||||
<start>3.0</start>
|
||||
<end>4.0</end>
|
||||
</timeWindow>
|
||||
</timeWindows>
|
||||
</delivery>
|
||||
<capacity-dimensions>
|
||||
<dimension index="0">10</dimension>
|
||||
</capacity-dimensions>
|
||||
<requiredSkills>skill3, skill1, skill2</requiredSkills>
|
||||
</shipment>
|
||||
</shipments>
|
||||
</problem>
|
||||
Loading…
Add table
Add a link
Reference in a new issue