I ran into the problem of finding a path in which I must find all possible paths from one point to another. It would be very easy if that were the case - I would use a width algorithm like the one explained here .
The problem is that in this case, each edge has a maximum number of times that can be used . Let's look at an example:

In this case, I can go 15 times from A to D. The first 10 times the path will be A β B β C β D. The rest 5 times the path will be A β C β D.
So far, I have been able to implement the solution (using python), but it is rather slow for medium sized tasks (about 30 nodes). I have an unweighted graph (since I'm not against the length of the path) with possible connections between different nodes, and separately I have a matrix with a limit on the use of each edge.
So, inside the loop:
- I find the only possible way.
- I am updating the custom matrix. Using this path will be minimal for using edges (for example, you can use the path as many times as part of the path with a minimum limit).
- For each edge whose use reaches 0, this means that it can no longer be used, so I remove it from the graph.
- Loop until all paths are found.
, , . , node , , .
?