The first script facilitates the automatic generation of scenarios, allowing the manipulation of parameters such as station spacing, line length, passenger capacity and waiting times, among others.
Improving energy efficiency in public passenger transport is key to achieving sustainability goals. In many developing countries, public passenger transport relies heavily on fossil fuels, which necessitates a strong focus on reducing emissions from energy consumption. Surprisingly, few studies have addressed this issue in the context of daily operations, with most research focusing on operational and infrastructural changes. This paper aims to fill this gap by introducing detailed energy consumption variables into a public transport simulation model using SUMO, a tool known for its seamless integration with Python. The development of two Python scripts underpins this endeavour. The first script facilitates the automatic generation of scenarios, allowing the manipulation of parameters such as station spacing, line length, passenger capacity and waiting times, among others. The second script is dedicated to estimating energy consumption for each scenario. Together, these tools allow us to calculate average energy consumption for different scenarios and modes of public transport. As a result, they provide valuable insights for the formulation of public policies aimed at saving energy in different public transport environments and lay the foundation for the integration and development of intelligent transport systems and simulation-based digital twins.