Welcome! This project is created by Bai Liu.
- Open MATLAB
- Locate "Current Folder" of MATLAB to where the source codes are
- Run aimed part(s) by editting "Main.m" (adding or removing relevant comments)
- Adjust parameter(s) in "InitializeGlobal.m"
- Run "Main.m"
The project has three optimization objects: left-turning strategy in single-agent case, left-turning strategy in multi-agent case, and traffic signal display strategy. Besides, several files serve as supporting tools.
-
Console
"Main.m": core console, the control center
"InitializeGlobal.m": define and initialize global variables, including parameters of vehicles, road structure and simulation method
-
Optimization on left-turning strategy in single-agent case
We adopt Q-Learning method here.
"OptSingleTurning.m": algorithmic implementation of Q-learning
"CalAction.m": calculates possible future states for a given state in Q-learning, to assist "OptTurning.m"
"TestSingleTurning.m": helps to illustrate the training result
-
Optimization on left-turning strategy in multi-agent case
To be implemented.
-
Optimization on traffic signal display strategy
We adopt SA (simulated annealing), GA (genetic algorithm) and PSO (particle swarm optimization) here.
"OptSignal.m": Implement SA, GA and PSO
-
Investigation on how multiple factors impact the optimization effect
To be implemented.
-
Miscellaneous
"XroadSimulation.m": simulate the traffic conditions of the intersection for a given amount of time
"CalVehicleNum.m": calculate the number of vehicle(s) to be geneerated in a given amount of time
"GenerateVehicle.m": generate vehicle objects