News:

Needing some php assistance with the script on the main AARoads site. Please contact Alex if you would like to help or provide advice!

Main Menu

Anyone have any experience with traffic data modelling? (Python, GIS, etc)

Started by jakeroot, February 25, 2021, 10:24:28 PM

Previous topic - Next topic

jakeroot

I think this is off-topic. Hopefully this kind of post is allowed.

For school, I am getting into traffic data modelling using GIS data and Python. Does anyone have some experience working within this type of environment?

Feel free to simply message me if it's easier. Just looking for someone to bounce ideas off from and hopefully learn a bit too.

Cheers.


JayhawkCO

Not with traffic data specifically, but I'm decently well versed in Python.

Chris

jakeroot

Quote from: jayhawkco on February 26, 2021, 08:29:10 AM
Not with traffic data specifically, but I'm decently well versed in Python.

Chris

Nice! I'm learning Python right now. Bit of a learning curve but I'm trying to have fun with it.

vdeane

I've worked with both GIS and Python individually to varying extents though I've never done modeling specifically.  At work they keep talking about getting me involved in some kind of modeling but nothing seems to come of it, so I've long wondered if there are any resources for learning more about the topic.
Please note: All comments here represent my own personal opinion and do not reflect the official position of NYSDOT or its affiliates.

jakeroot

Quote from: vdeane on February 26, 2021, 12:59:24 PM
I've worked with both GIS and Python individually to varying extents though I've never done modeling specifically.  At work they keep talking about getting me involved in some kind of modeling but nothing seems to come of it, so I've long wondered if there are any resources for learning more about the topic.

I'm very nearly in the same boat, although I'd consider myself pretty well versed in GIS...just not the Python side of things yet.

My graduate work is going to involve modelling so I'm trying to learn a bit more about it before I get in too deep. I'm glad I have my professor to lean into for the time being, but I'm looking around to see what, if anything, anyone knows.

JayhawkCO

A little bit off topic, but if you're a fan of road trips and Python, you might find this page interesting.  Uses Numpy and Pandas to create optimal road trips.  I utilized this quite a bit when trying to clinch all of the highways in eastern Colorado and didn't want to waste any time on that awesome painstaking task.

Chris

jakeroot

Quote from: jayhawkco on February 26, 2021, 01:29:03 PM
A little bit off topic, but if you're a fan of road trips and Python, you might find this page interesting.  Uses Numpy and Pandas to create optimal road trips.  I utilized this quite a bit when trying to clinch all of the highways in eastern Colorado and didn't want to waste any time on that awesome painstaking task.

Chris

That is fantastic! I was a little confused at first but instantly felt at home once I found the .ipynb file at the bottom of the page. Phew. Who knew one day I'd feel more comfortable reading code than a blog...

JayhawkCO

Quote from: jakeroot on February 26, 2021, 01:37:59 PM
Quote from: jayhawkco on February 26, 2021, 01:29:03 PM
A little bit off topic, but if you're a fan of road trips and Python, you might find this page interesting.  Uses Numpy and Pandas to create optimal road trips.  I utilized this quite a bit when trying to clinch all of the highways in eastern Colorado and didn't want to waste any time on that awesome painstaking task.

Chris

That is fantastic! I was a little confused at first but instantly felt at home once I found the .ipynb file at the bottom of the page. Phew. Who knew one day I'd feel more comfortable reading code than a blog...

Feel free to waste multiple hours planning clinching road trips like I did. :)

Chris

Dirt Roads

Professionally, we developed transit simulations similar to what you are discussing.  When we first started this we were programming earlier in Fortran and later in Visual Basic using "straightline" train performance simulation techniques.  (There were also several early Windows-based platforms before VB came around).  The original software allowed for simulation of freight trains, Amtrak passenger trains, other commuter trains and rubber-tired AGT (automated guideway transit).  Over time, this morphed into a single simulation tool that could also simulate transit buses and PRT cars.  For electric traction, the simulations included power demand and substation demand as well.  I was quite involved in most of this, but most of the software was developed by colleagues.

