Question: Please answer with the actual matlab code. A proposed network of irrigation canals is described in the accompanying diagram. At peak demand, the flows at

Please answer with the actual matlab code. A proposed network of irrigation canals is described in the accompanying diagram. At peak demand, the flows at interchanges A, B, C, and D are as shown.
Problem 1: Find the possible flows. Assume \( f_{2}=5\) and \( f_{5}=5\).
Hint: Define this system as a linear system. The flows should be positive integers. The coefficient matrix may come out to be singular. A singular matrix may signal that either there is no solution or we have a very large number of solutions. Accordingly, you may create an auxiliary equation by assigning an arbitrary value to one of the flows. For example, you might add \( f 5=5\) to the set of equations and then solve using the new matrices. Also, remember the flows should be positive integers.
Problem 2: Represent the network of irrigation canals as an adjacency matrix called B1 and plot in MATLAB. Label the edges with the flows found in the previous problem. Use a line width of 2 for plotting the graph.
Problem 3: Suppose the capacity of the canals are \( C 1=10, C 2=5, C 3=10, C 4=20, C 5=10\). Find the maximum possible flow from \( A \) to \( C \) and plot graph with flows. Add the edge flows as well as the edge names and use a line width of 2. Call the adjacency matrix as B2.***** Make sure to call the variable containing the maximum flow value with the following name: mf ******
Please answer with the actual matlab code. A

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!