I've quickly hand written the example (rather, a near-exact example - I've omitted about 30 houses, but ultimately it is the layout of the roads that is accurate) of what I am currently pondering:
I've marked the CO on a generic point along the road it is positioned. To be more specific, I've made the assumption that it must be placed on that road (which I should have marked as Road #3). In addition, the assumption here is that it must be placed between Point A and Point B as no cable will be run beyond points A and B.
There must be a single cable running from the CO to each house within this village. They will, however, start off as a larger bundle (lets say, 32 individual fibre cables within one large "64-cable bundled" cable). Eventually, they will split from a single 32-pair cable to, say, 4 8-pair cables. I think in this case it would be best to take baby steps first, or put another way I would like to solve the problem first as if I were simply calculating for an individual cable being run from the CO to each home, then work in the "pairings" later.
After scribbling for an hour, I thought that it would be best to use Point A as a reference point. Start the CO as if it were on that corner, calculate the distance to each home individually per fibre then add up the sum, save that data, then move the CO 5 meters and repeat until the CO reaches Point B. For reference, the real-life distance between Point A and Point B is approximately 2 kilometers, or 1.25 miles.
I thought I could label each intersection as A, B, C, D, E, etc. and associate that data with each individual house. For example, if I labelled Ave. #1's position on Road #3 as "C" and the other end of Ave. #1 as "D", then all houses on Ave. #1 belong to "C-D", and each would have a certain distance value (that I would manually enter) from point C. My concern is for the one loop that is encountered with Ave. #3 and Ave #4. They both meet Road #3 and form a closed loop. I thought that, for each house on Ave. #3, I'd have to calculate the distance from the CO going south on Ave #3 then westward on the curve on Ave. #4, then separately try the opposite direction and choose the one that has the lowest amount of cable required.
With respect to the incredible variance in the difficulty of this issue, I had initially considered the P=NP problem (I don't even know if that even applies!) for some reason, but regardless I am concerned that this will ultimately take a ton of time compared to manually calculated this by hand. The reason I'd like to create a program that calculates this is because we will be considering about 5 to 6 other areas, of similar size and road design, that we are considering expanding into.
Also, this project, if feasible, can expand well beyond this simple question. One would have to take into account the number of times you'd have to bore a hole that runs underneath any given road (if you need to cross it of course), then the number of terminals one must place at the side of the road, then vaults (underground nodes), then CO Equipment, etc.
If you have any further questions or would like something clarified please let me know! I'm super excited about this, but would like to stay grounded if it turns out to be well out of my league