Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Network Analysis.

Problems 1.2
Throughout this analysis, the underlying principle is that for all the networks, the
flow_in = flow_out

1. Find the possible flows in each of the following networks


a. Allocating A,B,C and D to the nodes.

Node Flow In Flow out E

A f_2+f_3 f_1+50 f_1+50 = f_2+f_3

B 70+f_3+f_1 f_4 f_4 = 70+f_3+f_1

C f_4+f_5 50 50 = f_3+f_5+f_2

D 30 f_3+f_5+f_2 30 = f_3+f_5+f_2

# the augmented matrix


matrix_1 <- matrix(c(-1,-1,0,0,1,0,0,1,0,-
1,0,1,0,1,1,0,0,0,1,1,50,70,50,30),nrow = 4,byrow=FALSE)
matrix_1
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] -1 1 0 0 0 50
## [2,] -1 0 -1 1 0 70
## [3,] 0 0 0 1 1 50
## [4,] 0 1 1 0 1 30
# reduced_1 gives the reduced row echelon form after gauss jordan elimination

reduced_1 <- matrix(c(1,rep(0,3),-1,1,rep(0,2),0,1,rep(0,2),0,-


1,1,0,0,0,1,0),nrow=4,byrow=FALSE)
reduced_1
## [,1] [,2] [,3] [,4] [,5]
## [1,] 1 -1 0 0 0
## [2,] 0 1 1 -1 0
## [3,] 0 0 0 1 1
## [4,] 0 0 0 0 0

From the above matrix, f_5 and f_3 will be free variables.
The resulting equations are:

f_1 = -20 - (f_3+f_5)

f_4 = 50 - f_5

f_2 = 30 -f_3 -f_5

However, the solutions must be non-negative. There exists non-negative


solutions hence the network is inconsistent.

b.

Node Flow In Flow

A 75+f_4+f_3 f_4

B 50 f_1+f_3+f_5

C f_1 45+f_2

D f_2 40+f_4+f_7

E f_5+f_7+f_6 40

# the augmented matrix


values<- c(0,1,1,0,0,0,-1,0,-1,1,0,0,-
1,0,0,0,0,1,0,1,1,0,0,1,0,0,0,1,75,50,45,40)
length(values)
## [1] 32
matrix_2 = matrix(values,nrow=4,byrow=FALSE)
matrix_2
## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
## [1,] 0 0 -1 -1 0 1 0 75
## [2,] 1 0 1 0 1 0 0 50
## [3,] 1 -1 0 0 0 0 0 45
## [4,] 0 0 0 0 1 1 1 40
# the reduced row echelon form
reduced_2 <-
matrix(c(1,rep(0,3),0,1,rep(0,2),rep(1,3),0,rep(0,2),1,0,rep(1,2),0,1,rep(0,2)
,-1,1,rep(0,3),1,50,5,-75,40),nrow = 4,byrow = FALSE)
reduced_2
## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
## [1,] 1 0 1 0 1 0 0 50
## [2,] 0 1 1 0 1 0 0 5
## [3,] 0 0 1 1 0 -1 0 -75
## [4,] 0 0 0 0 1 1 1 40

f_4,f_6 and f_7 are free variables.

The possible flows are illustrated by:

f_1=85 + f_4 + f_7

f_2 = 40 + f_4 + f_7

f_3 = f_6 -75 - f_4

f_5 = f_4 - f_6 - f_7

Subject to the constraints: f_4 + f_7>=0, f_6 - f_4 >=75 and f_6 + f_7 >=40.

2. A proposed network of irrigation canals is described in Figure 2. At peak demand, the flows at
interchanges A, B, C, and D are as shown. a. Find the possible flows.

Interchange Flow In F

a f_2 50 + f_1

b f_1 + f_3 + 70 f_4

c f_4 + f_5 50

d 50 f_3 + f_2 + f_4


The augmented matrix will be:

matrix_3 <- matrix(c(rep(-1,2),rep(0,2),1,0,0,1,0,-


1,0,1,0,1,1,0,0,0,1,1,50,70,50,30),nrow = 4,byrow = FALSE)
matrix_3
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] -1 1 0 0 0 50
## [2,] -1 0 -1 1 0 70
## [3,] 0 0 0 1 1 50
## [4,] 0 1 1 0 1 30

The reduced row echelon form will be:

