Solving a Traffic Flow Problem with a set of equations
Transportation engineering: traffic flow measurement A local town’s department of public works wants to analyze the traffic that flows through its downtown traffic circle during rush-hour. A traffic circle is a type of roadway construction that allows for multiple roads to intersect without requiring traffic control devices like stop signs or traffic lights. Drivers enter at one on-ramp of the circle and drive around the circle until they reach their off-ramp. The department counts how many cars pass through each entrance and exit ramp, but doesn’t have any data on the traffic along the circle itself. You have been asked to calculate the hourly traffic at the five roadway segments marked on the road map below. The direction of traffic flow is shown on the diagram. No cars are able to park on the circle, or enter or leave it anywhere besides the entrance and exit ramps. 3.1 Objective Show the average amount of hourly traffic on each segment of the traffic circle at the marked points, or explain what additional information you would need to determine this. 3.2 Tips for solving • The total number of cars entering a point on the roadway has to be the same as the number of cars leaving that point. • If left-division doesn’t provide a solution to the system, use rref to determine how many solutions the system has.
Here are the equations I've written, but I've no idea if I'm on the right track: Segment A: EA + 150 = AB + 75 Segment B: AB + 300 = BC + 200 Segment C: BC + 50 = CD + 200 Segment D: CD + 175 = DE + 150 Segment E: DE + 200 = EA + 250
It appears that you have the plow listed correctly for each segment. Now what?
The plow? I need to determine the flow rate through each of the five segments: A B C D E
:-) Flow - Sorry about that.
I believe I need to determine actual rates through each of the segments, or at least determine the number of solutions there are.
I'm also working this out in matlab, but matlab's no good if i don't know how to set it up.
\[\left[\begin{matrix}1 & 0 & 0 & 0 & -1 \\ -1 & 1 & 0 & 0 & 0 \\0 & 1 & -1 & 0 & 0 \\0 & 0 & -1 & 1 & 0 \\0 & 0 & 0 & 1 & -1\end{matrix}\right]\cdot \left[\begin{matrix}AB \\ BC \\ CD \\ DE \\ EA \end{matrix}\right] = \left[\begin{matrix}75 \\ 100 \\ 150 \\ 25 \\ 50 \end{matrix}\right]\]
That monstrosity on the left is Singular, so you'll have to use rref() and answer the secondary question.
@tkhunny, i'm impressed you typed all that out! i was just gonna say, 'use linear algebra' haha
It's a little tedious, but for the benefit of those who haven't seen such a thing, the visual is pretty effective.
tkhunny: thanks so much for that, that is what I got on my own and I'm glad to see it's accurate, but I'm not sure where to go from there.
A = -1 1 0 0 0 0 -1 1 0 0 0 0 -1 1 0 0 0 0 1 -1 1 0 0 0 -1 B = 100 150 25 50 75 augmented_form = -1 1 0 0 0 100 0 -1 1 0 0 150 0 0 -1 1 0 25 0 0 0 1 -1 50 1 0 0 0 -1 75 Matrix left division yields no answer, so we try rref: reduced_row_echelon_form = 1 0 0 0 -1 0 0 1 0 0 -1 0 0 0 1 0 -1 0 0 0 0 1 -1 0 0 0 0 0 0 1
See if you can find the inverse of that 5x5 matrix. You should not be able to, since it doesn't exist. Go ahead and let Matlab beat on it for a little while.
It says the matrix is singular. And from what I can tell, the rref is telling me that the equations have no solution, as the last row says 0 = 1. Am I just interpreting something incorrectly?
Must be a sign funny in there, somewhere. One of us is wrong on this one. 0 -1 1 0 0 150 You or me?
I can't figure out exactly where I went wrong just yet, but in the meantime I'll just assume yours is right because the rref of the matrices you gave me is working out better. Here's what I have now: 1 0 0 0 -1 75 0 1 0 0 -1 175 0 0 1 0 -1 25 0 0 0 1 -1 50 0 0 0 0 0 0 From this, all I can see is that there are possibly an infinite number of solutions. Is that correct?
I missed this statement of yours before, sorry about that: "...you'll have to use rref() and answer the secondary question." The only trouble now is that I'm not sure how to interpret the rref output, beyond the fact that there are an infinite number of solutions.
That's better.
I need to step out, but i'd appreciate any more advice you might have. Thanks so much for helping me realize I made a mistake there!
Should end up like this: \[\left[\begin{matrix}1 & 0 & 0 & 0 & (75+EA) \\ 0 & 1 & 0 & 0 & (175+EA) \\0 & 0 & 1 & 0 & (25+EA) \\0 & 0 & 0 & 1 & (50+EA)\end{matrix}\right]\]
Now you have EA as an independent variable.
Join our real-time social learning platform and learn together with your friends!