Set Subnetwork Definition (Utility Network)

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 run on the subnetwork.

Learn more about setting the subnetwork definition

Learn more about subnetwork management

Learn more about tracing utility networks

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 run 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 to run.
      • All other sessions connected to the default version are blocked from running validate or enable operations during the enable operation.
  • When defining summaries and creating the summary attribute field for the Summaries parameter, the following matrix of valid field types can be used to define the field type based on the specified function:

    Matrix of valid field types for the summary attribute field based on the specified function

Parameters

LabelExplanationData Type
Input 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 will support 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 parameter is only available for tiers in domain networks with a partitioned tier definition. This parameter is checked for tiers in a domain network with a hierarchical tier definition to support disjoint subnetworks.

  • Checked—The input tier will support disjoint subnetworks.
  • Unchecked—The input tier will not support disjoint subnetworks. This is the default except as noted.

Boolean
Valid Devices
(Optional)

The asset group/asset type pairs identified as valid devices for the subnetwork.

String
Valid Device Subnetwork Controllers
(Optional)

The asset group/asset type pairs identified as valid device subnetwork controllers in the subnetwork.

String
Valid Lines
(Optional)

The asset group/asset type pairs identified as valid lines for the subnetwork.

String
Aggregated Lines For SubnetLine Feature Class
(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
Subnetwork Diagram Templates
(Optional)

The templates that will be used to generate subnetwork system diagrams for each subnetwork.

String
Summaries
(Optional)

Sets the summary attribute field to store function results when inserting or updating SubnetLine features.

Summaries components are as follows:

  • Function—Choose from a number of calculation functions.
  • Attribute—Filter by any network attribute defined in the system.
  • Filter Name—Filter the function results by attribute name.
  • Filter Operator—Choose from a number of operators.
  • Filter Type—Choose from a number of filter types.
  • Filter Value—Provide a specific value for the input filter attribute.
  • Summary Attribute—The field in the SubnetLine feature class that will persist the function result. Depending on the selected function and network attribute type, only the applicable type of user-added subnetwork attributes will be valid for this parameter. If a field to store the summary result does not exist in the SubnetLine feature class, the Add Field tool can be used to create one. A field can only support the result of one summary; each summary requires its own field in the SubnetLine feature class. See the Usages section for a matrix of valid field types for the summary attribute field based on the specified function.

The summaries Function value options are as follows:

  • Minimum—The minimum of the input values.
  • Maximum—The maximum of the input values.
  • Add—The sum of the input values.
  • Average—The average of the input values.
  • Count—The number of features.
  • Subtract—The difference between the input values.

    Subnetwork controllers and loops trace types do not support the subtract function.

For example, the starting point feature has a value of 20. The next feature has a value of 30. If you use the minimum function, the result is 20, maximum is 30, add is 50, average is 25, count is 2, and subtract is -10.

The summaries Filter Operator value options are as follows:

  • Is equal to—The attribute is equal to the value.
  • Does not equal—The attribute is not equal to the value.
  • Is greater than—The attribute is greater than the value.
  • Is greater than or equal to—The attribute is greater than or equal to the value.
  • Is less than—The attribute is less than the value.
  • Is less than or equal to—The attribute is less than or equal to the value.
  • Includes the values—A bitwise AND operation in which all bits in the value are present in the attribute (bitwise AND == value).
  • Does not include the values—A bitwise AND operation in which not all of the bits in the value are present in the attribute (bitwise AND != value).
  • Includes any—A bitwise AND operation in which at least one bit in the value is present in the attribute (bitwise AND == True).
  • Does not include any—A bitwise AND operation in which none of the bits in the value are present in the attribute (bitwise AND == False).

The summaries Filter Type value options are as follows:

  • Specific Value—Filter by a specific value.
  • Network Attribute—Filter by a network attribute.

  • AverageThe average of the input values will be calculated.
  • CountThe number of features will be identified.
  • MaxThe maximum of the input values will be identified.
  • MinThe minimum of the input values will be identified.
  • AddThe sum of the input values will be calculated.
  • SubtractThe difference of the input values will be calculated. Subnetwork controllers and loops trace types do not support the subtract function.
  • Is equal toThe attribute is equal to the value.
  • Does not equalThe attribute is not equal to the value.
  • Is greater thanThe attribute is greater than the value.
  • Is greater than or equal toThe attribute is greater than or equal to the value.
  • Is less thanThe attribute is less than the value.
  • Is less than or equal toThe attribute is less than or equal to the value.
  • Includes the values (bitwise AND equals the value)A bitwise AND operation in which all bits in the value are present in the attribute (bitwise AND == value).
  • Does not include the values (bitwise AND does not equal the value)A bitwise AND operation in which not all of the bits in the value are present in the attribute (bitwise AND != value).
  • Includes any (bitwise AND equals True)A bitwise AND operation in which at least one bit in the value is present in the attribute (bitwise AND == True).
  • Does not include any (bitwise AND equals False)A bitwise AND operation in which none of the bits in the value are present in the attribute (bitwise AND == False).
  • Specific valueFilter by a specific value.
  • Network attributeFilter by a network attribute.
Value Table
Condition Barriers
(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:

  • Name—Filter by any network attribute defined in the system.
  • Operator—Choose from a number of operators.
  • Type—Choose a specific value or network attribute from the value that is specified in the Name parameter.
  • Value—Provide a specific value for the input attribute type that would cause termination based on the operator value.
  • Combine using—Set this value if you have multiple attributes to add. You can combine them using an And or an Or condition.

The condition barriers Operator value options are as follows:

  • Is equal to—The attribute is equal to the value.
  • Does not equal—The attribute is not equal to the value.
  • Is greater than—The attribute is greater than the value.
  • Is greater than or equal to—The attribute is greater than or equal to the value.
  • Is less than—The attribute is less than the value.
  • Is less than or equal to—The attribute is less than or equal to the value.
  • Includes the values—A bitwise AND operation in which all bits in the value are present in the attribute (bitwise AND == value).
  • Does not include the values—A bitwise AND operation in which not all of the bits in the value are present in the attribute (bitwise AND != value).
  • Includes any—A bitwise AND operation in which at least one bit in the value is present in the attribute (bitwise AND == True).
  • Does not include any—A bitwise AND operation in which none of the bits in the value are present in the attribute (bitwise AND == False).

The condition barriers Type value options are as follows:

  • Specific Value—Filter by a specific value.
  • Network Attribute—Filter by a network attribute.

  • Is equal toThe attribute is equal to the value.
  • Does not equalThe attribute is not equal to the value.
  • Is greater thanThe attribute is greater than the value.
  • Is greater than or equal toThe attribute is greater than or equal to the value.
  • Is less thanThe attribute is less than the value.
  • Is less than or equal toThe attribute is less than or equal to the value.
  • Includes the values (bitwise AND equals the value)A bitwise AND operation in which all bits in the value are present in the attribute (bitwise AND == value).
  • Does not include the values (bitwise AND does not equal the value)A bitwise AND operation in which not all of the bits in the value are present in the attribute (bitwise AND != value).
  • Includes any (bitwise AND equals True)A bitwise AND operation in which at least one bit in the value is present in the attribute (bitwise AND == True).
  • Does not include any (bitwise AND equals False)A bitwise AND operation in which none of the bits in the value are present in the attribute (bitwise AND == False).
  • Specific valueFilter by a specific value.
  • Network attributeFilter by a network attribute.
  • AndCombine the condition barriers.
  • OrUse if either condition barrier is met.
Value Table
Function Barriers
(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:

  • Function—Choose from a number of calculation functions.
  • Attribute—Filter by any network attribute defined in the system.
  • Operator—Choose from a number of operators.
  • Value—Provide a specific value for the input attribute type that, if discovered, will cause the termination.
  • Use Local Values—Calculate values in each direction as opposed to an overall global value, for example, a function barrier that is calculating the sum of Shape length in which the trace terminates if the value is greater than or equal to 4. In the global case, after you have traversed two edges with a value of 2, you have already reached a Shape length sum of 4, so the trace stops. If local values are used, the local values along each path change, and the trace continues.
    • Checked—Local values will be used.
    • Unchecked—Global values will be used. This is the default.

The function barrier Function value options are as follows:

  • Minimum—The minimum of the input values.
  • Maximum—The maximum of the input values.
  • Add—The sum of the input values.
  • Average—The average of the input values.
  • Count—The number of features.
  • Subtract—The difference between the input values.

    Subnetwork controllers and loops trace types do not support the subtract function.

For example, the starting point feature has a value of 20. The next feature has a value of 30. If you use the minimum function, the result is 20, maximum is 30, add is 50, average is 25, count is 2, and subtract is -10.

The function barrier Operator value options are as follows:

  • Is equal to—The attribute is equal to the value.
  • Does not equal—The attribute is not equal to the value.
  • Is greater than—The attribute is greater than the value.
  • Is greater than or equal to—The attribute is greater than or equal to the value.
  • Is less than—The attribute is less than the value.
  • Is less than or equal to—The attribute is less than or equal to the value.
  • Includes the values—A bitwise AND operation in which all bits in the value are present in the attribute (bitwise AND == value).
  • Does not include the values—A bitwise AND operation in which not all of the bits in the value are present in the attribute (bitwise AND != value).
  • Includes any—A bitwise AND operation in which at least one bit in the value is present in the attribute (bitwise AND == True).
  • Does not include any—A bitwise AND operation in which none of the bits in the value are present in the attribute (bitwise AND == False).

  • AverageThe average of the input values will be calculated.
  • CountThe number of features will be identified.
  • MaxThe maximum of the input values will be identified.
  • MinThe minimum of the input values will be identified.
  • AddThe sum of the input values will be calculated.
  • SubtractThe difference in the input values will be calculated.Subnetwork controllers and loops trace types do not support the subtract function.
  • Is equal toThe attribute is equal to the value.
  • Does not equalThe attribute is not equal to the value.
  • Is greater thanThe attribute is greater than the value.
  • Is greater than or equal toThe attribute is greater than or equal to the value.
  • Is less thanThe attribute is less than the value.
  • Is less than or equal toThe attribute is less than or equal to the value.
  • Includes the values (bitwise AND equals the value)A bitwise AND operation in which all bits in the value are present in the attribute (bitwise AND == value).
  • Does not include the values (bitwise AND does not equal the value)A bitwise AND operation in which not all of the bits in the value are present in the attribute (bitwise AND != value).
  • Includes any (bitwise AND equals True)A bitwise AND operation in which at least one bit in the value is present in the attribute (bitwise AND == True).
  • Does not include any (bitwise AND equals False)A bitwise AND operation in which none of the bits in the value are present in the attribute (bitwise AND == False).
Value Table
Include Barrier Features
(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. This parameter does not apply to device features with terminals.

  • Checked—Traversability barrier features will be included in the trace results. This is the default.
  • Unchecked—Traversability barrier features will not be included in the trace results.

Boolean
Apply Traversability To
(Optional)

Specifies the type of traversability that will be enforced. Traversability scope determines whether traversability will be 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.

  • Both junctions and edges—Traversability will be applied to both junctions and edges.
  • Junctions only—Traversability will be applied to junctions only.
  • Edges only—Traversability will be applied to edges only.

  • Both junctions and edgesTraversability will be applied to both junctions and edges. This is the default.
  • Junctions onlyTraversability will be applied to junctions only.
  • Edges onlyTraversability will be applied to edges only.
String
Propagators
(Optional)
  • Propagate BITWISE_ANDThe values of one feature to the next will be compared.
  • Propagate MINGet the minimum value.
  • Propagate MAXGet the maximum value.
  • Is equal toThe attribute is equal to the value.
  • Does not equalThe attribute is not equal to the value.
  • Is greater thanThe attribute is greater than the value.
  • Is greater than or equal toThe attribute is greater than or equal to the value.
  • Is less thanThe attribute is less than the value.
  • Is less than or equal toThe attribute is less than or equal to the value.
  • Includes the values (bitwise AND equals the value)A bitwise AND operation in which all bits in the value are present in the attribute (bitwise AND == value).
  • Does not include the values (bitwise AND does not equal the value)A bitwise AND operation in which not all of the bits in the value are present in the attribute (bitwise AND != value).
  • Includes any (bitwise AND equals True)A bitwise AND operation in which at least one bit in the value is present in the attribute (bitwise AND == True).
  • Does not include any (bitwise AND equals False)A bitwise AND operation in which none of the bits in the value are present in the attribute (bitwise AND == False).
Value Table
Update Structure Network Containers
(Optional)

Specifies whether the update subnetwork process will update the supported subnetwork name attribute for structure network containers.

  • Checked—The structure network containers will be updated. This is the default.
  • Unchecked—The structure network containers will not be updated.

This parameter requires a Utility Network Version value of 4 or later.

Boolean
Update Domain Network Containers
(Optional)

Specifies whether the update subnetwork process will update the supported subnetwork name for domain network containers.

  • Checked—The domain network containers will be updated. This is the default.
  • Unchecked—The domain network containers will not be updated.

This parameter requires a Utility Network Version value of 4 or later.

Boolean
Edit Mode For Default Version
(Optional)

Specifies the edit mode that will be used for subnetwork updates on the default version and with file and mobile geodatabases.

  • Without eventingEventing will not be used for subnetwork updates on the default version or in a file or mobile geodatabase. This edit mode updates the subnetwork name and propagated values in place. This is the default.
  • With eventingEventing will be used for subnetwork updates on the default version and in a file or mobile geodatabase. This edit mode executes geodatabase behavior (for example, attribute rules, editor tracking, and so on) when the subnetwork is updated and updates the subnetwork name and propagated values for all applicable features and objects.
Note:

This parameter requires a Utility Network Version value of 4 or later.

String
Edit Mode For Named Version
(Optional)

Specifies the edit mode that will be used for subnetwork updates on a named version.

  • Without eventingEventing will not be used for subnetwork updates on named versions. This edit mode updates the subnetwork name and propagated values in place for features and objects edited in the version. This is the default.
  • With eventingEventing will be used for subnetwork updates on named versions. This edit mode executes geodatabase behavior (for example, attribute rules, editor tracking, and so on) when the subnetwork is updated and updates the subnetwork name and propagated values for all applicable features and objects.
Note:

This parameter requires a Utility Network Version value of 4 or later and is only applicable to enterprise geodatabases.

String
Valid Junctions
(Optional)

The asset group/asset type pairs identified as valid junctions for the subnetwork.

Note:

This parameter requires a Utility Network Version value of 4 or later.

String
Valid Junction Objects
(Optional)

The asset group/asset type pairs identified as valid junction objects for the subnetwork.

Note:

This parameter requires a Utility Network Version value of 4 or later.

String
Valid Junction Object Subnetwork Controllers
(Optional)

The asset group/asset type pairs identified as valid junction object subnetwork controllers for the subnetwork.

Note:

This parameter requires a Utility Network Version value of 4 or later.

String
Valid Edge Objects
(Optional)

The asset group/asset type pairs identified as valid edge objects for the subnetwork.

Note:

This parameter requires a Utility Network Version value of 4 or later.

String
Manage IsDirty
(Optional)

Specifies whether the Is dirty attribute in the subnetworks table will be managed by the update subnetwork operation.

  • Checked—The Is dirty attribute will be managed by the update subnetwork operation. This is the default.
  • Unchecked—The Is dirty attribute will not be managed by the update subnetwork operation.

This parameter requires a Utility Network Version value of 5 or later.

Boolean
Include Containers
(Optional)

Specifies whether the container features and objects will be included in the trace results.

  • Checked—Container features and objects will be included in the trace results.
  • Unchecked—Container features and objects will not be included in the trace results. This is the default.

This parameter requires a Utility Network Version value of 5 or later.

Boolean
Include Content
(Optional)

Specifies whether the trace will return content of containers in the results.

  • Checked—Content of container features and objects will be included in the trace results.
  • Unchecked—Content of container features and objects will not be included in the trace results. This is the default.

This parameter requires a Utility Network Version value of 5 or later.

Boolean
Include Structures
(Optional)

Specifies whether structure features and objects will be included in the trace results.

  • Checked—Structure features and objects will be included in the trace results.
  • Unchecked—Structure features and objects will not be included in the trace results. This is the default.

This parameter requires a Utility Network Version value of 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 parameter ensures that nonspatial objects returned by a trace or update subnetwork operation can be located through an association with features or other locatable objects.

  • Checked—An error will be returned if nonspatial junction or edge objects are encountered without the necessary containment, attachment, or connectivity association in their association hierarchy of the traversed objects.
  • Unchecked—The trace will not check for unlocatable objects and will return results regardless of whether unlocatable objects are present in the association hierarchy of the traversed objects. This is the default.

Note:

This parameter requires a Utility Network Version value of 5 or later.

Boolean

Derived Output

LabelExplanationData Type
Updated Utility Network

The updated input utility network.

Utility Network

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})
NameExplanationData 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 will support 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 parameter is only available for tiers in domain networks with a partitioned tier definition. This parameter is set to SUPPORT_DISJOINT for tiers in a domain network with a hierarchical tier definition to support disjoint subnetworks.

  • SUPPORT_DISJOINT The input tier will support disjoint subnetworks.
  • NO_DISJOINTThe input tier will not support disjoint subnetworks. This is the default except as noted.
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:

  • Function—Choose from a number of calculation functions.
  • Attribute—Filter by any network attribute defined in the system.
  • Filter Name—Filter the function results by attribute name.
  • Filter Operator—Choose from a number of operators.
  • Filter Type—Choose from a number of filter types.
  • Filter Value—Provide a specific value for the input filter attribute.
  • Summary Attribute—The field in the SubnetLine feature class that will persist the function result. Depending on the selected function and network attribute type, only the applicable type of user-added subnetwork attributes will be valid for this parameter. If a field to store the summary result does not exist in the SubnetLine feature class, the Add Field tool can be used to create one. A field can only support the result of one summary; each summary requires its own field in the SubnetLine feature class. See the Usages section for a matrix of valid field types for the summary attribute field based on the specified function.

The summaries Function value options are as follows:

  • AVERAGEThe average of the input values will be calculated.
  • COUNTThe number of features will be identified.
  • MAXThe maximum of the input values will be identified.
  • MINThe minimum of the input values will be identified.
  • ADDThe sum of the input values will be calculated.
  • SUBTRACTThe difference of the input values will be calculated. Subnetwork controllers and loops trace types do not support the subtract function.

The summaries Filter Operator value options are as follows:

  • IS_EQUAL_TOThe attribute is equal to the value.
  • DOES_NOT_EQUALThe attribute is not equal to the value.
  • IS_GREATER_THANThe attribute is greater than the value.
  • IS_GREATER_THAN_OR_EQUAL_TOThe attribute is greater than or equal to the value.
  • IS_LESS_THANThe attribute is less than the value.
  • IS_LESS_THAN_OR_EQUAL_TOThe attribute is less than or equal to the value.
  • INCLUDES_THE_VALUESA bitwise AND operation in which all bits in the value are present in the attribute (bitwise AND == value).
  • DOES_NOT_INCLUDE_THE_VALUESA bitwise AND operation in which not all of the bits in the value are present in the attribute (bitwise AND != value).
  • INCLUDES_ANYA bitwise AND operation in which at least one bit in the value is present in the attribute (bitwise AND == True).
  • DOES_NOT_INCLUDE_ANYA bitwise AND operation in which none of the bits in the value are present in the attribute (bitwise AND == False).

The summaries Filter Type value options are as follows:

  • SPECIFIC_VALUEFilter by a specific value.
  • NETWORK_ATTRIBUTEFilter by a network attribute.

Learn more about bitwise operators

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:

  • Name—Filter by any network attribute defined in the system.
  • Operator—Choose from a number of operators.
  • Type—Choose a specific value or network attribute from the value that is specified in the name parameter.
  • Value—Provide a specific value of the input attribute type that would cause termination based on the operator value.
  • Combine Using—Set this value if you have multiple attributes to add. You can combine them using an And or an Or condition.

The condition barriers Operator values are as follows:

  • IS_EQUAL_TOThe attribute is equal to the value.
  • DOES_NOT_EQUALThe attribute is not equal to the value.
  • IS_GREATER_THANThe attribute is greater than the value.
  • IS_GREATER_THAN_OR_EQUAL_TOThe attribute is greater than or equal to the value.
  • IS_LESS_THANThe attribute is less than the value.
  • IS_LESS_THAN_OR_EQUAL_TOThe attribute is less than or equal to the value.
  • INCLUDES_THE_VALUESA bitwise AND operation in which all bits in the value are present in the attribute (bitwise AND == value).
  • DOES_NOT_INCLUDE_THE_VALUESA bitwise AND operation in which not all of the bits in the value are present in the attribute (bitwise AND != value).
  • INCLUDES_ANYA bitwise AND operation in which at least one bit in the value is present in the attribute (bitwise AND == True).
  • DOES_NOT_INCLUDE_ANYA bitwise AND operation in which none of the bits in the value are present in the attribute (bitwise AND == False).

Learn more about bitwise operators

The condition barriers Type value options are as follows:

  • SPECIFIC_VALUEFilter by a specific value.
  • NETWORK_ATTRIBUTEFilter by a network attribute.

The Combine Using values are as follows:

  • ANDCombine the condition barriers.
  • ORUse if either condition barrier is met.

Learn more about using multiple conditional expressions

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:

  • Function—Choose from a number of calculation functions.
  • Attribute—Filter by any network attribute defined in the system.
  • Operator—Choose from a number of operators.
  • Value—Provide a specific value of the input attribute type that, if discovered, will cause the termination.
  • Use Local Values—Calculate values in each direction as opposed to an overall global value, for example, for a function barrier that is calculating the sum of a shape length in which the trace terminates if the value is greater than or equal to 4. In the global case, after you have traversed two edges with a value of 2, you have already reached a shape length sum of 4, so the trace stops. If local values are used, the local values along each path change, and the trace continues.

The function barrier Function value options are as follows:

  • AVERAGEThe average of the input values will be calculated.
  • COUNTThe number of features will be identified.
  • MAXThe maximum of the input values will be identified.
  • MINThe minimum of the input values will be identified.
  • ADDThe sum of the input values will be calculated.
  • SUBTRACTThe difference in the input values will be calculated.Subnetwork controllers and loops trace types do not support the subtract function.

The function barrier Operator value options are as follows:

  • IS_EQUAL_TOThe attribute is equal to the value.
  • DOES_NOT_EQUALThe attribute is not equal to the value.
  • IS_GREATER_THANThe attribute is greater than the value.
  • IS_GREATER_THAN_OR_EQUAL_TOThe attribute is greater than or equal to the value.
  • IS_LESS_THANThe attribute is less than the value.
  • IS_LESS_THAN_OR_EQUAL_TOThe attribute is less than or equal to the value.
  • INCLUDES_THE_VALUESA bitwise AND operation in which all bits in the value are present in the attribute (bitwise AND == value).
  • DOES_NOT_INCLUDE_THE_VALUESA bitwise AND operation in which not all of the bits in the value are present in the attribute (bitwise AND != value).
  • INCLUDES_ANYA bitwise AND operation in which at least one bit in the value is present in the attribute (bitwise AND == True).
  • DOES_NOT_INCLUDE_ANYA bitwise AND operation in which none of the bits in the value are present in the attribute (bitwise AND == False).

Learn more about bitwise operators

The function barrier Use Local Values value options are as follows:

  • TRUEUse local values.
  • FALSEUse global values. This is the default.
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.

  • INCLUDE_BARRIERSTraversability barriers will be included in the trace results. This is the default.
  • EXCLUDE_BARRIERSTraversability barriers will not be included in the trace results.
Boolean
traversability_scope
(Optional)

The type of traversability that will be applied. Traversability scope determines whether traversability is applied 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.

  • BOTH_JUNCTIONS_AND_EDGESTraversability will be applied to both junctions and edges. This is the default.
  • JUNCTIONS_ONLYTraversability will be applied to junctions only.
  • EDGES_ONLYTraversability will be applied to edges only.
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:

  • Attribute—Filter by any network attribute defined in the system.
  • Substitution Attribute—Use a substituted value instead of bitset network attribute values. Substitutions are encoded based on the number of bits in the network attribute being propagated. A substitution is a mapping of each bit in a phase to another bit. For example, for Phase AC, one substitution could map bit A to B and bit C to null. In this example the substitution for 1010 (Phase AC) is 0000-0010-0000-0000 (512). The substitution captures the mapping so you know that Phase A was mapped to B and Phase C was mapped to null and not the other way around (that is, Phase A was not mapped to null and Phase C was not mapped to B).
  • Function—Choose from a number of calculation functions.
  • Operator—Choose from a number of operators.
  • Value—Provide a specific value for the input attribute type that would cause termination based on the operator value.
  • Propagated Attribute—The name of the field in the network class that is used to store the calculated propagated values. The field type should be the same as the field type of the network attribute chosen for the Attribute value.

The propagators Function value options are as follows:

  • PROPAGATED_BITWISE_ANDThe values of one feature to the next will be compared.
  • PROPAGATED_MINGet the minimum value.
  • PROPAGATED_MAXGet the maximum value.

The propagators Operator value options are as follows:

  • IS_EQUAL_TOThe attribute is equal to the value.
  • DOES_NOT_EQUALThe attribute is not equal to the value.
  • IS_GREATER_THANThe attribute is greater than the value.
  • IS_GREATER_THAN_OR_EQUAL_TOThe attribute is greater than or equal to the value.
  • IS_LESS_THANThe attribute is less than the value.
  • IS_LESS_THAN_OR_EQUAL_TOThe attribute is less than or equal to the value.
  • INCLUDES_THE_VALUESA bitwise AND operation in which all bits in the value are present in the attribute (bitwise AND == value).
  • DOES_NOT_INCLUDE_THE_VALUESA bitwise AND operation in which not all of the bits in the value are present in the attribute (bitwise AND != value).
  • INCLUDES_ANYA bitwise AND operation in which at least one bit in the value is present in the attribute (bitwise AND == True).
  • DOES_NOT_INCLUDE_ANYA bitwise AND operation in which none of the bits in the value are present in the attribute (bitwise AND == False).

Learn more about bitwise operators

Note:

This parameter is only available in Python.

Value Table
update_structure_features
(Optional)

Specifies whether the update subnetwork process will update the supported subnetwork name attribute for structure network containers.

  • UPDATEThe structure network containers will be updated. This is the default.
  • NOT_UPDATEThe structure network containers will not be updated.
Note:

This parameter requires a Utility Network Version value of 4 or later.

Boolean
update_container_features
(Optional)

Specifies whether the update subnetwork process will update the supported subnetwork name for domain network containers.

  • UPDATEThe domain network containers will be updated. This is the default.
  • NOT_UPDATEThe domain network containers will not be updated.
Note:

This parameter requires a Utility Network Version value of 4 or later.

Boolean
edit_mode_for_default_version
(Optional)

Specifies the edit mode that will be used for subnetwork updates on the default version and with file and mobile geodatabases.

  • WITHOUT_EVENTINGEventing will not be used for subnetwork updates on the default version or in a file or mobile geodatabase. This edit mode updates the subnetwork name and propagated values in place. This is the default.
  • WITH_EVENTINGEventing will be used for subnetwork updates on the default version and in a file or mobile geodatabase. This edit mode executes geodatabase behavior (for example, attribute rules, editor tracking, and so on) when the subnetwork is updated and updates the subnetwork name and propagated values for all applicable features and objects.
Note:

This parameter requires a Utility Network Version value of 4 or later.

String
edit_mode_for_named_version
(Optional)

Specifies the edit mode that will be used for subnetwork updates on a named version.

  • WITHOUT_EVENTINGEventing will not be used for subnetwork updates on named versions. This edit mode updates the subnetwork name and propagated values in place for features and objects edited in the version. This is the default.
  • WITH_EVENTINGEventing will be used for subnetwork updates on named versions. This edit mode executes geodatabase behavior (for example, attribute rules, editor tracking, and so on) when the subnetwork is updated and updates the subnetwork name and propagated values for all applicable features and objects.
Note:

This parameter requires a Utility Network Version value of 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 a Utility Network Version value of 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 a Utility Network Version value of 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 a Utility Network Version value of 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 a Utility Network Version value of 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 NOT_MANAGE option.

  • MANAGEThe Is dirty attribute will be managed by the update subnetwork operation. This is the default except as noted.
  • NOT_MANAGEThe Is dirty attribute will not be managed by the update subnetwork operation.
Note:

This parameter requires a Utility Network Version value of 5 or later.

Boolean
include_containers
(Optional)

Specifies whether the container features and objects will be included in the trace results.

  • INCLUDE_CONTAINERS Container features and objects will be included in the trace results.
  • EXCLUDE_CONTAINERS Container features and objects will not be included in the trace results. This is the default.

This parameter requires a Utility Network Version value of 5 or later.

Boolean
include_content
(Optional)

Specifies whether the trace will return content of containers in the results.

  • INCLUDE_CONTENT Content of container features and objects will be included in the trace results.
  • EXCLUDE_CONTENT Content of container features and objects will not be included in the trace results. This is the default.

This parameter requires a Utility Network Version value of 5 or later.

Boolean
include_structures
(Optional)

Specifies whether structure features and objects will be included in the trace results.

  • INCLUDE_STRUCTURES Structure features and objects will be included in the trace results.
  • EXCLUDE_STRUCTURES Structure features and objects will not be included in the trace results. This is the default.

This parameter requires a Utility Network Version value of 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.

  • VALIDATE_LOCATABILITYAn error will be returned if nonspatial junction or edge objects are encountered without the necessary containment, attachment, or connectivity association in their association hierarchy of the traversed objects.
  • DO_NOT_VALIDATE_LOCATABILITYThe trace will not check for unlocatable objects and will return results regardless of whether unlocatable objects are present in the association hierarchy of the traversed objects. This is the default.
Note:

This parameter requires a Utility Network Version value of 5 or later.

Boolean

Derived Output

NameExplanationData Type
out_utility_network

The updated input utility network.

Utility Network

Code sample

SetSubnetworkDefinition example (stand-alone script)

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.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)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics