I'm looking for an algorithm to determine the shortest path of a precedence graph with consideration of a connection graph. I looked into Dijkstra and Bellman Ford, but I don't think that they are viable for a precedence graph, because they only go outwards through one edge at every vertex. But In a precedence graph there are also cases where you have to go through two or more edges to reach the next vertex. For example to disassemble you have to remove parts A and B first befor you can reach part C.
What I try to solve: I have a simple precedence graph representing how to disassemble a product. Every vertex has a cost (time units). In this graph I have a start and destination. The result should be the minimum amount of time needed for disassembly.
Also to consider is that you could disassemble moules as a whole to reach a specific part depending on the connection graph. This graph shows how the parts are actually connected with each other. Like A,B and C have to be removed to reach D. A has to be removed first. Then you could remove B and C as a whole (removing C while B is still attached to it).
I now used the Deep-first search algorithm with some modifications to fit my purpose for the first part. The second part, where also modules should be considered to be disassembled instead of every single peace, is still missing. Maybe with some more modifications to the algorithm it could be possible as well.