Lovely day for a depth-first search.
I originally thought I was going to have to figure out how to do simulated recursion by mocking up a call stack, but it turned out to be a bit easier than I thought. Fully brute-force depth-first search with a filter for paths that don't seem worthwhile
Main flow:
The data set structure for the iterations is fairly simple:
Finally, it is done.
Macro for shorten the route
Macro for part 1
Part 2 macro:
I made the visualization about this sample data using Network Analysis tool. The node size is related to the rate size.
Turns out my P2 just needed a small adjustment. Took me several weeks to figure it out!
Brute force with one critical assumption.
Macro:
same concept.