Generative AI-Driven Digital Twin Architecture for Urban Mobility Simulation and Decision Support
Pablo Vicente-Martínez, Emilio Soria-Olivas, Adrián Chust-Ros, María Ángeles García-Escrivà, Edu William-Secin, Manuel Sánchez-MontañésUrban mobility planning in smart cities requires sophisticated simulation tools, yet their complexity often creates a technical barrier for non-expert stakeholders. This paper presents a novel architecture that integrates generative artificial intelligence with digital twin technology to create an accessible and decision-support prototype. The framework employs a conversational AI agent based on Gemini 2.5 Flash Lite to interpret natural language intentions and translate them into validated simulation parameters. A critical safety layer, built using Pydantic, ensures that the agent’s stochastic outputs adhere to strict technical schemas and predefined logical bounds before execution. The underlying digital twin, developed with SimPy, NetworkX, and OSMnx, features a multi-source data integration strategy that includes demographic density (INE), tourism activity (ISTAC), and high-resolution traffic statistics (TomTom) to calibrate vehicle behavior. The architecture was technically demonstrated through a Technology Readiness Level (TRL) 4 proof-of-concept in Las Palmas de Gran Canaria, simulating multimodal scenarios including buses, the future MetroGuagua (BRT), and pedestrian flows. Results demonstrate a 96% success rate in intent recognition and configuration mapping, with end-to-end execution times under 20 min for a 19 h simulated day. This study demonstrates that LLM-driven orchestration, coupled with automated data pipelines and a decoupled microservice architecture, can lower technical barriers to urban simulation, which could support broader participation in future smart city deployments.