Visiting Researcher at Barcelona Supercomputing Center: Simulating Urban Mobility with LLMs and MareNostrum
Harnessing large language models, demographic profiles, and high-performance computing to generate synthetic travel diaries and origin-destination matrices for Barcelona.
Supercomputing Meets Generative AI in Urban Mobility
During the spring of 2026, I had the privilege of joining the Barcelona Supercomputing Center (BSC-CNS) in Catalonia, Spain, as a Visiting Researcher. Based within the Data Analytics and Visualisation Group, my research focused on a compelling frontier at the intersection of urban data science and artificial intelligence: exploring how Large Language Models (LLMs) can be integrated with Agent-Based Modelling (ABM) and high-performance computing to synthesise city-scale human mobility.
Working on-site at the historic Torre Girona campus—where centuries-old architecture encloses one of the most powerful supercomputers in the world, MareNostrum—provided a uniquely inspiring environment to explore whether generative AI can solve the persistent problem of data scarcity in urban transport planning.
Data Analytics & Visualisation, Barcelona Supercomputing Center (BSC-CNS)
Barcelona, Spain • MareNostrum Supercomputing Cluster
Dr. Fernando Cucchietti, Dr. Patricio Reyes (BSC), Joe Murphy (UoL / GeoDS)
Working Paper: Using LLMs to Generate Synthetic Mobility Data (Target: Urban Transitions)
The Problem: Origin-Destination Matrices & the Data Bottleneck
Origin-Destination (OD) matrices are the mathematical foundation of transportation planning, infrastructure investment, and emissions modelling. They tell planners where journeys begin, where they end, at what times, and by which transport modes.
Historically, inferring OD matrices has required massive empirical datasets:
Traditional Household Surveys
Surveys like Barcelona's Enquesta de Mobilitat en Dia Feiner (EMEF) provide detailed behavioural insight but are notoriously expensive, slow to collect, and updated only every several years, making them poorly suited to rapidly evolving cities.
Mobile & Telecom Traces
Cell tower pings and GPS traces provide volume, but they are commercial black boxes restricted by GDPR and privacy regulations, and critically lack the socio-demographic context (age, employment, income) needed for equitable policy design.
Meanwhile, conventional activity-based models rely on rigid utility-maximisation equations that struggle to capture the nuanced contextual reasoning of human daily life without heavy, city-specific calibration datasets. Our goal at BSC was to test an alternative: Can modern LLMs simulate plausible, demographically grounded travel diaries from first principles?
Methodology: Demographic Personas to Synthetic Trip Chains
In collaboration with Fernando Cucchietti, Patricio Reyes, and Joe Murphy, we developed an end-to-end framework that conditions large language models on demographic attributes and geotagged urban points of interest (POIs) to generate complete daily travel schedules.
Model Diagnostics: Urban ABM Simulation Dashboard

Diagnostic visualisation from our LLM-driven urban simulation pipeline: spatial trajectories, departure time profiles, POI visit densities, and trip-distance distributions.
Scaling Up with the MareNostrum Supercomputer
Generating synthetic travel diaries for tens of thousands of individuals across multiple days, prompt variations, and LLM backends (such as Gemini 1.5 Flash and open-source models like Llama 3.3 70B) presents an immense computational challenge.
Leveraging BSC's world-class high-performance computing (HPC) infrastructure allowed us to scale:
Parallel Batch Inference
Executed large-scale batch synthesis across thousands of simulated demographic profiles, parallelising API and model execution to produce metropolitan-scale synthetic cohorts.
Ablation & Prompt Exploration
Conducted systematic ablation studies comparing zero-shot versus few-shot prompting, persona depth, and spatial constraint formulations to identify which prompting strategies best preserve realistic mobility metrics.
Empirical Validation: Benchmarking Against Barcelona's EMEF Survey
A fundamental requirement for any synthetic mobility generator is empirical fidelity. We evaluated our LLM-generated trip patterns against real ground-truth data from the Autoritat del Transport Metropolità (ATM)Enquesta de Mobilitat en Dia Feiner (EMEF 2021), which records detailed travel logs for thousands of residents across the Barcelona Metropolitan Area.
Key findings from our validation include:
- Temporal Departure Profiles: The LLM agents naturally reproduced the characteristic morning and evening commute peaks (08:00–09:00 and 17:00–19:00), alongside lunch-time movements characteristic of Spanish urban rhythms, without requiring hardcoded temporal rules.
- Trip-Distance Distributions: The generated trajectories closely matched power-law distance decay patterns observed in empirical mobility data, demonstrating that prompting agents with geographic context successfully prevents unrealistic cross-city trips for trivial errands.
- Demographic Heterogeneity: Agents with different socio-economic profiles exhibited distinctly differentiated mobility: working adults generated commuting chains, students clustered around university and school hours, and retirees exhibited off-peak local active travel.
Reflections & Upcoming Working Paper
My time in Barcelona was an immensely productive and stimulating chapter. Beyond the computational work inside BSC, living in Barcelona offered a daily masterclass in progressive urban planning—from walking through the famous Superilles (Superblocks) of Poblenou and Sant Antoni to experiencing one of Europe's most seamless multimodal transit systems.
I am immensely grateful to Fernando Cucchietti and Patricio Reyes for hosting me and sharing their expertise in data analytics and supercomputing, as well as to Joe Murphy for his continued collaboration.
Our working paper, titled “Using LLMs to Generate Synthetic Mobility Data” (Balog, Murphy, Reyes, & Cucchietti), is currently being prepared for submission to Urban Transitions. Stay tuned for further updates and open-source code releases!
Related Collaborative Work & Fellowships
Explore related research and visiting fellowships across our international network: