The C++ source code for the program I made is here:
http://pastebin.com/Qu3cx6Nf
It may be a bit tricky to work with as I didn't write it for public usage, but here you go. There's a table of all the level data in the file (i.e. clocks/GCs obtained or needed, other requirements, etc.)
You can change the amount of clocks to obtain in a stage visit by modifying the clocks number in the table (and making sure you get it later instead so the data still adds up properly). For example, to skip a clock in What's Cookin' Doc (1) to get it in (3), change
Language: C++
Level("What's Cookin', doc? 1" , MEDIEVAL, 9 , 24, 30, REQUIRE_CLOCKS, ...
Level("What's Cookin', doc? 2" , MEDIEVAL, 4 , 12, 30, REQUIRE_CLOCKS, ...
Level("What's Cookin', doc? 3" , MEDIEVAL, 2 , 1 , 30, REQUIRE_CLOCKS, ...
to
Language: C++
Level("What's Cookin', doc? 1" , MEDIEVAL, 8 , 24, 30, REQUIRE_CLOCKS, ...
Level("What's Cookin', doc? 2" , MEDIEVAL, 4 , 12, 30, REQUIRE_CLOCKS, ...
Level("What's Cookin', doc? 3" , MEDIEVAL, 3 , 1 , 30, REQUIRE_CLOCKS, ...
The main() function has a commented-out function to try finding random routes to get the shortest route possible. However, it can take a lot of tries (hundreds of millions) until it finds a perfect route. It also has a function for calculating a route given an array of level ids, which is useful for seeing how much time a certain route takes, or if it is even possible.
It's a bit puzzling, I guess, but I hope it can be useful to you.