My topic is to minimize the cost of construction line digging. Starting from a source point I have several households that need to be connected to the that line. My plan was to calculate the shortest path for each source -> house and then cutout the overlapping lines.
In the example below I would then have a route on the Eastern street that goes from house 1-4, where the line for house 4, for instance, only reaches to house 3 and not the whole way to the source point (red) as I cutout its shortest path with the shortest pathes from houses 1 to 3. However, for house 5 the shortest path would have been the Western road, which is why it doesn't intersect with any other shortest path. But practically a connection from house 4 would have been more cost efficient. How can I include this consideration into my algorithm using PostGIS and pgrouting?