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.

  • Yours sounds like the simplest option and is how spider diagram tools I've worked with function (calc all, filter result). The only other solution that comes to mind is building a iterative model/script that pre-selects the matching records from each table and then feeds only the selection to an OD solver (or Closest Facility) then moves to the next physician ID - as radouxju has suggested. VRP isn't well suited anyway; as described you want the shortest route from any given patient to the physician, which is essentially a bunch of single point-pair route solves and not multiple stops.
    – Chris W
    Aug 27, 2014 at 20:35

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.