This doesn't exactly answer your question, but what I settled on during my dissertation (granted, that was a few years ago now) was SUMO: https://www.eclipse.org/sumo/
IIRC you could import maps from from open street map, but I'm not sure if it has a "headless" mode, without all the visualisation.
IIRC you could import maps from from open street map, but I'm not sure if it has a "headless" mode, without all the visualisation.