Durante el desarrollo de parte del TFG, se ha diseñado y ejecutado una simulación para analizar el flujo de tráfico, y con esta así poder llegar a evaluar el impacto de las interrupciones aleatorias que se puedan producir en una red de transporte, como puedan ser carreteras, calles o incluso autopistas. Para la codificación de este código, se ha utilizado RStudio como lenguaje principal de programación, utilizando diversas bibliotecas como tidyverse, que permite gestionar los datos, y la biblioteca ggplot2, que permite la visualización de resultados. El objetivo principal de este primer modelo es estudiar si los vehículos, basándose en la posibilidad de ahorrar tiempo, cogerían el desvío, que de forma normal tomaría más tiempo, pero teniendo dicha interrupción la que sería la vía óptima. Para ello se ha creado una función que permite registrar el tiempo total de viaje y el número de desvíos por vehículo, además de calcular el tiempo ahorrado en cada caso. Se ha implementado un algoritmo de Dijkstra para determinar cuál sería la ruta óptima.
ABSTRACT
During the development of part of the TFG, we have designed and executed a simulation to analyse the traffic flow, and with this, we have been able to evaluate the impact of random interruptions that may occur in a transport network, such as a road, a street, or even a motorway. For the codification of this code, RStudio has been used as the main programming language, using various libraries such as tidyverse to manage the data and the ggplot2 library to visualise the results. The main objective of this first model is to study whether vehicles, based on the possibility of saving time, would take the detour, which would normally take longer, but having such an interruption would be the optimal route. For this purpose, a function has been created to record the total travel time and the number of detours per vehicle, as well as to calculate the time saved in each case. A Dijkstra algorithm has been implemented to determine the optimal route.
Durante el desarrollo de parte del TFG, se ha diseñado y ejecutado una simulación para analizar el flujo de tráfico, y con esta así poder llegar a evaluar el impacto de las interrupciones aleatorias que se puedan producir en una red de transporte, como puedan ser carreteras, calles o incluso autopistas. Para la codificación de este código, se ha utilizado RStudio como lenguaje principal de programación, utilizando diversas bibliotecas como tidyverse, que permite gestionar los datos, y la biblioteca ggplot2, que permite la visualización de resultados. El objetivo principal de este primer modelo es estudiar si los vehículos, basándose en la posibilidad de ahorrar tiempo, cogerían el desvío, que de forma normal tomaría más tiempo, pero teniendo dicha interrupción la que sería la vía óptima. Para ello se ha creado una función que permite registrar el tiempo total de viaje y el número de desvíos por vehículo, además de calcular el tiempo ahorrado en cada caso. Se ha implementado un algoritmo de Dijkstra para determinar cuál sería la ruta óptima.
ABSTRACT
During the development of part of the TFG, we have designed and executed a simulation to analyse the traffic flow, and with this, we have been able to evaluate the impact of random interruptions that may occur in a transport network, such as a road, a street, or even a motorway. For the codification of this code, RStudio has been used as the main programming language, using various libraries such as tidyverse to manage the data and the ggplot2 library to visualise the results. The main objective of this first model is to study whether vehicles, based on the possibility of saving time, would take the detour, which would normally take longer, but having such an interruption would be the optimal route. For this purpose, a function has been created to record the total travel time and the number of detours per vehicle, as well as to calculate the time saved in each case. A Dijkstra algorithm has been implemented to determine the optimal route. Read More


