This document is archived and information here might be outdated.  Recommended version.


ITraceFlowSolverGEN.FindSource Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (NetworkAnalysis)  

ITraceFlowSolverGEN.FindSource Method

Finds a path upstream to a source or downstream to a sink, depending on the specified flow method.

[Visual Basic .NET]
Public Sub FindSource ( _
    ByVal flowMethod As esriFlowMethod, _
    ByVal objFn As esriShortestPathObjFn, _
    ByRef junctionEIDs As IEnumNetEID, _
    ByRef edgeEIDs As IEnumNetEID, _
    ByVal Count As Integer, _
    ByRef segmentCosts As Object[]& _
)
[C#]
public void FindSource (
    esriFlowMethod flowMethod,
    esriShortestPathObjFn objFn,
    ref IEnumNetEID junctionEIDs,
    ref IEnumNetEID edgeEIDs,
    ref int Count,
    ref Object[]& segmentCosts
);
[C++]
HRESULT FindSource(
  esriFlowMethod flowMethod,
  esriShortestPathObjFn objFn,
  IEnumNetEID** junctionEIDs,
  IEnumNetEID** edgeEIDs,
  long Count,
  SAFEARRAY(Variant)* segmentCosts
);
[C++]

Parameters flowMethod [in]
flowMethod is a parameter of type esriFlowMethod objFn [in]
objFn is a parameter of type esriShortestPathObjFn junctionEIDs [out]
junctionEIDs is a parameter of type IEnumNetEID** edgeEIDs [out]
edgeEIDs is a parameter of type IEnumNetEID** Count [in]
Count is a parameter of type long segmentCosts [in, out]
segmentCosts is a parameter of type SAFEARRAY(VARIANT)*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The FlowMethod parameter determines whether the trace solver traces upstream, downstream, or on all connected edges.  If you would like to allow or restrict tracing on edges with indeterminate or uninitialized flow, be sure to set the TraceIndeterminateFlow property prior to calling this trace solver.

The objFn parameter specifies the objective function of the trace solver. Depending on this parameter, the trace solver will either attempt to minimize the total cost of the paths to the source, or will attempt to minimize the maximum cost of any single element in the paths to the source.

The Count is the number of path segments to be returned by the trace solver. It is equivalent to the number of flags being passed into the trace solver. The Count is also the size of the array passed into the segmentCosts parameter.

The trace solver will return the traced junction and edge element IDs in the junctionEIDs and edgeEIDs parameters respectively, and will return the cost of each segment in the segmentCosts array.

The traced element IDs are returned in the order that they were traced.

See Also

ITraceFlowSolverGEN Interface