Algorithm 1 Optimization via a genetic algorithm (GA) |
Input: Nodes, Lanes, Signals |
/* Model creation */ |
Assignment of Nodes to Lanes |
Assignment of Signals to selected Lanes |
Merging selected Signals into SignalBunches |
Merging selected SignalBunches into BunchLists |
/* Routing and car generation */ |
Parameters of traffic flows (enterLanes, exitLanes, intensities) |
Generating traffic flows (parameters, duration) |
/* GA optimization */ |
for gen = 0; gen < maxGenerations; gen ++ do |
for genome = 0; genome < popSize; genome ++ do |
Load genomes specific signalBunches; Synchronize BunchLists |
Load traffic |
Simulate traffic model |
Calculate objectiveFunction value |
Clear traffic |
end for |
Sort population |
TournamentSelection (ts ratio) |
Reproduce population (mutate ratio) |
end for |
Output: Genome with the best performance (signal parameters) from the last generation. |