|
| 1 | +# Create load report |
| 2 | + |
| 3 | +Create a simple electric distribution report that displays the count of customers and total load per phase by tracing downstream from a given point. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +## Use case |
| 8 | + |
| 9 | +You can use a load report to display the customers per phase as well as the load per phase based on a chosen starting point in a utility network. Load reports are used for electric load restoration and balancing. |
| 10 | + |
| 11 | +## How to use the sample |
| 12 | + |
| 13 | +Select phases to be included in the report. Press the "Run Report" button to initiate a downstream trace on the network and create a load report. Pressing "Run Report" again will generate a new load report. Deselect all phases and press the "Reset" button to clear the report. |
| 14 | + |
| 15 | +## How it works |
| 16 | + |
| 17 | +1. Create a `ServiceGeodatabase` with a feature service URL. |
| 18 | +2. Create and load a `UtilityNetwork` using the service geodatabase, then get an asset type, tier, network attributes, and category by their names. |
| 19 | +3. Create a `UtilityElement` from the asset type to use as the starting location for the trace. |
| 20 | +4. Create a `UtilityTraceConfiguration` from the utility tier. |
| 21 | +5. Create a `UtilityCategoryComparison` where "ServicePoint" category exists. |
| 22 | +6. Reset the `functions` property of the trace configuration with a new `UtilityTraceFunction` adding a "Service Load" network attribute where this category comparison applies. This will limit the function results. |
| 23 | +7. Set `outputCondition` with the category comparison to limit the element results. |
| 24 | +8. Get a base condition from the utility tier's default trace configuration. |
| 25 | +9. Create `UtilityTraceParameters` passing in `downstream` utility trace type and the default starting location. Set its `traceConfiguration` property with the trace configuration above. |
| 26 | +10. Populate a list of phases using the network attribute's `codedValues` property. |
| 27 | +11. When the "Run Report" button is tapped, run a trace for every checked `CodedValue` in the phases list. Do this by creating a `UtilityTraceOrCondition` with the base condition and a `UtilityNetworkAttributeComparison` where the "Phases Current" network attribute does not include the coded value. |
| 28 | +12. Display the count of "Total Customers" using the `elements` property of the result, and the result of "Total Load" using the first and only output in `functionOutputs` property. |
| 29 | + |
| 30 | +## Relevant API |
| 31 | + |
| 32 | +* UtilityAssetType |
| 33 | +* UtilityCategoryComparison |
| 34 | +* UtilityDomainNetwork |
| 35 | +* UtilityElement |
| 36 | +* UtilityElementTraceResult |
| 37 | +* UtilityNetwork |
| 38 | +* UtilityNetworkAttribute |
| 39 | +* UtilityNetworkAttributeComparison |
| 40 | +* UtilityNetworkDefinition |
| 41 | +* UtilityNetworkSource |
| 42 | +* UtilityTerminal |
| 43 | +* UtilityTier |
| 44 | +* UtilityTraceConfiguration |
| 45 | +* UtilityTraceFunction |
| 46 | +* UtilityTraceParameters |
| 47 | +* UtilityTraceResult |
| 48 | +* UtilityTraceType |
| 49 | +* UtilityTraversability |
| 50 | + |
| 51 | +## About the data |
| 52 | + |
| 53 | +The [Naperville electrical](https://sampleserver7.arcgisonline.com/server/rest/services/UtilityNetwork/NapervilleElectric/FeatureServer) network feature service, hosted on ArcGIS Online (authentication required: this is handled within the sample code), contains a utility network used to run the subnetwork-based trace shown in this sample. |
| 54 | + |
| 55 | +## Additional information |
| 56 | + |
| 57 | +Using utility network on ArcGIS Enterprise 10.8 requires an ArcGIS Enterprise member account licensed with the [Utility Network user type extension](https://enterprise.arcgis.com/en/portal/latest/administer/windows/license-user-type-extensions.htm#ESRI_SECTION1_41D78AD9691B42E0A8C227C113C0C0BF). Please refer to the [utility network services documentation](https://enterprise.arcgis.com/en/server/latest/publish-services/windows/utility-network-services.htm). |
| 58 | + |
| 59 | +## Tags |
| 60 | + |
| 61 | +condition barriers, downstream trace, network analysis, subnetwork trace, trace configuration, traversability, upstream trace, utility network, validate consistency |
0 commit comments