PROBLEM: Now the hard part. I am tasked with optimizing the network and have the freedom to cut end points from the network if it yields a more optimal value. TheI believe the value I am seekingtrying to minimize is the:
Z = sum( edge lengths inalong network)path / number of endconnected pointsaddresses connectedin path
My first thought wasAs @FelixIP pointed out, there is an optimal solution and it would be a single address node not connected to tryanything:
Z = 0/1
I want to accomplish this heuristically - create the networkavoid that connects all end points to each other and then compute Z. Then remove an end point from the network and reconnect the remaining end pointssituation without providing hard coded constraints like minimum number of addresses to each other and recompute Zconnect = 10.
If Z has improvedI added an attribute (lower value than beforeN) formally removeto every node, so that end pointevery node from the graph. Keep iterating through allthat is an endpoint of the end points until complete.
The issuegreen lines, but is:
It is very time consuming to do the above.
It also does not guarantee an optimal solution. It would give me a different result each time depending on the starting end point.
I have considered not a MILP solution using gulp in Pythonred address point gets a value of 1 and all other nodes get a value of 0, but itperhaps I can ensure more than one address is beyondconnected by modifying my understanding. I think I might be stuck with a heuristic approach.function to maximize:
Z = sum N for every node in path connecting addresses / sum length edges in path connecting addresses
If I have considered using a Steiner Tree, Minimum Spanning Treemaximize that value, Traveling Salesman etc.I am instructing the optimization algo to reconnectfind the end point nodessubnetwork connecting addresses so that the number of addresses connected to each other along the network, but before I attempt to implement a solution is as many as possible, I was wondering if anyone has faced a similar problem?
Is there a better way for me to create a network with the lowest Z while maximizing the numbertotal length of end points connected?the subnetwork is as small as possible.
Is there a direct solution that can be found via networkx and Pythonthis right? If so, how might I implement this?