Skip to main content
Question

Network analyse to find odd one out

  • October 6, 2023
  • 7 replies
  • 35 views

Forum|alt.badge.img

I have a network of lines, and I need to identify the genuine odd one out.

In the diagram below, the red lines represent "Active" lines and the pink lines are "Inactive" lines.

Those lines that branch off from the network to a dead-end are genuine, the "Inactive" lines that have an "Active" line either side have been incorrectly attributed, and theses are the ones I need to identify.

 

I am new to FME, so a nice step by step guide would be appreciated please.

image

7 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • October 6, 2023

So you want to identify the pink line on the left?


Forum|alt.badge.img
  • Author
  • 3 replies
  • October 6, 2023

Yes, as this is the odd one out in the network. The one to the right is legitimate as it only touch's an active line at one end.

 


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • October 6, 2023

One possible way. I've used this method to identify dangling lines, but if you know which lines are dangling and set as inactive you can infer that all others must not be dangling and therefore active

> Build Topology, generating a list of edges on the nodes

>Count how many elements in the list

>Test for element count of 1, this identifies the node marked in black in your example network

image> Merge edges onto nodes using the absolute value of the fme_arc_id ( @abs(@Value(edege{0}.fme_arc_id))

>Edges exiting the unmerged port are the active lines

image


Forum|alt.badge.img
  • Author
  • 3 replies
  • October 6, 2023

Will this method identify the the inactive line that touch's 2 "active" lines. It looks like your solution is identifying the legitimate inactivate line on the right.

As I say, I am rather new to this, so I may have misinterpreted your solution.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • October 6, 2023

Will this method identify the the inactive line that touch's 2 "active" lines. It looks like your solution is identifying the legitimate inactivate line on the right.

As I say, I am rather new to this, so I may have misinterpreted your solution.

All legitimate active lines will exit the merged port of the FeatureMerger, therefore any inactive line that exits the unmerged requestor should not be inactive as it touches two or more active lines


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • October 6, 2023

Will this method identify the the inactive line that touch's 2 "active" lines. It looks like your solution is identifying the legitimate inactivate line on the right.

As I say, I am rather new to this, so I may have misinterpreted your solution.

Simple example attached


Forum|alt.badge.img
  • Author
  • 3 replies
  • October 6, 2023

Thankyou for your time and help, I will give this a try.