Related jobs in JSprit
Asked Answered
M

1

6

Is it possible to handle relations between jobs (in this case services) in jsprit?

For instance one job has to start at the same time with one or more other jobs. Or one job must not start before the end of another job (normal sequence).

If not, do you know other java libraries that can handle such kind of restrictions?

Thank you!

Mauramauralia answered 27/6, 2014 at 8:37 Comment(0)
E
14

Yes you can handle such relations with jsprit. It is a bit of coding, but - I think - easy to implement. To illustrate it, I prepared you five examples that are based on the Vehicle Routing Problems (VRP) developed by Christofides-Mingozzi-Toth's* (first benchmarking instance). Follow the links behind the individual headlines and you get to the code. Note that the first activity in a route is marked with a triangle. The labels denote jobIds.

noConstraints

noConstraintsAtAll

capacityConstraints

enter image description here

job 13 and 21 in same route

enter image description here

job 13 and 21 in same route AND 21 before 13

enter image description here

job 13 and 21 in same route AND 13 right after 21

enter image description here

Visit http://jsprit.github.io/ and you get to a number of code examples and docs.

*N. Christofides, A. Mingozzi, and P. Toth. The vehicle routing problem. In N. Christofides, A. Mingozzi, P. Toth, and C. Sandi, editors, Combinatorial Optimization. John Wiley, Chichester, 1979.

Erma answered 28/6, 2014 at 14:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.