Table calculations using Model Builder

1308
5
05-01-2012 07:24 AM
Highlighted
New Contributor
Hi,

I have used Network Analyst to create a model that has resources going from Demand to Facility, with a set number of demand points and a variable number of facilities.  I have a model in Model Builder that solves this problem, but I need to do several calculations on the solution.

Each line from Demand to facility has a weight, and time associated with it.  I want to use Model Builder to sum these up for the lines that end in the same location.  The lines all have a field that contains ONLY the destination, so I want to separate the table by those values.

Is there a way to use Model Builder to sum up all the times and weights for Dest1, Dest2, Dest3 etc.?  I want to find the total amount of weight that ends up at the different destinations, and the total amount of time necessary to get all of it there.

Thanks a bundle,

Nathan S.
Tags (2)
Reply
0 Kudos
5 Replies
Highlighted
New Contributor II
Hello Nathan,

As far as I understand your problem, you should look to the tool named "Summary Statistics". In your case you can use your destination field ("The lines all have a field that contains ONLY the destination") as the "Case field". Then just select the others fields in "Statistics Field(s)". You will then be able to calculate their SUM (or MEAN,..) for each "Destination Field value (Dest1, Dest2,...)" and export the results to a new table.  

Link to "Summary Statistics":
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00080000001z000000

Hope this helps :confused:

Cheers,
Theo
Reply
0 Kudos
Highlighted
New Contributor
Thanks, I found the Summary Statistics tool.  But I'm having some trouble with the Output Table field.  It appears that I can only use an Excel spreadsheet as the output Table.  I don't want the data to leave ArcGIS.  Is there a way I can have the Output Table be inside ArcGIS?

Thanks,

Nathan
Reply
0 Kudos
Highlighted
New Contributor II
As far as I know, the output table is a dBASE or geodatabase table. You should be able to browse to an ArcGIS database (.gdb) and give the name of your choice to the output table. In this case you don't have to provide an extension to the file. For example:

D:\GIS\mydatabase.gdb\destination_summary_table

Cheers,
Theo
Reply
0 Kudos
Highlighted
New Contributor
Nevermind, I figured the above part out, thanks a bundle.  I have a few more questions though.

I want to do some more calculations on the table I have produced with data that is not stored in a layer.  How can I add a field and do calculations on it, all the while staying within model builder?  For example, I have time in  minutes, and I want to have an hours column.  So, I want to make a new field called Hours, and input the values that are Time/60.

Thanks,
Nathan S.
Reply
0 Kudos
Highlighted
New Contributor II
Hi again,
You can use "Add Field (Data Management)" and "Calculate Field (Data Management)" tools inside Modelbuilder. Note that if you want to get values from another table you will first have to join the two tables ("Join Field" or "Add Join").

I am off for tonight,
Best regards,
Theo
Reply
0 Kudos