VROOM-Project / vroom

Vehicle Routing Open-source Optimization Machine
http://vroom-project.org/
BSD 2-Clause "Simplified" License
1.26k stars 326 forks source link

Limit option understand #1131

Open msmolka opened 2 weeks ago

msmolka commented 2 weeks ago

I have few question about -l LIMIT solving problem option. I'm trying to find out what exactly this value do. What is default value? Is there any way to set it in express or needs to be specified manually?

As background. We have requests that are timing out, and taking minutes. Adding limit helps. But would like to have a bit better understand what our problem is. I'm not able to put request here, as data is private. And have trouble to prepare reasonable result set.

jcoupey commented 2 weeks ago

As the help suggests, -l limit will stop the solving process after limit seconds. This can be used to stop solving earlier at will for long solving runs. Obviously you have no guarantee that the resulting solution won't be arbitrarily bad if the limit is too low. The actual solution you get also becomes dependent on other factors such as hardware, system parallelization etc. In particular using -l means you loose reproducibility across runs.

There is no default value, that is by default no limitation applies. On using this within vroom-express, check the configuration options.

msmolka commented 2 weeks ago

Thank you for explanation. About default value I meant vroom-express. I can see only it can be set via options. But I cannot see to have it setup globally. So I cannot have any value without setting override flag to true. Or I'm missing something? What I would like is to have possibility to set limit in config.yaml for vroom express ?

jcoupey commented 2 weeks ago

If you want to set a limit globally with vroom-express, you could simply adjust the command-line: see options or reqOptions variable in index.js.

Having a configurable limit in config.yml would be a cleaner approach: you'd have to add this value, parse it just like the others in config.js and adjust the options accordingly. If you do so, then a PR to vroom-express would be welcome. ;-)