예제 #1
0
        void RadialNetworkLifecycle(SubnetworkManager subnetworkManager, Tier mediumVoltageTier, Element elementR1)
        {
            #region Life cycle for a simple radial subnetwork with one controller

            // Create a subnetwork named "Radial1" with a single controller
            // elementR1 represents the device that serves as the subnetwork controller (e.g., circuit breaker)
            Subnetwork subnetworkRadial1 = subnetworkManager.EnableControllerInEditOperation(mediumVoltageTier, elementR1, "Radial1", "R1", "my description", "my notes");

            // ...

            // Update the subnetwork and refresh the map
            subnetworkRadial1.Update();
            MapView.Active.Redraw(true);

            // ...

            // At some point, a subnetwork will need to be deleted.

            // First step is to disable the controller
            subnetworkManager.DisableControllerInEditOperation(elementR1);

            // At this point, the subnetwork is deleted, but all of the rows that have been labeled with the subnetwork ID need to be updated
            subnetworkRadial1.Update();
            MapView.Active.Redraw(true);

            // The final step is to notify external systems (if any) using the Export Subnetwork geoprocessing tool

            #endregion
        }
예제 #2
0
        void MultifeedRadialLifeCycle(SubnetworkManager subnetworkManager, Tier mediumVoltageTier, Element elementR2, Element elementR3)
        {
            #region Life cycle for a multifeed radial subnetwork with two controllers

            // Create a subnetwork named "R2, R3" from two controllers
            // elementR2 and elementR3 represent the devices that serve as subnetwork controllers (e.g., circuit breakers)
            subnetworkManager.EnableControllerInEditOperation(mediumVoltageTier, elementR2, "R2, R3", "R2", "my description", "my notes");
            subnetworkManager.EnableControllerInEditOperation(mediumVoltageTier, elementR3, "R2, R3", "R3", "my description", "my notes");

            // If the tie switch between them is opened, the original subnetwork controllers must be disabled and re-enabled with different names
            // This will create two new subnetworks, named "R2" and "R3"
            subnetworkManager.DisableControllerInEditOperation(elementR2);
            subnetworkManager.DisableControllerInEditOperation(elementR3);

            Subnetwork subnetworkR2 = subnetworkManager.EnableControllerInEditOperation(mediumVoltageTier, elementR2, "R2", "R2", "my description", "my notes");
            Subnetwork subnetworkR3 = subnetworkManager.EnableControllerInEditOperation(mediumVoltageTier, elementR3, "R3", "R3", "my description", "my notes");

            subnetworkR2.Update();
            subnetworkR3.Update();
            MapView.Active.Redraw(true);

            #endregion
        }