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

Returning all the negative cost path in Elementary shortest path problem #105

Open saahaand opened 1 year ago

saahaand commented 1 year ago

When I am using the monodirectional algorithm in a branch and price context to find a negative cost elementary path (reduced cost), the package return just one path (the most negative reduced cost) at each iteration. However, if it returns all the generated negative cost paths (all labels with negative cost at "Sink node") it decreases the number of iterations in column generation.

I think that it would be very helpful if you add a parameter like "Multiple_column(path) = True\False" to the package where making it "True", returns all the path generated with negative cost (all the labels with negative cost at "Sink" node).

torressa commented 1 year ago

Thanks @saahaand! That is indeed a good feature. Someone already worked on a related feature in https://github.com/torressa/cspy/issues/103. I do not have the bandwidth to work on this, but feel free to take over.