Select to view content in your preferred language

Query Syntax for Condition Barriers in Tier Definition

33
1
9 hours ago
Rohanrajan
Emerging Contributor

arcpy.un.SetSubnetworkDefinition(
in_utility_network=r"",
domain_network="Water",
tier_name="Pressure Boundary",
support_disjoint_subnetwork="SUPPORT_DISJOINT",
valid_devices="Telemetry/Unknown;Telemetry/ClearWell;Telemetry/Tank;Telemetry/StandPipe;Telemetry/PumpStation;Telemetry/MeterStation;Telemetry/PressureRecorder;Telemetry/MotorizedValve;Hydrant/Unknown;Hydrant/Hydrant;Valve/Unknown;Valve/AirRelease;Valve/Altitude;Valve/BlowOff;Valve/Butterfly;Valve/Check;Valve/Gate;Valve/LevelControl;Valve/PostIndicator;Valve/PressureRegulator;Valve/RPZ;Valve/Pito;Valve/FireService_Val;Valve/PressureBoundary;Valve/Stub_Val;Valve/Abandoned_Open;Valve/Abandoned_Closed;Meters/Unknown;Meters/Meters",
valid_subnetwork_controller="Telemetry/PumpStation;Valve/Gate;Valve/PressureRegulator",
valid_lines="HydrantLead/Unknown;HydrantLead/HydrantLead;Laterals/Unknown;Laterals/Laterals;Main/Distribution;Main/FireService_Lead;Main/Stub;'Main/Wash Water';'Main/Settled Water';'Main/Filtered Water'",
aggregated_line="Main/Distribution;Main/FireService_Lead;Main/Stub;'Main/Wash Water';'Main/Settled Water';'Main/Filtered Water'",
diagram_template=None,
summaries=None,
condition_barriers="ValveStatus IS_EQUAL_TO SPECIFIC_VALUE 2 AND;'Asset group' IS_EQUAL_TO SPECIFIC_VALUE 3 AND;'Asset type' INCLUDES_THE_VALUES SPECIFIC_VALUE (3,6,7,10,11) #",
function_barriers=None,
include_barriers="INCLUDE_BARRIERS",
traversability_scope="BOTH_JUNCTIONS_AND_EDGES",
propagators=None,
update_structure_features="UPDATE",
update_container_features="UPDATE",
edit_mode_for_default_version="WITHOUT_EVENTING",
edit_mode_for_named_version="WITHOUT_EVENTING",
valid_junctions="Fitting/Unknown;Fitting/Bend;Fitting/Cross;Fitting/EndOfMain;Fitting/Tee;Fitting/Plug;Fitting/Reducer;Fitting/Sleeve;'Fitting/Plugged Tee';Fitting/Increaser;Fitting/Coupling;PipeHop/Unknown;PipeHop/PipeHop;Water_Net_Junctions/Water_Net_Junctions;MeterBox/Unknown;MeterBox/MeterBox",
valid_junction_objects=None,
valid_junction_object_subnetwork_controller=None,
valid_edge_objects=None,
manage_subnetwork_isdirty="NOT_MANAGE",
include_containers="INCLUDE_CONTAINERS",
include_content="INCLUDE_CONTENT",
include_structures="INCLUDE_STRUCTURES",
validate_locatability="DO_NOT_VALIDATE_LOCATABILITY"
)

condition_barriers="ValveStatus IS_EQUAL_TO SPECIFIC_VALUE 2 AND;'Asset group' IS_EQUAL_TO SPECIFIC_VALUE 3 AND;'Asset type' INCLUDES_THE_VALUES SPECIFIC_VALUE (3,6,7,10,11) #"

 

does this condition work like ValveStatus == 2 AND AssetGroup == 3 AND AssetType IN (3,6,7,10,11)

 

Any advice on this is much appreciated.

Thanks in advance

0 Kudos
1 Reply
RobertKrisher
Esri Regular Contributor

First

Instead of directly referencing asset groups or types in your subnetwork definition you should strongly consider creating a new network category, assigning it to the asset types, and referencing that in your subnetwork definition/traces. This makes it easier to maintain your subnetwork definitions (and trace configurations) without needing to memorize all the code.

Second

It should. You can always test it out by running the python in pro then opening the tool in your GP history. In this case I'd just swap out the condition barriers in the trace.

Third

Is that really what you want? You only want to treat certain types of closed devices as barriers? A closed device should be treated as a barrier regardless of what type of equipment it is.

0 Kudos