diff --git a/docs/VRP-with-time-windows-example.md b/docs/VRP-with-time-windows-example.md index 68fc33d0..5c5a4e6d 100644 --- a/docs/VRP-with-time-windows-example.md +++ b/docs/VRP-with-time-windows-example.md @@ -108,4 +108,4 @@ Collection solutions = algorithm.searchSolutions( VehicleRoutingProblemSolution bestSolution = Solutions.bestOf(solutions); -Please visit [Simple Example](Simple-Example.md) to get to know how you can analyse the solution. \ No newline at end of file +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. \ No newline at end of file diff --git a/docs/Walkthrough Constraints.md b/docs/Walkthrough Constraints.md index d37d2e4e..f48fc701 100644 --- a/docs/Walkthrough Constraints.md +++ b/docs/Walkthrough Constraints.md @@ -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 @@ -44,7 +47,7 @@ There are hard constraints at two different levels: at route and activity level. A route is basically a sequence of activities. Each route has a start- and an end-activity, and in between other activities of type core.problem.solution.route.activity.TourActivity. -###core.problem.constraint.HardRouteConstraint +### core.problem.constraint.HardRouteConstraint 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:
HardRouteConstraint constraint = new HardRouteConstraint(){
@@ -61,7 +64,7 @@ The JobInsertionContext tells you the context of the insertion step, i.e. the sp
 a specified route (iContext.getRoute()) as well as the vehicle
 that should be employed on that route (iContext.getNewVehicle()).
 
-####Example:
+#### Example:
 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:
 
 
final Job jobWithAccessConstraint = routingProblem.getJobs().get("job1");