Instead of traffic modelling, we started integrating the outputs from train/vehicle performance with passenger flow rates (and later passenger simulations).  We also had some clients that requested train modelling using GIS layouts.  I did much of this software, but it was rudimentary and table-driven.

On the flip side, I've consulted for the Federal Transit Administration in a variety of roles that involved traffic modelling as a means of passenger forecasting.  I wasn't involved in the modelling itself, but rather a user of the input data and/or outputs.  I've also worked on a few projects where colleagues ran the traffic modelling and I was responsible for developing train schedules to meet the passenger demand.  And back in the AGT world in airports, we used flight schedules to model passenger demand, station platform sizing and station/tunnel evacuation requirements.

All of these things are very fascinating.  And I agree that you will "waste multiple hours" on this project, so I hope you will be getting your Masters Degree for this effort.

Dirt Roads

Python is a great tool, but I've never worked with it myself.  The quickest modeling technique that I've worked with is to develop a "node network" and superimpose the "nodes" on the GIS map.  Sometimes we used "straightline" modelling between nodes, with table-driven inflow at each node.  Othertimes, we manually calculated the "tangent" at various points along the GIS map and rotated "icons" along the map while calculating the relative distance between nodes based on the train/vehicle performance simulation outputs.  One of the benefits of "straightline" modelling is that you can start by estimating the average speed between nodes rather than getting the real data. 

Modelling of rail junctions and intersections is more complex than highway intersections, but traffic modelling does need to add complexity to avoid gridlock (often by modelling the traffic signal network itself).  I had the benefit of working with a fellow who was manager for Sperry the development of the original traffic signal system in Miami (which I got to see in action while working on an unrelated project).  He died a few years back at age 98.  Amazing fellow.

Dirt Roads

Not sure if you are familiar with the transportation system user benefit (TSUB) calculation used by the Federal Transit Administration to evaluate the cost effectiveness of a planned/proposed transit system project.  In theory, the TSUB is supposed to determine the cost benefit per passenger based on the amount of time saved during [rush hour].  Projects that can make the cut are compared against each other when competing for Federal funding.  I haven't kept up with the current method for calculating the TSUB, but in general the process is useful to make a comparison between the forecasted traffic congestion with/without the transit improvements, and more importantly to compare to the cost effectiveness of other alternatives (ergo, parallel highway improvements).

Something that I always thought would be useful is a simple traffic data model that urban planners could use to compare various transit/highway alternatives.  A lot of energy is expended trying to guess which improvements will improve the TSUB scores, rather than getting to the main point (whether a particular transit improvement is going to be cheaper than similar highway improvements over the long haul).

jakeroot

Reading from top-to-bottom here:

I've heard of Fortran but never used it before. I see you said "later in Visual basic"; is it no longer common to use Fortran? I see it's still being updated. Or had been as of 2018.

I don't really know where I may end up, in terms of what agency I may help model "flow" (if any!!), but transit modelling is certainly a major field in the Seattle region right now, as we grow our light rail network. Although COVID-19 has really put the kibosh on things lately. That's very cool to hear you're involved in that. I may have to reach out to you in the future if you're available. Pierce Transit, my local transit agency, regularly hires from my school, and I know several people who work with them.

