Skip to main content
deleted 60 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

I have a very challenging problem I am trying to solve.

I have a connected network consisting of lines (edges) and points (nodes). I must connect a subset of these nodes together along the shortest path.

I have a very challenging problem I am trying to solve.

I have a connected network consisting of lines (edges) and points (nodes). I must connect a subset of these nodes together along the shortest path.

I have a connected network consisting of lines (edges) and points (nodes). I must connect a subset of these nodes together along the shortest path.

Post Reopened by FelixIP, PolyGeo
deleted 1 character in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

IsIf this is right? If so, then how might I implement thisit?

Is this right? If so, how might I implement this?

If this is right, then how might I implement it?

deleted 235 characters in body
Source Link
bj3t
  • 65
  • 6

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:

  1. It is very time consuming to do the above.

  2. 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?

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. The value I am seeking to minimize is the:

Z = sum(edge lengths in network) / number of end points connected

My first thought was to try to accomplish this heuristically - create the network 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 points to each other and recompute Z. If Z has improved (lower value than before) formally remove that end point node from the graph. Keep iterating through all the end points until complete.

The issue is:

  1. It is very time consuming to do the above.

  2. 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 a MILP solution using gulp in Python, but it is beyond my understanding. I think I might be stuck with a heuristic approach.

I have considered using a Steiner Tree, Minimum Spanning Tree, Traveling Salesman etc. to reconnect the end point nodes to each other along the network, but before I attempt to implement a solution, 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 number of end points connected?

Is there a direct solution that can be found via networkx and Python?

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. I believe the value I am trying to minimize is:

Z = sum edge lengths along path / number of connected addresses in path

As @FelixIP pointed out, there is an optimal solution and it would be a single address node not connected to anything:

Z = 0/1

I want to avoid that situation without providing hard coded constraints like minimum number of addresses to connect = 10. 

If I added an attribute (N) to every node, so that every node that is an endpoint of the green lines, but is not a red address point gets a value of 1 and all other nodes get a value of 0, perhaps I can ensure more than one address is connected by modifying my function to maximize:

Z = sum N for every node in path connecting addresses / sum length edges in path connecting addresses 

If I maximize that value, I am instructing the optimization algo to find the subnetwork connecting addresses so that the number of addresses connected to the network is as many as possible, while the total length of the subnetwork is as small as possible.

Is this right? If so, how might I implement this?

Post Closed as "Needs more focus" by PolyGeo
deleted 18 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
Loading
Source Link
bj3t
  • 65
  • 6
Loading