I don't know how to summarize it in just one title, but here is the problem:
My goal is to calculate the travel time from residential points to stores via public transit. Basically this period of time consists three parts:
The walking time from a residential point to the nearest bus stop "t1", which can be calculated by the Nearest Facility tool from Network Analyst. The resulting table is called "Resident_Stop", of which the number of records is m;
The bus-riding time "t2" from this bus stop to the nearest bus stop of the target store via bus route, which is a record from Network Analyst's OD Time Matrix table, namely, "Stop_Stop". The origins and destinations are all bus stops on one single bus route so that the number of records is s*s;
The walking time from the ending bus stop to the store "t3", which is basically the same with the first step. The table is "Stop_Store", of which the number of records is n.
So the total travel time "t" equals to (t1+t2+t3) and here is where problem occurs: I haven't figured out a way to attach the three tables reasonably to add the times on using a join. Currently I have an OD Time Matrix table of the walking time directly from residential points to stores via road network (no transit involved) and its number of records is m*n. I also separatly joined the table "Resident_Stop" in step 1 and the table "Stop_Store" in step 3 to the m*n-sized table based on residential point IDs and store IDs. So the remaining thing now is to assign the bus-riding time in table 2 based on table 1's stop IDs and table 3's stop IDs to each of the m*n records. Then I can get the total time.
Should you get any ideas, I'm willing to discuss with you. I'm now thinking about using Python to handle this but I'm a beginner on that. If you have any books or tutorials to recommand please tell me.