**NETWORK DISCOVERY**

When a generator stops working or a line becomes faulty, the topology of the network changes. Pathways between sources and loads may no longer be viable. There is no sure way of knowing what components will remain viable because anything in an electrical circuit can be damaged. Before a solution can be found for supplying loads with what sources remain, complete knowledge of the network must be ained. In a situation where this is being done manually, this probably involves looking at a switchboard (or breaking out an ammeter in really desperate circumstances). In the scenario where this is automated, it is instead going to be one or more microcontrollers or embedded systems that have to learn the new topology The network can eally be thought of as existing in two configurations—the old topology, which is the configuration of the network before the ault(s) occurred, and the new topology, which is the configuration of the network after the fault(s) occurred. For the purpose of his research, we are not going to assume that there are any tricks or shortcuts we can take in order to speed up discovery of he new topology. In a real application, there may be ways to use the old topology to make assumptions about what does or oesn’t exist in the new topology. But we want to be able to solve this problem in the general case, and, as mentioned already, nything can be damaged, so there is no sure way of knowing what components will remain viable. So we are going to have to iscover the network from tabula rasa. There is a noteworthy advantage to this, which is that it allows for discovery and optimization of the network when other changes have been made besides faults—a new generator may be added to help upply the network, or new lines may be connected together, for example. In cases where there is a central processor onitoring ll components of the network, the discovery phase should be trivial. The most interesting case is the most modular ne, where every source, switch, and load point have dedicated microcontrollers monitoring and directing them. Each of these oints of interest will be called generically a “node.” Every switch node in the network must have a complete picture of the entire etwork in order to independently find the power assignment solution, and, thereby, whether to close or open the switch it ontrols A network consisting of nodes and links is called a graph. Discovery of all nodes in a graph is a well-known problem o graph theory, and is most simply accomplished by the Bellman-Ford algorithm. (As an aside, if the reader encounters this aterial elsewhere, “nodes” and “links” are also referred to as “vertices” and “edges” in graph theory.) The Bellman-Ford lgorithm is a procedure by which each node learns of its neighbors, as well as the distance to each node in the graph. For our urposes, shortest path calculation is not important, unlike knowing which node is adjacent to which other nodes (among other hings), but this could easily be communicated in place of or in addition to distance information. Additionally, the nodes will need o calculate some other information that will be used later, such as which links are incompatible to be used with other inks and the order in which the Heuristic Solver should check for links to use when attempting to bridge loads with sources. So he Bellman-Ford algorithm is really a stand-in here for a more sophisticated exchange of packets between the nodes that ncludes some of this other information. The purpose is to show how discovery of the network topology could be accomplished.