OD Cost Matrix Credit Usage

639
4
Jump to solution
07-28-2023 03:34 PM
TaraP
by
New Contributor II

I'm trying to find the drive time from every census designated place in the US to the closest "large" city (large meaning a population > 50K). This means I have to run over 31,000 origins to over 800 destinations. Due to the extensive time commitment that would need to be invested to create a national road network, I'm using Esri's routing service. I do know that the OD Cost Matrix uses 0.0005 credits per input origin and destination pair. Because of this (and for processing time) I have set the Destinations to 1. Therefore, in the end I should have a single line result for each origin. This would mean I would use a total of 16 credits (32,000 x 0.0005). I'm afraid this is not at all what I'm seeing. I have split the communities into groups of 999 (geographically) and am currently running one group at a time so I can review the results prior to attempting to script it. After running a few, I decided to check out my credit usage on AGOL. I'm so glad I did! I have used almost 1,300 credits in the last hour alone! I'm now starting to wonder if the documentation isn't actually clear and rather you are charged for every possible origin/destination combination and not just the output destinations?? I work for a small non-profit and there is no way we will be able to afford to complete this analysis if the credit consumption continues like this! Can anyone help me better understand how credits are consumed for OD Cost Matrix analyses that use the underlying ArcGIS Online network service? Thank you!

0 Kudos
1 Solution

Accepted Solutions
MaxZeng
Esri Contributor

Hey,

OD Cost Matrix service charges credits per input origin and destination pair, as explained in the documentation. It isn't charged based on the output. There is also an example in the documentation, which explains a similar case to make it clear.

"If there are 100 origins and 200 destinations, the cost will be 10 credits. If you specify a cutoff, or limit the number of destinations, such as to find only the 5 closest destinations within 10 minutes of every origin, the cost will still be 10 credits, as the credits depend on the number of input origin-destination pairs."

For your analysis of 31000 origins and 800 destinations, the OD will cost 12400 credits.

I think for your problem, you could try to pre-process your inputs, to reduce the input problem size. For example, for each origin, you could find destinations within certain Euclidean distance and only use those destinations near the origin in the OD. You might only have 10 destinations near each origin after your pre-processing (depending on the distance you use) and you can use OD to find the closest one in network distance.

This Solving Large Transportation Analysis Problems presentation, explains some of the technics that can be used to pre-process the data to eliminate irrelevant data.

Hope this helps.

View solution in original post

4 Replies
JaySandhu
Esri Regular Contributor

The doc on the page you reference says:

If there are 100 origins and 200 destinations, the cost will be 10 credits. If you specify a cutoff, or limit the number of destinations, such as to find only the 5 closest destinations within 10 minutes of every origin, the cost will still be 10 credits, as the credits depend on the number of input origin-destination pairs.

So it says that it is based on the inputs NOT on how many to find. 

Jay Sandhu

TaraP
by
New Contributor II

Thank you. I obviously missed that part. 

0 Kudos
MaxZeng
Esri Contributor

Hey,

OD Cost Matrix service charges credits per input origin and destination pair, as explained in the documentation. It isn't charged based on the output. There is also an example in the documentation, which explains a similar case to make it clear.

"If there are 100 origins and 200 destinations, the cost will be 10 credits. If you specify a cutoff, or limit the number of destinations, such as to find only the 5 closest destinations within 10 minutes of every origin, the cost will still be 10 credits, as the credits depend on the number of input origin-destination pairs."

For your analysis of 31000 origins and 800 destinations, the OD will cost 12400 credits.

I think for your problem, you could try to pre-process your inputs, to reduce the input problem size. For example, for each origin, you could find destinations within certain Euclidean distance and only use those destinations near the origin in the OD. You might only have 10 destinations near each origin after your pre-processing (depending on the distance you use) and you can use OD to find the closest one in network distance.

This Solving Large Transportation Analysis Problems presentation, explains some of the technics that can be used to pre-process the data to eliminate irrelevant data.

Hope this helps.

TaraP
by
New Contributor II

Thank you for the response and the additional suggestions. Yes, I will definitely have to preprocess the data. 

0 Kudos