Solution (source code)

= Solution

Summing the <flow conservation> equations over all four junctions cancels every internal flow. The total entering flow is $300+500+250+50+100=1200$, and the known exiting flow is $700+200=900$. Thus
$$
\boxed{f_1=1200-900=300.}
$$
The original arrows point $A\to B$, $C\to A$, $B\to D$, and $C\to D$ for $f_2,f_3,f_4,f_5$, respectively. In particular, $f_1$ exits north from $A$.<Digital systems, linear algebra, introduction to formal proof examination paper by the University of Oxford (2014)>[Question 4(b) traffic diagram, printed page 5]{ref}

The individual <flow conservation> equations are
$$
\begin{aligned}
A:&\quad300+f_3=f_1+f_2,\\
B:&\quad500+250+f_2=f_4,\\
C:&\quad50+100=f_3+f_5,\\
D:&\quad f_4+f_5=700+200.
\end{aligned}
$$
Choose $t=f_5$. Substitution gives all solutions of these <linear equations>:
$$
\boxed{(f_1,f_2,f_3,f_4,f_5)=(300,150-t,150-t,900-t,t),\qquad0\leq t\leq150.}
$$
The inequalities enforce nonnegative flows on all one-way streets. The last junction equation follows from the first three and total <flow conservation>, so it introduces no further restriction.

The maximum is $\boxed{f_5=150}$. It makes $f_2=f_3=0$. At $A$, all 300 vehicles arriving from the west turn north and leave along $f_1$; none arrives from $C$ or continues east to $B$.