In this article we present a strategy based on an evolutionary algorithm to calculate the real vehicle ows in cities according to data from sensors placed in the streets. We have worked with a map imported from OpenStreetMap into the SUMO traffic simulator so that the resulting scenarios can be used to perform different optimizations with the confidence of being able to work with a traffic distribution close to reality. We have compared the results of our algorithm to other competitors and achieved results that replicate the real traffic distribution with a precision higher than 90%.