Summary
Sets the domain network tier's properties for a subnetwork in a utility network.
The types of features that participate in a tier can be restricted by defining valid asset types from the device, line, junction, edge object, and junction object classes. Defining valid asset types helps enforce data correctness by limiting the types of features that can participate in a subnetwork for a specific tier.
Configuration parameters are used to set properties when a trace is executed on the subnetwork.
Learn more about setting the subnetwork definition
Usage
This tool also allows you to set and alter the tier's subnetwork definition. To alter the values of the tier's subnetwork definition, modify the parameter values and execute the tool again.
The network topology must be disabled.
- The following requirements must be met when working with an
enterprise geodatabase:
- The connected ArcGIS Enterprise portal account must be the portal utility network owner.
- The Input Utility Network parameter value must be from a database connection established as the database utility network owner.
- This tool must be connected to the default version when executed.
Syntax
arcpy.un.SetSubnetworkDefinition(in_utility_network, domain_network, tier_name, support_disjoint_subnetwork, {valid_devices}, {valid_subnetwork_controller}, {valid_lines}, {aggregated_line}, {diagram_template}, {summaries}, {condition_barriers}, {function_barriers}, {include_barriers}, {traversability_scope}, {propagators}, {update_structure_features}, {update_container_features}, {edit_mode_for_default_version}, {edit_mode_for_named_version}, {valid_junctions}, {valid_junction_objects}, {valid_junction_object_subnetwork_controller}, {valid_edge_objects}, {manage_subnetwork_isdirty}, {include_containers}, {include_content}, {include_structures}, {validate_locatability})
Parameter | Explanation | Data Type |
in_utility_network | The input utility network that contains the tier's subnetwork. | Utility Network; Utility Network Layer |
domain_network | The domain network that contains the tier. | String |
tier_name | The name of the tier that contains the subnetwork. | String |
support_disjoint_subnetwork | Specifies whether the input tier supports disjoint subnetworks. Disjoint subnetworks are two or more subnetworks that belong to the same tier and have the same subnetwork name but are not traversable. This option is only available for tiers in domain networks with a partitioned tier definition. Tiers in a domain network with a hierarchical tier definition always have this tier property set to SUPPORT_DISJOINT to support disjoint subnetworks.
| Boolean |
valid_devices [valid_devices,...] (Optional) | The asset group/asset type pairs identified as valid devices for the subnetwork. | String |
valid_subnetwork_controller [valid_subnetwork_controller,...] (Optional) | The asset group/asset type pairs identified as valid device subnetwork controllers in the subnetwork. | String |
valid_lines [valid_lines,...] (Optional) | The asset group/asset type pairs identified as valid lines for the subnetwork. | String |
aggregated_line [aggregated_line,...] (Optional) | The valid lines with geometry that will be aggregated to generate the SubnetLine features. This list is a subset of the values specified in the valid_lines parameter. | String |
diagram_template [diagram_template,...] (Optional) | The templates that will be used to generate subnetwork system diagrams for each subnetwork. | String |
summaries [[Function, Attribute, Filter Name, Filter Operator, Filter Type, Filter Value, Summary Attribute],...] (Optional) | Sets the summary field to store function results when inserting or updating SubnetLine features. Summaries components are as follows:
The summaries Function value options are as follows:
The summaries Filter Operator value options are as follows:
The summaries Filter Type value options are as follows:
| Value Table |
condition_barriers [[Name, Operator, Type, Value, Combine Using],...] (Optional) | Sets a traversability barrier condition on features based on a comparison to a network attribute or check for a category string. A condition barrier uses a network attribute, an operator and a type, and an attribute value. For example, stop a trace when a feature has the Device Status attribute equal to the specific value of Open. When a feature meets this condition, the trace stops. If you're using more than one attribute, you can use the Combine using parameter to define an And or an Or condition. Condition barrier components are as follows:
The condition barriers operator values are as follows:
Learn more about bitwise operators The condition barriers Type value options are as follows:
The Combine Using values are as follows:
| Value Table |
function_barriers [[Function, Attribute, Operator, Value, Use Local Values],...] (Optional) | Sets a traversability barrier on features based on a function. Function barriers can be used to do such things as restrict how far the trace travels from the starting point, or set a maximum value to stop a trace. For example, the length of each line traveled is added to the total distance traveled so far. When the total length traveled reaches the value specified, the trace stops. Function barrier components are as follows:
The function barrier function value options are as follows:
The function barrier operator value options are as follows:
Learn more about bitwise operators The function barrier Use Local Values value options are as follows:
| Value Table |
include_barriers (Optional) | Specifies whether the traversability barrier features will be included in the trace results. Traversability barriers are optional even if they have been preset in the subnetwork definition.
| Boolean |
traversability_scope (Optional) | The type of traversability to enforce. Traversability scope dictates whether traversability is enforced at junctions, edges, or both. For example, if a condition barrier is defined to stop the trace if Device Status is equal to Open and traversability scope is set to edges only, the trace will not stop—even if it encounters an open device—because Device Status is only applicable to junctions. In other words, this parameter indicates to the trace whether to ignore junctions, edges, or both.
| String |
propagators [[Attribute, Substitution Attribute, Function, Operator, Value, Propagated Attribute],...] (Optional) |
Specifies the network attributes to propagate as well as how that propagation will occur during a trace. Propagated class attributes denote the key values on subnetwork controllers that are disseminated to the rest of the features in the subnetwork. For example, in an electric distribution model, you can propagate the phase value. Propagators components are as follows:
The propagators function value options are as follows:
The propagators operator value options are as follows:
Learn more about bitwise operators Note:This parameter is only available via Python. | Value Table |
update_structure_features (Optional) | Specifies whether the update subnetwork process will update the supported subnetwork name attribute for structure network containers.
Note:This parameter requires Utility Network Version 4 or later. | Boolean |
update_container_features (Optional) | Specifies whether the update subnetwork process will update the supported subnetwork name for domain network containers.
Note:This parameter requires Utility Network Version 4 or later. | Boolean |
edit_mode_for_default_version (Optional) | Specifies the edit mode for subnetwork updates on the default version and with file geodatabases.
Note:This parameter requires Utility Network Version 4 or later. | String |
edit_mode_for_named_version (Optional) | Specifies the edit mode for subnetwork updates on a named version.
Note:This parameter requires Utility Network Version 4 or later and is only applicable to enterprise geodatabases. | String |
valid_junctions [valid_junctions,...] (Optional) | The asset group/asset type pairs identified as valid junctions for the subnetwork. Note:This parameter requires Utility Network Version 4 or later. | String |
valid_junction_objects [valid_junction_objects,...] (Optional) | The asset group/asset type pairs identified as valid junction objects for the subnetwork. Note:This parameter requires Utility Network Version 4 or later. | String |
valid_junction_object_subnetwork_controller [valid_junction_object_subnetwork_controller,...] (Optional) | The asset group/asset type pairs identified as valid junction object subnetwork controllers for the subnetwork. Note:This parameter requires Utility Network Version 4 or later. | String |
valid_edge_objects [valid_edge_objects,...] (Optional) | The asset group/asset type pairs identified as valid edge objects for the subnetwork. Note:This parameter requires Utility Network Version 4 or later. | String |
manage_subnetwork_isdirty (Optional) | Specifies whether the Is dirty attribute in the subnetworks table will be managed by the update subnetwork operation. If no subnetwork controllers are defined for the tier, this parameter uses the default option NOT_MANAGE.
Note:This parameter requires Utility Network Version 5 or later. | Boolean |
include_containers (Optional) | Specifies whether the container features and objects will be included in the trace results.
This parameter requires Utility Network Version 5 or later. | Boolean |
include_content (Optional) | Specifies whether the trace will return content of containers in the results.
This parameter requires Utility Network Version 5 or later. | Boolean |
include_structures (Optional) | Specifies whether structure features and objects will be included in the trace results.
This parameter requires Utility Network Version 5 or later. | Boolean |
validate_locatability (Optional) | Specifies whether an error will be returned during a trace or update subnetwork operation if nonspatial junction or edge objects are encountered without the necessary containment, attachment, or connectivity association in their association hierarchy of the traversed objects. This option ensures that nonspatial objects returned by a trace or update subnetwork operation can be located through an association with features or other locatable objects.
Note:This parameter requires Utility Network Version 5 or later. | Boolean |
Derived Output
Name | Explanation | Data Type |
out_utility_network | The updated input utility network. | Utility Network |
Code sample
This example sets the subnetwork definition in a domain named ElectricDistribution.
'''****************************************************************************
Name: SetSubnetworkDefinition.py
Description: This script sets the subnetwork definition for a tier in a Utility Network
Created by: Esri
****************************************************************************'''
# Import required modules
import arcpy
# Set local variables
in_utility_network = "ElectricDistribution"
domain_network = "ElecDist"
tier_name = "Medium Voltage"
support_disjoint_subnetwork = "SUPPORT_DISJOINT"
valid_devices = "'CircuitBreaker/Unknown';'CircuitBreaker/Air powered';'NetworkProtector/Unknown';'NetworkProtector/NetworkProtector';'Transformer/Unknown';'Transformer/Buck boost';'Transformer/Single-phase overhead';'Transformer/Single-phase padmounted';'Transformer/Three-phase padmounted';'Transformer/Power';'Transformer/Step';'Transformer/Vault'"
valid_subnetwork_controller = "'CircuitBreaker/Unknown';'CircuitBreaker/Air powered'"
valid_lines = "'Busbar/Unknown';'Busbar/Busbar';'Connector/Unknown';'Connector/Connector';'LowVoltage/Unknown';'LowVoltage/Overhead';'LowVoltage/Underground';'MediumVoltage/Unknown';'MediumVoltage/Single-phase overhead';'MediumVoltage/Two-phase overhead';'MediumVoltage/Three-phase overhead';'MediumVoltage/Single-phase underground';'MediumVoltage/Two-phase underground';'MediumVoltage/Three-phase underground';'IsolatedNeutral/Unknown';'IsolatedNeutral/Concentric neutral';'IsolatedNeutral/Neutral';'SubTransmission/Unknown';'SubTransmission/Overhead';'SubTransmission/Underground'"
aggregated_line = "'Busbar/Unknown';'Busbar/Busbar';'MediumVoltage/Unknown';'MediumVoltage/Single-phase overhead';'MediumVoltage/Two-phase overhead';'MediumVoltage/Three-phase overhead';'MediumVoltage/Single-phase underground';'MediumVoltage/Two-phase underground';'MediumVoltage/Three-phase underground'"
diagram_template = "Basic"
summaries = ""
condition_barriers = "'Device Status' IS_EQUAL_TO SPECIFIC_VALUE 'Opened' #"
function_barriers = ""
include_barriers = "INCLUDE_BARRIERS"
traversability_scope = "BOTH_JUNCTIONS_AND_EDGES"
propagators = ""
# Run the SetSubnetworkDefinition tool
arcpy.SetSubnetworkDefinition_un(in_utility_network,
domain_network,
tier_name,
support_disjoint_subnetwork,
valid_devices,
valid_subnetwork_controller,
valid_lines,
aggregated_line,
diagram_template,
summaries,
condition_barriers,
function_barriers,
include_barriers,
traversability_scope,
propagators)
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes