Please help in PythonPART B: Network/Traffic Flow Part B1: Background Concepts for Network/Traffic Flow Network analysis plays an important role in many industries such as engineering, information theory, and the study of transportation systems. The following analysis of traffic flow through a road network illustrates how systems of linear equations with many solutions can arise in practice. Consider the typical road network of Figure 1. It represents an area of a downtown city. The streets are all one-way, with arrows indicating the direction of traffic flow. The flow of raffic in and out of the network is measured in terms of vehicles per hour (vph). We can construct a mathematical model that can be used to analyze this network. Assume the following traffic law applies: All traffic entering an intersection must leave that intersection. This conservation of flow constraint (similar to Kirchoff’s Current Law) leads to a system of linear equations: Intersection A: Traffic in = π‘₯1 + π‘₯2 Traffic out = 400 + 225 Traffic A: π‘₯1 + π‘₯2 = 625 Intersection B: Traffic in = 350 + 125 Traffic out = π‘₯1 + π‘₯4 Traffic B: π‘₯1 + π‘₯4 = 475 Intersection C: Traffic in = 800 + 225 Traffic out = π‘₯2 + π‘₯3 Traffic C: π‘₯2 + π‘₯3 = 1050 Intersection D: Traffic in = π‘₯3 + π‘₯4 Traffic out = 600 + 300 Traffic D: π‘₯3 + π‘₯4 = 900 These constraints on the traffic are described by the following system of linear equations: π‘₯1 + π‘₯2 = 625 π‘₯1 π‘₯4 = 475 π‘₯2 + π‘₯3 = 1050 π‘₯3 + π‘₯4 = 900 The method of Gauss-Jordan elimination can be used to solve this system of equations. The augmented matrix and reduced row-echelon form of the above system are as follows: The row-echelon form (ref) of a matrix is obtained from the gauss elimination and has the following properties: β€’ All rows of zero are at the bottom β€’ The leading entry (the left-most nonzero entry) of every nonzero row is to the right of the leading entry of every row above. β€’ Any (m x n) matrix can be in row-echelon form. β€’ Some matrices in row-echelon form are also in upper triangular form if the matrix is a square matrix. Reduced row echelon form (rref) β€œreduces” the row echelon form by requiring the additional conditions: β€’ The leading entry in each nonzero row is 1 β€’ Each leading 1 is the only nonzero entry in its column The system of equations that corresponds to this reduced row-echelon form is Expressing each leading variable in terms of the remaining variable, we get As perhaps might be expected, the system of equations has many solutions (x4 is our free variable) and therefore, many traffic flows are possible. A driver does have a certain amount of choice at intersections.Part B2: Assignment for Network/Traffic Flow The following figure represents the traffic entering and leaving a β€œroundabout” road junction. Construct a mathematical model that describes the flow of traffic along the various branches using the values of Flow 1, Flow 2, Flow 3, Flow 4 as input variables.Part B2.1: Write a program that accepts for the four different flow numbers as input values. (Flow 1, Flow 2, Flow 3, Flow 4). Create an augmented matrix from the constraints on the traffic described by the system of linear equations. Part B2.2: Solve this system using the Gauss-Jordan elimination method (use a library) and output the resulting matrix.

Please help in PythonPART B: Network/Traffic Flow Part B1: Background Concepts for Network/Traffic Flow Network analysis plays an important role in many industries such as engineering, information theory, and the study of transportation systems. The following analysis of traffic flow through a road network illustrates how systems of linear equations with many solutions can arise in practice. Consider the typical road network of Figure 1. It represents an area of a downtown city. The streets are all one-way, with arrows indicating the direction of traffic flow. The flow of raffic in and out of the network is measured in terms of vehicles per hour (vph). We can construct a mathematical model that can be used to analyze this network. Assume the following traffic law applies: All traffic entering an intersection must leave that intersection. This conservation of flow constraint (similar to Kirchoff’s Current Law) leads to a system of linear equations: Intersection A: Traffic in = π‘₯1 + π‘₯2 Traffic out = 400 + 225 Traffic A: π‘₯1 + π‘₯2 = 625 Intersection B: Traffic in = 350 + 125 Traffic out = π‘₯1 + π‘₯4 Traffic B: π‘₯1 + π‘₯4 = 475 Intersection C: Traffic in = 800 + 225 Traffic out = π‘₯2 + π‘₯3 Traffic C: π‘₯2 + π‘₯3 = 1050 Intersection D: Traffic in = π‘₯3 + π‘₯4 Traffic out = 600 + 300 Traffic D: π‘₯3 + π‘₯4 = 900 These constraints on the traffic are described by the following system of linear equations: π‘₯1 + π‘₯2 = 625 π‘₯1 π‘₯4 = 475 π‘₯2 + π‘₯3 = 1050 π‘₯3 + π‘₯4 = 900 The method of Gauss-Jordan elimination can be used to solve this system of equations. The augmented matrix and reduced row-echelon form of the above system are as follows: The row-echelon form (ref) of a matrix is obtained from the gauss elimination and has the following properties: β€’ All rows of zero are at the bottom β€’ The leading entry (the left-most nonzero entry) of every nonzero row is to the right of the leading entry of every row above. β€’ Any (m x n) matrix can be in row-echelon form. β€’ Some matrices in row-echelon form are also in upper triangular form if the matrix is a square matrix. Reduced row echelon form (rref) β€œreduces” the row echelon form by requiring the additional conditions: β€’ The leading entry in each nonzero row is 1 β€’ Each leading 1 is the only nonzero entry in its column The system of equations that corresponds to this reduced row-echelon form is Expressing each leading variable in terms of the remaining variable, we get As perhaps might be expected, the system of equations has many solutions (x4 is our free variable) and therefore, many traffic flows are possible. A driver does have a certain amount of choice at intersections.Part B2: Assignment for Network/Traffic Flow The following figure represents the traffic entering and leaving a β€œroundabout” road junction. Construct a mathematical model that describes the flow of traffic along the various branches using the values of Flow 1, Flow 2, Flow 3, Flow 4 as input variables.Part B2.1: Write a program that accepts for the four different flow numbers as input values. (Flow 1, Flow 2, Flow 3, Flow 4). Create an augmented matrix from the constraints on the traffic described by the system of linear equations. Part B2.2: Solve this system using the Gauss-Jordan elimination method (use a library) and output the resulting matrix.


Β 
Solved By Verified
Study Co-Pilot All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.

Β 
Instant
Download

Student review: (2 ratings) 2 out of 2 people found this solution helpful.