## 5 Discussion
These trucks are constrained by lower speeds and rough roads, exacerbating congestion and increasing travel time. Smaller vehicles and passenger cars, although faster, also encounter issues related to frequent lane changes and congestion. Their average travel time is 30 min, with stop-and-go traffic contributing to delays. The presence of construction zones and narrow road sections further compounds these delays. Traffic density peaks at 200 vehicles per km near the port entrance and increases further in construction zones, leading to severe bottlenecks. During the rainy season, the travel times increase by an additional 10 min due to worsened road conditions and higher random slowdown probabilities. Accidents and flooding reduce road capacity by 20%, highlighting the need for better road maintenance and traffic management strategies. The max-flow model uses the Ford-Fulkerson algorithm to optimize cargo flow from Dar es Salaam Port to various inland destinations. The model considers road and rail capacities and daily demands for different routes. The analysis reveals that the road capacity from Dar es Salaam to Lusaka is sufficient to meet the demand of 1800 t/day by allocating 1500 t/day via rail and 300 t/day via road. However, the road capacity alone cannot fully meet the demand, indicating a need for balancing rail and road transport effectively. For other routes, such as Dar es Salaam to Kampala, Kigali, Bujumbura, Lilongwe, and Lubumbashi, the flow allocations generally match the demands, with some unused capacity available. For instance, the road to Kampala has a capacity of 2500 t/h, while the demand is 2500 t/day, showing a sufficient capacity for current demand. Similarly, unused capacities range between 27,600 and 57,500 t/day across different routes, suggesting that while most routes are operating efficiently, some routes have room for increased flow. The integrated use of Markov processes, cellular automata, and max-flow models provides a multifaceted view of Dar es Salaam Port's operations. Key recommendations include:  
* Improving port efficiency: Investments in port infrastructure and operations could reduce waiting times and enhance overall throughput. * Optimizing transit routes: Advanced routing algorithms and real-time data can help reduce transit times and address bottlenecks in the transportation network. * Reducing delays: Addressing causes of delays through better maintenance and traffic management will improve efficiency. * Enhancing delivery mechanisms: Improving coordination and optimizing delivery processes will increase the percentage of successful deliveries. * Upgrading road infrastructure: Addressing road conditions and construction zones will mitigate traffic congestion and reduce travel times. Implementing these strategies will help enhance the performance of Dar es Salaam Port, improve connectivity to hinterland destinations, and, ultimately, lead to more efficient cargo movement and better service for customers. Compared to the [34], which focuses on delineating port hinterlands using a cost-based model applied to the Spanish port system, our study introduces a more comprehensive and dynamic solution through the integration of Markov processes, max-flow problems, and traffic flow models. This framework goes beyond simple cost-based models by addressing real-time congestion, stochastic uncertainties, and network flow optimization, making it more adaptable to the complexities of modern port logistics. For instance, our analysis of Dar es Salaam Port reveals significant inefficiencies. The Markov process model shows that cargo spends 15% of its time waiting at the port, 50% in transit, and 10% delayed, with only 25% successfully delivered. These delays highlight a substantial inefficiency compared to traditional methods, which do not consider such detailed time-dependent variables. The cellular automata simulation highlights congestion for heavy trucks, with a 10 min delay during the rainy season due to poor road conditions.