Skip to content

Eliminate the two-station restriction on double-ended fault analysis#666

Merged
clackner-gpa merged 1 commit into
masterfrom
double-ended-tap-line
Jun 22, 2026
Merged

Eliminate the two-station restriction on double-ended fault analysis#666
clackner-gpa merged 1 commit into
masterfrom
double-ended-tap-line

Conversation

@StephenCWills

Copy link
Copy Markdown
Member
  • lineLookup only contains lines that were monitored by the meter that produced the MeterDataSet that openXDA is processing when performing double-ended analysis.
  • Remove the line.AssetLocations.Count == 2 restriction.
  • Restrict the analysis to only computing double-ended analysis on system events that include data from the meter that produced the MeterDataSet.
  • segmentLookup provides the mapping between event IDs and segment IDs. If you provide an event ID, it will return a list of line segments that are directly connected to the location of the meter that produced the event (via AssetLocation). Furthermore, the list of segments only consist of segments on the asset associated with the event, so a properly configured system should produce exactly one segment from the lookup table for a given event.
  • For DeviceDefinitions.xml cases, there is only one line segment with no AssetLocation records to tie it to any station. To make that case work, we still fall back on the longest TransmissionPath, which should be just the one line segment anyway.
  • To make some of this work, I needed to extend the functionality of Asset.QueryAs<T>() a little bit so that the resulting Line record shares a LazyContext with the Asset record it was queried from. This allows me to query line.Segments and line.Path without having to assign a connection factory and generate a separate LazyContext. This extension provides caching for Line, LineSegment, and CapBankRelay because those are currently the only asset-based models that get cached in the lazy context at all.

@StephenCWills StephenCWills force-pushed the double-ended-tap-line branch from 3eee0a5 to 0ba085e Compare June 22, 2026 13:17
@clackner-gpa clackner-gpa merged commit 1efc178 into master Jun 22, 2026
3 checks passed
@clackner-gpa clackner-gpa deleted the double-ended-tap-line branch June 22, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants