Hi @MelindaMorang , I am trying to get the output that was available in the older tools in ArcMap now in Pro. The calculate time matrix tool used to have an option to save the individual calculations. That is, I need the output of total travel time, length, walk time, wait time, etc. for each O/D pair for each time of day selected. Is this still a possibility? Also, if there is a way to combine some of the functionality of the Copy Traversed Transit features for each record that would be amazing. I am trying to build a regression looking at various factors on travel times, and knowing this information and at least the starting route number would be very helpful. Any thoughts would be greatly appreciated.
Hello Phillip. Nice to hear from you again. It sounds like you're asking about a couple of different things, so let's see if we can get this figured out.
First, you're asking about one of the Transit Network Analysis Tools that iterates over a time window and asking whether the individual results of each iteration can be saved out. When you said "calculate time matrix tool", I initially thought you were referring to the Calculate Accessibility Matrix tool, but as far as I remember, that tool has never had this option. I think you might be thinking of the Calculate Travel Time Statistics tool, which has a checkbox option to save the results of each iteration into a single feature class. That option is there in both the deprecated ArcMap version and the current ArcGIS Pro version. Is this what you were thinking of? Does this give you what you need?
Note that the results will just have the travel time and distance. It doesn't include wait time. For various technical reasons, that information is not possible to retrieve.
Your second question, if I understand it correctly, is whether not only the route between A and B can be saved for each time of day but whether the traversal result, or the components of the route, can also be saved out. In other words, you want the individual network feature that were used, consistent with the output of the now-deprecated Copy Traversed Source Features (with Transit) tool. Is this right?
Assuming I've understood the question, then no, this isn't possible right now. But, I have an item on my near-term to-do list to create a new version of that old tool that works in ArcGIS Pro. Your question here is the first time I've been asked about combining this functionality with the Transit Network Analysis Tools, but I think that's a really great enhancement idea. So...I don't have a solution for you right now, but maybe later this year I will. I will be sure to post back here when I have some updates, or you can just subscribe to the GitHub repo.
Melinda, thanks for the quick response and all the great information. You refreshed my memory on both accounts.
For the first question, you were right. I was asking for the iteration output in the Statistics tool. I had forgotten that is how I had done it in my previous study and conflated it with the new accessibility tool. You were also correct in that the tool never previously provided the wait times for each iteration. I had forgotten that those values weren't provided and that instead, I had calculated an estimate of the wait times as the difference between the iteration start time (which was located at a stop) and the arrival time of the next bus (making the assumption that that was the bus boarded).
On the second point, you are also correct that I am looking for some of the information available in the deprecated Copy Traversed transit features tool. The only information that I would really need from that would be a list of the trip_IDs used on each interaction (or even just the one trip_id associated with the origin stop so that I wouldn't have to assume that the next bus to arrive at the stop was the one used for the travel time calculation). The transfer stop_ids and/or trip_ids might also be good information if you're taking suggestions for future tool functionality. I'm using this information to build regression models of how particular routes and the number of vehicles assigned to those routes (among other factors) affect the transit travel time.
At the moment I think I have the information I need. I'll gather and process a little more data, but then be running the tools in the next week or so. I'm excited to try the new tools and very grateful for your work on them. Thanks again.
A couple of follow-up questions for when I parallelize and update the Calculate Travel Time Statistics tool.
Sorry for the delay. I'm actually using both but mainly the OD Cost Matrix. I use the route with the traversed features tool to try to understand the behavior of the algorithm. I've found I have to do quite a bit of teasing with the walking speed to keep down the number of only walking or mostly walking trips. Since I'm using bus stops as both the origins and destinations (I'm only interested in waiting and in-vehicle travel times, I've found that at 80 m/min the shortest path will actually walk along the road to other stops instead of waiting on the next bus. This would seem to imply that a rider would have perfect information about when the next bus was to arrive which seems unrealistic to me. I can't set the walk speed to 0 though because that wouldn't allow for transfers. Even though 20 m/min is very slow and unrealistic I think that seems to be the best balance I've found. Just two other small issues I'm finding is that the cutoff walk time in the origins seems to be ignored and the output of the individual iterations joins the origin and destination names into one field. I just go back to edit the results as needed though (i.e., removing trips with too much walking and pulling out stop IDs).
I really appreciate all the work on the parallel version of the statistics tool. I have given it a try but am having errors that are preventing it from running. I'm not sure if I'm doing something wrong or if there is a bug that I've found. Would you be able to look at the screenshot I've added and see if I'm doing something wrong? I'd appreciate any thoughts on this issue.
Hi Phillip. Sounds like you have multiple questions and problems, so let me separate them by category so we don't get all mixed up and so I don't forget anything.
The validation error you see in the tool appears to me like a python path error. I made changes to the python files in the latest update, and it looks like Pro isn't picking it up.
Limiting walk time/distance
Regarding the walking problem - yeah, that's a weakness of our implementation of this transit stuff. There is no way to separately cap the walking time or distance from the overall travel time. I know this is something we need to do, but the core structure of Network Analyst itself does not give me a way to make this happen. Best I can suggest is you talk to your Esri representative or leave a post on the ArcGIS Ideas site advocating for this.
You could also put barriers around your stops to prevent people from walking further than your desired distance, although you have to make them not cross the transit lines.
Cutoff walk time being ignored
"the cutoff walk time in the origins seems to be ignored"
Can you tell me more about this? Please tell me exactly what you're seeing so I can determine if this is a bug.
"the output of the individual iterations joins the origin and destination names into one field"
Are you referring to the Calculate Travel Time Statistics (OD Cost Matrix) tool here, or Calculate Accessibility Matrix? (Super helpful to me if you are very explicit about which tool you're talking about.)
Are you referring to the Name field in the output OD Lines? You can parse that if you want to, but if you want to get the Name fields from the original Origins and Destinations tables, you should just join the output Origins and output Destinations to the output OD Lines using the OriginOID and DestinationOID fields in Lines. They correspond to the ObjectID fields in the output Origins and Destinations.
This documentation page has the complete schema for the outputs. Calculate Travel Time Statistics (OD Cost Matrix) tool output is described explicitly here.
Hello again. Just wanted to follow up on a part of this thread. I have created a downloadable script tool that adds transit information to the output of Copy Traversed Source Features, including the Run ID, ride time, wait time, and transit trip arrival and departure time to each transit segment.
The tool runs a post-process that queries the Public Transit Data Model tables to make a good guess as to which transit runs were used for each segment based on the constraints of the analysis settings and the arrival and departure times for that segment. This isn't a terribly efficient way to solve the problem, but it gets the job done.
Please consider this a prototype. Definitely let me know if the tool doesn't return the output you want or if you experience any problems. I would like to get this behavior into the core software at some point, and feedback on this prototype will be very valuable in doing so.
Note that this functionality is not yet integrated into the Route version of the Calculate Travel Time Statistics tool like we discussed above. That's up next on my plate but will require some surgery on that tool. I'll report back here when I've done that.
Download the tool from ArcGIS.com or GitHub. (This download includes several tools; the new one is called Copy Traversed Source Features With Transit.)