TrafficModeler is an open-source, graphical tool for the rapid high-level modeling and generation of vehicular traffic. TrafficModeler supports a variety of traffic definition models representing a wide range of traffic patterns. A set of traffic generation algorithms are implemented to convert high-level models to output compatible with SUMO, a popular open-source microscopic traffic simulator. TrafficModeler drastically reduces the time and effort required to generate traffic for SUMO. Furthermore, it can be easily extended to support other traffic simulators and to incorporate new types of traffic.

You can find the source code here.