Investigate the theoretical framework of transportation engineering, particularly in the context of traffic flow theory. Explore the mathematical models used to describe traffic flow dynamics, including the concepts of traffic density, flow rate, and speed-density relationships, and discuss their relevance in optimizing transportation infrastructure.