vrp icon indicating copy to clipboard operation
vrp copied to clipboard

Adding additional constraints to the VRP

Open jinkai1205 opened this issue 2 years ago • 5 comments

Is it possible to add additional constraints?

jinkai1205 avatar May 16 '23 03:05 jinkai1205

yes, that's possible when the logic is used as a library (rust crate). You would need to construct your own instance of VRP using desired constraints (wrapped by Feature concept). If you're using library through json pragmatic format, then it is not possible: this would require to support some domain specific language to express constraints in some form (e.g. AMPL).

reinterpretcat avatar May 16 '23 07:05 reinterpretcat

Is the solver able to handle tour length constraint?

On Tue, May 16, 2023 at 3:48 PM Ilya Builuk @.***> wrote:

yes, that's possible when the logic is used as a library (rust crate). You would need to construct your own instance of VRP using desired constraints (wrapped by Feature concept). If you're using library through json pragmatic format, then it is not possible: this would require to support some domain specific language to express constraints in some form (e.g. AMPL).

— Reply to this email directly, view it on GitHub https://github.com/reinterpretcat/vrp/issues/103#issuecomment-1549168772, or unsubscribe https://github.com/notifications/unsubscribe-auth/AYHL7QFYHJO7MA4JT62OXI3XGMWOJANCNFSM6AAAAAAYDBIEG4 . You are receiving this because you authored the thread.Message ID: @.***>

jinkai1205 avatar May 16 '23 08:05 jinkai1205

yes, there is maxDistance and maxDuration constraints on vehicle's limits definition:

https://reinterpretcat.github.io/vrp/concepts/pragmatic/problem/vehicles.html

reinterpretcat avatar May 16 '23 09:05 reinterpretcat

Is there any documentation on how to add additional constraint? I'm not familiar with Rust crate.

jinkai1205 avatar May 16 '23 09:05 jinkai1205

No, there is no comprehensive documentation how to extend the solver code wise, only how to use it with json as a command line application

reinterpretcat avatar May 16 '23 10:05 reinterpretcat