reduced_3 <- matrix(c(1,rep(0,3),-1,1,0,0,0,1,0,0,0,-1,1,0,0,0,1,0,-50,-


20,50,0),nrow=4,byrow=FALSE)
reduced_3
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 1 -1 0 0 0 -50
## [2,] 0 1 1 -1 0 -20
## [3,] 0 0 0 1 1 50
## [4,] 0 0 0 0 0 0

f_5 and f_3 are free variables.

The possible flows are illustrated by the solutions:

f_1 = -20 -f_3 -f_5

f_2 = 30 -f_5 - f_3

f_4 = 50 - f_5

where the constraints f_3+f_5>=20,f_5+f_3<=30 and f_5 <=50 are subjected on the
flow.

b. If canal BC is closed, what range of flow on AD must be maintained so that no canal carries a
flow of more than 30?
The range of flow that ensures no canal carries a flow of more than 30 when BC
is closed is 10<=f_2<=20

3. A traffic circle has five one-way streets, and vehicles enter and leave.
Nodes Flow In Flo

A 50+f_5 f_1

B f_1 f_2 + 50

C f_2 + 40 f_1

D 25 + f_3 f_4

E f_4 65 + f_5

In augmented form:

matrix_4 <- matrix(c(1,1,rep(0,3),0,-1,-1,0,0,0,0,1,-1,0,0,0,0,1,1,-1,0,0,0,-


1,50,50,40,25,65),nrow=5,byrow = FALSE)
matrix_4
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 1 0 0 0 -1 50
## [2,] 1 -1 0 0 0 50
## [3,] 0 -1 1 0 0 40
## [4,] 0 0 -1 1 0 25
## [5,] 0 0 0 1 -1 65

The reduced row echelon form:

reduced_4 <- matrix(c(1,rep(0,4),0,1,rep(0,3),rep(0,2),1,0,0,0,0,0,1,0,-


1,0,0,0,1,50,0,40,65,0),nrow=5,byrow=FALSE)
reduced_4
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 1 0 0 0 -1 50
## [2,] 0 1 0 0 0 0
## [3,] 0 0 1 0 0 40
## [4,] 0 0 0 1 0 65
## [5,] 0 0 0 0 1 0
The possible flows are therefore: f_1 = 50,f3=40, f_4=65 and f_5 = 0 where zeros
indicates there was no traffic.

b. Which road has the heaviest flow?


Road DE is the road with the heaviest traffic flow with a value 65

4. The network in Figure 4 shows the traffic flow (in vehicles per hour) over several
one-way streets in downtown Baltimore.
Determine the general flow pattern for the network.
Intersection Flow In

A 200 + 200 x_1 + x_2

B x_2 + x_4 200 + x_3

C 100 + 400 x_4 + x_5

D x_5 + x_1 450

The augmented matrix will be

matrix_5 <-
matrix(c(1,0,0,1,1,1,0,0,0,1,0,0,0,1,1,0,0,0,1,1,400,200,500,450),nrow=4,byrow
=FALSE)
matrix_5
## [,1] [,2] [,3] [,4] [,5] [,6]
## [1,] 1 1 0 0 0 400
## [2,] 0 1 1 1 0 200
## [3,] 0 0 0 1 1 500
## [4,] 1 0 0 0 1 450

The reduced row echelon form will be:

reduced_5 <-
matrix(c(1,0,0,0,0,1,1,0,0,0,0,1,1,0,0,0,1,1,1,0,0,0,1,1,400,200,250,500),nrow
=4,byrow=FALSE)
reduced_5
## [,1] [,2] [,3] [,4] [,5] [,6] [,7]
## [1,] 1 0 0 1 1 0 400
## [2,] 0 1 0 0 1 0 200
## [3,] 0 1 0 0 1 1 250
## [4,] 0 0 1 0 0 1 500

x_5 will be a free variable.

The solutions will be:


x_4 = 500 - x_5, x_2 = 0 and x_1 = 450 - x_5.

What is the possible range for the values of 𝑥1 and 𝑥2?

The possible range of values of x_1 and x_2 are:


x1: x_1<+450

and

x_2:50<=x_2<=500.

Can there be negative solutions?


Negative solutions do not constitute part of our solutions.

What does it mean if one of 𝑥1,𝑥2,𝑥3,𝑥4,𝑥5 is negative?


It suggests that the assumed flow direction for that street is incorrect based on
the problems constraints. It might indicate a need to reverse directions of flow
on that street in the solution or to identify any errors in problem formulations

You might also like