It would help if you state the problem you are solving, the valid solutions, and the way that you solve it.
The screenshot shows a network that is not optimal. I would guess the solution using existing nodes is A-E-C-B and D-E.
Do you generate Steiner Points (additional nodes) that minimize the network length?
In the screenshot example, I guess a better solution would be A-E-C with 2 Steiner Points at the feet of the perpendiculars from B and D to the line C-E.
https://en.wikipedia.org/wiki/Steiner_point_(computational_g...