Related jobs in JSprit

前端 未结 1 1331
南旧
南旧 2020-12-17 02:45

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

相关标签:
1条回答
  • 2020-12-17 03: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.

    0 讨论(0)
提交回复
热议问题