I have a ton of experience working within ArcGIS (originally ArcDesktop, aka ArcMap, later ArcPro or whatever it's called) but for the graduate program, we are being pushed heavily into Python. I feel I could complete much of my analysis using relatively simple GIS tools within Arc, but part of the program is learning code so, well, here I am!

I have never heard of TSUB; is it something used for just transit, or transportation improvements in general? I'm used to hearing about cost-benefit analyses, but this seems a bit deeper than that.

Quote from: Dirt Roads on February 27, 2021, 02:44:52 PM
Something that I always thought would be useful is a simple traffic data model that urban planners could use to compare various transit/highway alternatives.  A lot of energy is expended trying to guess which improvements will improve the TSUB scores, rather than getting to the main point (whether a particular transit improvement is going to be cheaper than similar highway improvements over the long haul).

Straight-up: if I could dedicate several years of my life to one thing, it might be this. It would be radically complex and I'd probably lose all of my hair in the process, but it seems like we spend (waste?) a lot of energy in developing/testing alternatives, as you say. So something to speed that up seems like it would be a game-changer.

Dirt Roads

Quote from: jakeroot on February 27, 2021, 03:20:11 PM
I've heard of Fortran but never used it before. I see you said "later in Visual basic"; is it no longer common to use Fortran? I see it's still being updated. Or had been as of 2018.

A lot of old simulation/modelling programs are still using Fortran.  This language is very math oriented, hence the reluctancy to abandon it outright.  It is also very simple to use in standalone subroutines that are called by other programming languages.  If you want to "play" with traffic modelling, don't be afraid of using Python (or any other language that you are fluent in).  If you want this as a career path, do whatever you can to take classes in other languages.  A minor in computer science would be worth the extra effort; taking computer science as a second major will more than pay for itself (and it might be a lot of fun). 

In converse, "playing" with traffic modelling will give you an idea whether you are cut out for this sort of thing.  My guess is that you've already fallen head-over-heels.

Quote from: jakeroot on February 27, 2021, 03:20:11 PM
I don't really know where I may end up, in terms of what agency I may help model "flow" (if any!!), but transit modelling is certainly a major field in the Seattle region right now, as we grow our light rail network. Although COVID-19 has really put the kibosh on things lately. That's very cool to hear you're involved in that. I may have to reach out to you in the future if you're available. Pierce Transit, my local transit agency, regularly hires from my school, and I know several people who work with them.

Using a simulation/modelling tool is a completely different career path.  Municipalities, regional planning organizations and transit agencies all use commercially available simulation/modelling tools for a whole bunch of urban planning and emergency preparedness analyses.  Many consulting firms have developed their own programs in house.  The company I retired from used to have a policy that every employee needed to be proficient in using our simulation tool and modelling tools. 

Quote from: jakeroot on February 27, 2021, 03:20:11 PM
I have a ton of experience working within ArcGIS (originally ArcDesktop, aka ArcMap, later ArcPro or whatever it's called) but for the graduate program, we are being pushed heavily into Python. I feel I could complete much of my analysis using relatively simple GIS tools within Arc, but part of the program is learning code so, well, here I am!

I have no experience with ArcGIS, but I had to use the data in many different ways.  One program I wrote plotted the raw ArcGIS data onto a screen and superimposed graphical elements (think "icons") and slid them around based on output data blended from various simulations and models.  This was too difficult for others to duplicate, so we decided it would be easier use mapping tools (or CADD system maps) to create screen shots as backgrounds, and manually create the node network on top of the screen shots.

Quote from: jakeroot on February 27, 2021, 03:20:11 PM
I have never heard of TSUB; is it something used for just transit, or transportation improvements in general? I'm used to hearing about cost-benefit analyses, but this seems a bit deeper than that.

TSUB has too many inputs.  One tweak and the cost estimate changes.  One change to passenger demand might result in a correction to fleet requirements.  All of the inputs are somehow interconnected.  Just like the traffic on the streets are all interconnected.

Dirt Roads

The stationing sign in the "Good, Bad and Ugly" thread reminds me of something important.  Invariably, traffic modelling gets overlaid onto highway plans and needs to get reconciled with the highway stationing.  Programmers don't do a very good job in this part of the civil engineering world.  It took years of pulling teeth, but we finally got the programmers to convert from simple stationing to complex stationing with equation marks (forward/backward).  This lets the modelling tool/simulation package spit out the location of "stuff" based on the actual stationing rather than a fictional version.



Opinions expressed here on belong solely to the poster and do not represent or reflect the opinions or beliefs of AARoads, its creators and/or associates.