Exemplo n.º 1
0
        /// <summary>Defines allowedLoggerLocations by taking all water network nodes and eliminating all disconnected nodes and all nodes upstream from PRV outlets; analysis is done using flowtree
        /// </summary>
        private void DefaultProhibitedLocations()
        {
            MainWindow mainWindow = (MainWindow)this.Owner;
            //Generate flow tree for the loaded waterNetwork and inlets specified above
            FlowTree flowTree = new FlowTree(mainWindow.waterNetwork, inletNodes);
            int      ret_val  = flowTree.GenerateFlowTree();

            if (ret_val < 0)
            {
                throw new Exception("Error while analysing network flow paths!");
            }
            allowedLoggerLocations = flowTree.GetAllNodes(); //loggers can be placed anywhere in the flowtree; this eliminates all disconnected nodes and all nodes upstream from PRV outlets
        }