Complex Template8
2015-11-13 15:53:27 0 举报
matlab
作者其他创作
大纲/内容
Difficult degree of changing the lane
Analyze road rage
Maximum acceleration
Add random number of new cars According to poisson distribution
Input the information of the first car
Change lane due to construction
Calculate the minimum distanceaccording to
If a driver is exceeded
Whether time is over
Far
One car is created
Create one car in a random position at each lane
Generate the imformation of the car
Deceleration of the rapid brake
Delete the cars that passed
Calculate the distance with the previous cars
Generate the final information of the car
Calculate the total energy consumption
Slam the brakes on
Fine turn the distance
Basic Information
Else
Push all the cars forward
Change the lane
No
Find the cars that passed
Add the information into the matrix
If Lg=Dmin
Don't change the lane
Output the average time and the standard deviation
Create the car in a random position at one of the lanes
P=Dif*p1
Keep moving
Release the throttle
Too close
Cars entering every second
R=R+1
Compare P with a random number
Car length
Two cars are created
P is smaller
Start
The position in the beginning
Find the location and the crazy degree of the previous and later car car on another lane
R=R-0.5
For every car in the matrix
Input the information of the road
The length between the warning and the construction
End
If a driver exceeded others
Whether all the cars has been generated
Change lane due to traffic jam
Deceleration when releasing the throttle
No car is created
Calculate the time of those cars to pass
Output the oil consumption
If Lg0
If 0.5*Dmin=Lg0
Road rage
Maximum speed
P is larger
P=Dif*(p1+p2)
Energy Consumption
Generate cars
Lane-changing
Calculate the average time spent
Yes
Plot the cars on the road
The length of the construction
Energy consumption
Accelerate
0 条评论
下一页