
The traffic simulator with a lane (in red) in the process of closing in order to flip its direction.
Traffic congestion is one of the daily troubles that cities contend with. Traditional road designs usually have a symmetrical capacity of flow for both of its directions, and this can be wasteful because demand of transport flow changes along the day. An adaptive lane system takes into account live data in order to "flip" the direction of certain lanes in order to keep up with transit demand.
As part of my social service program at UNAM's IIMAS (Sistemas Complejos) I implemented the logic that allows a traffic simulator to adapt on-the-fly to changes in directions of its lanes. The original simulation follows the General Lane-Changing Model MOBIL for Car-Following Models in order to model the traffic dynamics of an urban environment.
The repository for this project with its modifications can be found here.
The simulator's lane change capabilities.