Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
260 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...