OK, goods are transported from both docks m and n to depots a b and c (see attached image). m can handle up to twice as many goods as n and the capacity of each depot is equal. I have the distances between each point and my task is to use linear programming to minimize the total distance traveled.

My problem is I don't know how linear programming can be adapted to this kind of problem with both capacities and distances. Can anyone start me off please?