I am learning about graphs and algorithms and I am having a hard time even finding a name for this kind of problem, let alone coming up with a good solution.
If we just have an unweighted undirected graph, finding the shortest path from A to B is trivial (BFS).
It becomes harder if we have to visit certain nodes ("Go from A to B, while picking up item 1 on node C, item 2 on node D.. in any order, visiting a node more than once is allowed"), but this is still an easy to find problem.
Now, what if each item can be picked up from more than one node? It only needs to be picked up once, how to choose which node to use, so that the resulting path is the shortest possible?
Each item can be available on many nodes, each node can have none at min and all at max items available on it. Multiple nodes with a specific item can be visited, but only one is required for each item.
Think ~10000 nodes, ~10 items, each item available in up to ~10 nodes. Bruteforcing all possibilities for each item feels wrong, since the linked solution for a specific set of nodes already tries all their permutations, so this would be very complex.
I have found some resemblance to the picker routing problem, specifically the mixed-shelve warehouse variant. The problem is to find the shortest route to pickup each item from an order in a warehouse, where each item is stocked in multiple places in the warehouse. Contrary to my situation, papers solving these problems think of specific shaped graphs (rectangular warehouse, parralel aisles) and are satisfied with heuristic aproximations of the shortest path. Mixed-shelves picker routing turns out to be NP-hard.