
Therefore:


max: c_{1}x_{1} + c_{2}x_{2} + ... + + c_{n}x_{n} s.t.: a_{11}x_{1} + a_{12}x_{2} + ... + + a_{1n}x_{n} ≤ b_{1} a_{21}x_{1} + a_{22}x_{2} + ... + + a_{2n}x_{n} ≤ b_{2} ... a_{m1}x_{1} + a_{m2}x_{2} + ... + + a_{mn}x_{n} ≤ b_{m} 


x_{ij} = amount of flow from i → j 



x_{01} ≤ 3 x_{02} ≤ 2 x_{03} ≤ 2 x_{14} ≤ 5 x_{15} ≤ 1 x_{24} ≤ 1 x_{25} ≤ 3 x_{26} ≤ 1 x_{35} ≤ 1 x_{47} ≤ 4 x_{57} ≤ 2 x_{67} ≤ 4 

node 1: x_{01} = x_{14} + x_{15} node 2: x_{02} = x_{24} + x_{25} + x_{26} node 3: x_{03} = x_{35} node 4: x_{14} + x_{24} = x_{47} node 5: x_{15} + x_{25} + x_{35} = x_{57} node 6: x_{26} = x_{67} 

Example:
Objective function:
max: x_{01} + x_{02} + x_{03} 
How to run the program:

Output:
Value of objective function: 6.00000000 Actual values of the variables: x01 3 x02 2 x03 1 x14 3 x15 0 x24 1 x25 1 x26 0 x35 1 x47 4 x57 2 x67 0 
Corresponding max flow:

max: x_{70} s.t.: x_{01}  x_{14}  x_{15} = 0 x_{02}  x_{24}  x_{25}  x_{26} = 0 x_{03}  x_{35} = 0 x_{14} + x_{24}  x_{47} = 0 x_{15} + x_{25} + x_{35}  x_{57} = 0 x_{26}  x_{67} = 0 x_{70}  x_{01}  x_{02}  x_{03} = 0 x_{47} + x_{57} + x_{67}  x_{70} = 0 x_{01} ≤ 3 x_{02} ≤ 2 x_{03} ≤ 2 x_{14} ≤ 5 x_{15} ≤ 1 x_{24} ≤ 1 x_{25} ≤ 3 x_{26} ≤ 1 x_{35} ≤ 1 x_{47} ≤ 4 x_{57} ≤ 2 x_{67} ≤ 4 
How to run the program:

>> lp_solve lp1 Value of objective function: 6.00000000 Actual values of the variables: x70 6 x01 3 x14 3 x15 0 x02 2 x24 1 x25 1 x26 0 x03 1 x35 1 x47 4 x57 2 x67 0 