Skip to content

Commit a9c7dae

Browse files
changanxianCopilot
andauthored
cs/Implementing the utility network load report (#408)
* implement the utility load report * self-review update * Update lib/samples/create_load_report/create_load_report.dart Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add the error message. * remove the init value * review update. * review update * review update * review update * review update --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 0975890 commit a9c7dae

File tree

4 files changed

+554
-0
lines changed

4 files changed

+554
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
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+
![Image of create utility network load report](create_load_report.png)
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
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"category": "Utility Networks",
3+
"description": "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+
"ignore": false,
5+
"images": ["create_load_report.png"],
6+
"keywords": [
7+
"condition barriers",
8+
"downstream trace",
9+
"network analysis",
10+
"subnetwork trace",
11+
"trace configuration",
12+
"traversability",
13+
"upstream trace",
14+
"utility network",
15+
"validate consistency",
16+
"UtilityAssetType",
17+
"UtilityCategoryComparison",
18+
"UtilityDomainNetwork",
19+
"UtilityElement",
20+
"UtilityElementTraceResult",
21+
"UtilityNetwork",
22+
"UtilityNetworkAttribute",
23+
"UtilityNetworkAttributeComparison",
24+
"UtilityNetworkDefinition",
25+
"UtilityNetworkSource",
26+
"UtilityTerminal",
27+
"UtilityTier",
28+
"UtilityTraceConfiguration",
29+
"UtilityTraceFunction",
30+
"UtilityTraceParameters",
31+
"UtilityTraceResult",
32+
"UtilityTraceType",
33+
"UtilityTraversability"
34+
],
35+
"redirect_from": [],
36+
"relevant_apis": [
37+
"UtilityAssetType",
38+
"UtilityCategoryComparison",
39+
"UtilityDomainNetwork",
40+
"UtilityElement",
41+
"UtilityElementTraceResult",
42+
"UtilityNetwork",
43+
"UtilityNetworkAttribute",
44+
"UtilityNetworkAttributeComparison",
45+
"UtilityNetworkDefinition",
46+
"UtilityNetworkSource",
47+
"UtilityTerminal",
48+
"UtilityTier",
49+
"UtilityTraceConfiguration",
50+
"UtilityTraceFunction",
51+
"UtilityTraceParameters",
52+
"UtilityTraceResult",
53+
"UtilityTraceType",
54+
"UtilityTraversability"
55+
],
56+
"snippets": ["create_load_report.dart"],
57+
"title": "Create load report"
58+
}

0 commit comments

Comments
 (0)