"AI" isn't needed to solve optimization problems, that's what we have optimization algorithms for.
Define an objective and parameters and give the problem to any one of the dozens of general solvers and you'll get approximate answers. Large cities already use models like these for traffic flow, there's a whole field of literature on it.
The one closest to what you mentioned is a genetic algorithm, again a decades-old technique that has very little in common with Generative "AI"