Does anyone have experience with OD Cost Matrix and Iterate in ModelBuilder?

1006
3
05-12-2020 04:43 PM
ShannonMurphy2
New Contributor
Hello GeoNet Community,

I am using ArcGIS 10.6 Desktop to create a model to calculate the distance between each family and the clinic that they go to. There are 213 family addresses (origin) and 12 clinics (destination).

Currently, my ModelBuilder (see and attached) has an iterate row selection set up on the family addresses.
When I tried to run this model, I got this error: "Insufficient number of valid locations in "Origins" or "Destinations". I realize now that I don't know how to connect the selected family address to the clinic address. I have the same field in both attribute fields, but don't know where in ModelBuilder to set it up.

I am really hoping that someone in this community has had to do something similar and knows the piece that I am missing.

Thank you for any suggestions you may have!
Best regards,
Shannon M. Murphy
0 Kudos
3 Replies
DavidPike
MVP Frequent Contributor

My interpretation is:

You want to iterate through your list of families as a single origin

you want to add all the clinics as locations for each iteration

output an OD CM for each family.

It looks like your model should do this (I  never use model builder), so perhaps your locations are not valid.

This will require snapping and search distance options to be set.

You should test to see if this works manually through the NA wizard.

0 Kudos
ShannonMurphy2
New Contributor

Hi David,

Thanks for responding. I have run this successfully with one record manually in NA OD Cost Matrix. However, I am going to try to recreate my manual success with just one record in ModelBuilder and go from there.

Best regards,

Shannon

0 Kudos
curtvprice
MVP Esteemed Contributor
0 Kudos