torressa / cspy

A collection of algorithms for the (Resource) Constrained Shortest Path problem in Python / C++ / C#
https://torressa.github.io/cspy/
MIT License
77 stars 24 forks source link

Multi trip vehicle routing problem #118

Open saahaand opened 4 months ago

saahaand commented 4 months ago

Hi @torressa

I want to express my gratitude for the excellent work you've done. I've already implemented your package in two of my projects, and it's been perfect.

Currently, I'm tackling a multi-trip vehicle routing problem in my new project, and I need to adjust some parts of the cspy code to suit this specific problem. Primarily, the modifications involve the labeling algorithm, which needs to relax the elementary condition on source node (depot) since it can be visited multiple times within a route. Additionally, I need to address the vehicle capacity constraint (the amount of capacity used in label setting), which should reset to the amount of resource utilised by the node (demand of the node) being immediately visited after each visit to the depot (source node) within a route. (Essentially it means that after visiting the depot each time the vehicle is empty and the used capacity is zero)

I have two questions:

Could you assist me in identifying which functions to modify in the labeling algorithm? I'm not very proficient in C++ and typically work with Python.

More importantly, once I've made the necessary modifications and created my own fork, I aim to make it as a Python module, similar to what you've done in your version. However, I lack the expertise on how to accomplish this. For instance, I attempted to clone the fork created in https://github.com/MattiaMiolato/cspy in issue #103 and install it as a Python module, but encountered an error stating that the setup.py file couldn't be found. Can you provide guidance on this process, or perhaps direct me to a tutorial on how to convert my modified C++ code into a Python module?

Thank you!