Perform the network analysis and construct results.
[Visual Basic .NET] Public Function Solve ( _ ByVal NAContext As INAContext, _ ByVal messages As IGPMessages, _ ByVal TrackCancel As ITrackCancel _ ) As Boolean
[C#] public bool Solve ( INAContext NAContext, IGPMessages messages, ITrackCancel TrackCancel );
[C++]
HRESULT Solve(
INAContext* NAContext,
IGPMessages* messages,
ITrackCancel* TrackCancel,
VARIANT_BOOL* isPartialSolution
);
[C++]Parameters
NAContext [in]NAContext is a parameter of type INAContext
messages [in]messages is a parameter of type IGPMessages
TrackCancel [in]TrackCancel is a parameter of type ITrackCancel
isPartialSolution [out, retval] isPartialSolution is a parameter of type VARIANT_BOOL
Product Availability
Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Network Analyst Extension.
Remarks
Solve performs network analysis based on the solver properties and network locations in the NAContext.
It returns :
- True if a partial solution has been found (e.g., some stops are unreachable but a partial route exists).
- False if the whole solution has been found.
Additionnally, Solve returns informational messages in the GPMessages object. Each GPMessage contains a description and may have an naError code. Message types returned are:
- esriGPMessageTypeError when the solve fails (the analysis problem is incorrectly defined or the problem is unsolvable).
- esriGPMessageTypeWarning when a partial solution is found.
- esriGPMessageTypeAbort when the user aborts the analysis by pressing the ESC key.