Options in v2 API


Is it possible to use the Options like in the UI in the API version like Capacities to split rounds?


It might be supported in V2, but due to summer holidays we can not confirm that or the details at this moment. We’ll come back to that in a week or two.


Any update on this?


It’s available in the API V2. That is you can set the parameters and the algorithm should work, but it is not fully tested yet. To help us testing, try this:

  1. Set the number of rounds in the parameters, and the capacities for each round as a string seperated by spaces, e.g.
    'parameters'=>'{"rounds":"3","capacities":"20 20 20"}'

  2. Set demand for each location, e.g.

When I use different capacities, I get different outputs when I set them in a different order. So “5 15 80” gives another output then “80 15 5”. How to fix this? Are capacities assigned to specific routes?

That’s probably because the optimization is done by an algorithm, which does not guarantee optimality. If the routing problem is complex, different order of inputs may yield different results.

See also: https://docs.routexl.com/index.php?title=Algorithm

Your locations are sorted before the algorithm starts the optimization, so their order should not impact the results. But capacities are assigned to rounds in the order of the input and can impact the results if they are ordered differently.