Extreme of linear function with linear constraints. The transportation problem
Two cement factories, $F_{1}$ and $F_{2}$, produce respectively 3000 and 4000 bags of cement everyday. That cement must be sent to three sales centers $C_{1}$, $C_{2}$ and $C_{3}$ in quatities of 3000, 2500 and 1500 , respectively. The transport costs of each factory to the points of sale are given, in euros per bag,
Determine how to distribute production so that transportation is as economical as possible.
We assume $x$ units to be transported from $F_1$ to $C_1$ and $y$ units to be transported from $F_1$ to $C_2.$ We obtain all the others taking into account $x$ and $y$ and the total units to send from the factories and to receive at the sales centers.
Cost
We obtain the cost for each of the 6 itineraries by multiplying the number of units (table 2) by the cost per unit (table 1). We get the total cost by adding the 6 different cases.
Simplifying
Constraints
The constraints are that the number of units transported from each factory to each sales center must be positive. As there are 6 distribution channels we have 6 constraints
Problem
Minimize $$C=19000-0.5x-2.5y$$
with the constraints (we rearrange the previous conditions)
$$ \begin{array}{c} x+y \le 3000 \\ x \le 3000 \\ y \le 2500 \\ x+y \ge 1500 \\ \\ x,y \ge 0 \end{array} $$The conditions $x\geq 0$ and $y\geq 0$ mean that the region of the plane described by the constraint must be in the first quadrant.
The condition $x \le 3000$ means that $x$ must be to the left of the vertical line $r_1$ that passes through $3000$ and $y \le 2500$ means that $y$ must be below the horizontal line $r_2$ that passes through $2500$
We draw the other borders of the region where the solution is to be found. We have two lines $r_3$ and $r_4$
and $r_{3}$ intersects with $OX$ in $x=3000$ and with $OY$ in $y=3000$. Similarly, $r_{4}$ intersects with $OX$ in $x=1500$ and with $OY$ in $y=1500$.
Each of these lines divides the plane into two regions, one that meets the condition and the other that does not. Therefore, it is enough to try with a point and if this point meets the condition, the region of the plane where this point is located belongs to the region.
For simplicity, we try with the origin $\left(0,0\right)$
Also,
So the region is the intersection of the three regions (pink, blue, and green) and it is the region represented in yellow, which is in the first quadrant because in addition $x\ge 0$ and $y\ge 0.$
The minimum will be at one of the vertices (or sides) of the polygon that surrounds the area. So we need to calculate the vertices.
We compute the value of the function
$
C=19000-0.5x-2.5y
$
at these points
And the minimum is in $D$ with $x=500$ and $y=2500$, because, at this point, the value of the function is minimum. We obtain the solution of the problem substituting these values in the table
the values $x=500$ and $y=2500$
And the solution is
As we can see, we are avoiding high-priced transportation to carry cement at $C_2$ and $C_3$ and we compensate by distributing transportation to $C_1$ where prices are more similar