I don't know if plotgroups would allow for some kind of investigation if cascading is possible. Does the plotgroup provide information about the distance to the next city?
No, a plotgroup is actually a very simple concept. It is an array in CvPlot, which tells the ID of the plotgroup for each player. Each plotgroup starts from a city. When adding a plotgroup, all plots next to it are checked if they are valid (road, no enemies etc) and valid plots are added using the same plotgroup ID. They too will check neighbour plots should be added and so on. It can then be used to check if two cities are connected by checking if they have the same plotgroup ID.
In short, it's a bool check to tell if there is a valid road connection. Since it is comparing two ints, it is nearly instant (much faster than any alternatives), but it doesn't have travel time or anything fancy like that.
Come to think of it, maybe it would make sense to make a plotgroup system, which spreads on railroads only. If two cities are in the same group, then a train can travel between those two. If they are in different groups, there is no point in calling the regular pathfinder to try to find a route, because there aren't any.
If not, I think a vector for each city containing the information about the minimal distance (in turns) to each other city might be a solution.
I thought about that too. The idea is good, but what if you build/destroy/upgrade a road? Maintaining the correct values could be a nightmare.
I have been wondering about a simple solution. If two cities are in the same plotgroup, the distance could be estimated to be max(diffX, diffY). Sure it wouldn't be optimal with U shaped roads, but it's fast, simple and will not have to rely on a cache, which can be outdated.
Another concept I have been thinking of is declaring certain cities to become hubs. Each non-hub city will then have a pointer to a hub city, which will be the closest one (maybe you can pick from a list). A transport can be assigned to a hub (home city concept) and it will then deal with transports between the hub and the nearby non-hub cities. Other transports can then be assigned to inter-hub transport.
This would require some clever coding where a yield can go A-Hub1-Hub2-B, which I haven't really come up with yet. However if this works, then automated transports will become more efficient because if a city imports, the yields will most likely come from another city using the same hub. Long distance transports will gather up plenty of resources between a few selected spots meaning if 3 cities each send 2 units units of yields, they gather up to become 6 and that will fill a train. The current system makes wagon trains and trains the best transports because the inability to really use the cargo capacity makes speed more important than size. A trek will not really be that useful, but it could be between hubs.
Sea transport
Another issue I would like to look into is to make some sort of automated transport, which will only go between cities on different islands/ cities not connected by road (plotgroups?). If I have say 5 port cities on one island and make a city on a one city island, chances are that if I automate a ship, it will go between the same cities as my land transports. This makes using the small islands way more complex than it has to be and I end up not really using them.