Closed leonlan closed 1 year ago
I propose a more user-friendly interface:
verify(solution, instance, type=‘cvrp’) # verify CVRP solution
verify(solution, instance, type=‘vrptw’) # verify VRPTW solution
It’s not as explicit as the one I proposed before. But it’s way easier to use.
We should allow the first argument to be a file path or an actual solution object, and idem for the second argument.
In the verify
module, we can write modular verification functions for each constraint.
verify/constraints/capacity.py
verify/constraints/time_windows.py
I'm in doubt whether this library should support verification of solutions. It may be doable for classical VRP variants, such as CVRP and VRPTW, but I don't know if it's feasible for other variants.
I have decided that this and #51 is not something we will support. Our library focuses on input/output of VRPLIB instances. Validating the instance content is outside the scope of this library.
It would be nice to provide functions that can verify any VRP-type solution. Of course, we need to make a verification function for each type of VRP-type problem.
I have no idea yet how the interface will look like. But here's an idea: