Skip to content

Commit 6eebb5b

Browse files
author
jsroyal
committed
link fixed
1 parent 32aa164 commit 6eebb5b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

docs/VRP-with-time-windows-example.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,4 @@ Collection<VehicleRoutingProblemSolution> solutions = algorithm.searchSolutions(
108108
VehicleRoutingProblemSolution bestSolution = Solutions.bestOf(solutions);
109109
</code></pre>
110110

111-
Please visit [Simple Example](Simple-Example.md) to get to know how you can analyse the solution.
111+
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.

docs/Walkthrough Constraints.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ It is assumed that you know the basics of the [applied algorithm](Meta-Heuristic
22
removed job is re-inserted into the ruined solution again (one after another). To actually insert a job, the algorithm
33
calculates its "best" insertion position. This implies also to check the feasibility of the insertion step
44
which is in turn dependent on constraints (such as capacity constraints).
5-
jsprit knows hard and soft constraints. Whereas hard constraints must be met and cannot be broken, soft constraints
6-
are always fulfilled but uses penalties to express "good" and "bad" insertions.
5+
6+
## jsprit knows hard and soft constraints.
7+
8+
- Hard constraints must be met and cannot be broken
9+
- soft constraints are always fulfilled but uses penalties to express "good" and "bad" insertions.
710

811
jsprit comes with built-in or default constraints (such as capacity and time-window constraints) and allows you to add
912
custom constraints. However, you can also disable the default constraints. To add custom constraints use
@@ -44,7 +47,7 @@ There are hard constraints at two different levels: at route and activity level.
4447

4548
A route is basically a sequence of activities. Each route has a start- and an end-activity, and in between other activities of type <code>core.problem.solution.route.activity.TourActivity</code>.
4649

47-
###<code>core.problem.constraint.HardRouteConstraint</code>
50+
### <code>core.problem.constraint.HardRouteConstraint</code>
4851
A HardRouteConstraint indicates whether a specified job can be inserted into an existing route (along with a specified vehicle). To define it you need to implement the HardRouteConstraint-interface:
4952

5053
<pre><code>HardRouteConstraint constraint = new HardRouteConstraint(){
@@ -61,7 +64,7 @@ The JobInsertionContext tells you the context of the insertion step, i.e. the sp
6164
a specified route (<code>iContext.getRoute()</code>) as well as the vehicle
6265
that should be employed on that route (<code>iContext.getNewVehicle()</code>).
6366

64-
####Example:
67+
#### Example:
6568
Assume a vehicle with id="1" is not allowed to serve a job with id="job1" (since it is for example too big to access the customer location). Such a constraint can be easily defined as follows:
6669

6770
<pre><code>final Job jobWithAccessConstraint = routingProblem.getJobs().get("job1");

0 commit comments

Comments
 (0)