Location of a production facility can be done by gravity method.
Gravity models find the location that minimizes the transportation cost of multiple raw materials to the production location from the raw material sources and the distribution finished goods to the consumption locations.
Mathematical Model of Gravity Method
xn, yn: coordinates of a supply source or consumption market
Fn: Cost of shipping one unit for one mile between the production facility and the supply source or consumption market.
Dn; Quantity transported between the production facility and the supply source or consumption market.
x, y : coordinates of proposed production facility
Calculate the distance between (xn,yn) and (x,y) = dn = SQRT [(x- xn)^2 + - yn)^2]
The location that minimizes total transportation cost is obtained by calculating x* and y* using formulas
x* = Sigma of [(DnFnxn)/dn]/Sigma of [(DnFn)/dn]
y* = Sigma of [(DnFnyn)/dn]/Sigma of [(DnFn)/dn]
You can see more detailed explanation of the model in the video below: