Solve closest facility

This sample application demonstrates how to programmatically perform a closest facility analysis using the fine grained ArcObjects application programming interface (API). It shows how to load facilities and incident locations from a feature class, set solver parameters, execute the analysis, and obtain the output results.

How to use

See How to use ArcGIS samples for help on running the sample.

  1. Run the SolveClosestFacility application. A dialog panel and a map bean open in the application window.
  2. Modify the Cost Attribute, Target Facility Count, and Cut Off values if required, and optionally, select Hierarchy and Restrictions.
  3. Click the Find Closest Facility button. The Closest Facility Solver solves the network using the values entered and shows the closest facilities, along with a route, in the map panel.

If you installed the samples feature, you will find the files associated with this sample in <Your Developer Kit install location>\DeveloperKit10.4\Java\Samples\ArcObjects.

networkanalyst/ Main class

Development licensing Deployment licensing
Engine Developer Kit Engine: Network Analyst
ArcGIS for Desktop Basic: Network Analyst