[GIS] Restricting ArcGIS network analysis to finding origins/destinations with common ID

arcgis-desktopnetwork-analyst

I have two point feature classes, patients and physicians. The patient feature class has a record of which physician each patient visits (a one to one relationship). I would like to run an OD Cost Matrix (or whatever works) and restrict analysis to finding routes where the patient's physician ID (origins) and the physician ID (destination) match.

The only solution that I can think of (which is far from elegant) is to find all destinations for each origin and then extract those where the two IDs match.

Am I missing something obvious?

P.s. The network layer does not have a time field, so VRP is unavailable.

Best Answer

From what I know this is not possible based on the built in OD cost matrix tool.

The best way would be to loop on each physician, select their patients based on the common ID, then run the OD cost matrix.

Related Question