-
Hi, my plan is to edit your pyvrp package (on Linux), build it, and then publish it on PyPI to use it also on e.g. a windows PC. Thanks & cheers
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 20 replies
-
You don't need to push to PyPI to get the required wheels out - you can download them once the GitHub Action has completed. For us, that's every time the CD runs, for example here.
It should be a bit (up to 20-25%?) faster because the CVRP-specific build removes all time window computations from the algorithm. This build option will probably be removed as part of #502, but we haven't gotten around to that yet. If you don't need anything duration related, this could be worthwhile. However, the actual performance differences in terms of solution quality will likely be fairly small. |
Beta Was this translation helpful? Give feedback.
-
Hi @bmorlo, Let me try to steer you a bit in a different direction. You are asking a lot of questions - which is not a problem in itself - but it's about a lot of things that I don't think will help you with your current work. First some clarifying assumptions:
You need at least 2 months (full-time) before you can modify the code of PyVRP to your liking, assuming you are already proficient in Python and C . You can read the paper for details on the algorithmic and mathematical background. PyVRP implements a complex local search solver, and if you cannot modify that correctly, you are likely not able to achieve your goal of building a load-balancing feature. For a master's thesis, adopting a state-of-the-art solver is often too much because of time constraints. Most master's theses implement much simpler (meta-)heuristics, which is perfectly fine. For example, I have seen many master students implement an adaptive large neighborhood search metaheuristic for VRPs, see, e.g., https://alns.readthedocs.io/en/latest/examples/capacitated_vehicle_routing_problem.html. ALNS is easy to understand and implement, and importantly, it works well if implemented correctly. Of course, I'm not your advisor, so you have to check with your own advisor to see if that fits the scope of your thesis. If you find yourself new to GitHub, consider starting with smaller projects first. For instance, the ALNS package I mentioned is considerably simpler than PyVRP; it was actually the first project I contributed to. Read the documentation, use StackExchange, ask GPT questions, etc., to get yourself familiar with all the Git(hub) bells and whistles. Additionally, if you're interested in learning about Python packaging, I recommend checking out this guide on creating a Python package. Although it's from 2022, most of the information remains relevant and current. I hope this advice helps you further in your thesis. Wishing you the best of luck, and feel free to reach out if you need more tips. |
Beta Was this translation helpful? Give feedback.
-
This kind of works, but the algorithm is not complete. You still need to change a few things in
CI/CDs fail simply because the checks in place do not pass. See https://github.com/bmorlo/PyVRP_load_balancing/actions for the details.
That's a matter of parameter tuning, I cannot say what works and what does not work for your problem. |
Beta Was this translation helpful? Give feedback.
-
Alright. I benchmarked the latest version of my code on one of your test sets (which I modified to set a fixed number of vehicles and also have unit-demand per client) against your original PyVRP version. The performance with very even tours is only about 1% worse. See the two screenshots below (unfortunately I cut off the tours... so you gotta believe me her xD). The printed progress and the time stamps look good too. (If you see something that is off please let me know!) This should more than work for my thesis. I'll leave the link to my final repository here |
Beta Was this translation helpful? Give feedback.
You don't need to push to PyPI to get the required wheels out - you can download them once the GitHub Action has completed. For us, that's every time the CD runs, for example here.
It should be a bit (up to 20-25%?) faster because the CVRP-specific build removes all time window computations from the algorithm. This build option will probably be removed as part of #502, but w…