## 4 Distribution Problems
### Location Problem  
The _Location Problem_ is an extension of the allocation problem [12]. For clarity, let us first summarize all the symbols used.  
Consider \(m\) locations with capacities \(a_{i}\), \(i=1,\ldots,\,m\) that can be used to operate warehouses supplying \(n\) customers with demands \(b_{j}\), \(j=1,\ldots,\,n\). The operation of the warehouse at the \(i\)th location requires a cost \(f_{i}\), \(i=1,\ldots,\,m\) for the given period. Let \(c_{ij}\), \(i=1,\ldots,\,m,\,j=1,\ldots,\,n\) be the cost of the \(j\)th customer being assigned to get the required quantity from the \(i\)th location.  
The aim is to decide in which locations to operate the warehouses and to find the assignment of customers to the operated warehouses so that the value of the total cost of operating the system is minimal. Like in the allocation problem, we assume that the demands of each consumer must be covered from a single warehouse.  
Therefore, the meaning of the binary decision variables \(x_{ij}\) is analogous to the allocation problem, \(x_{ij}=1\), if the quantity \(b_{j}\) required by the \(j\)th customer is provided from the warehouse at the \(i\)th location, if not, \(x_{ij}=0\).  
In addition, there are other binary decision variables \(y_{i}\), \(i=1,\ldots,\,m\), where \(y_{i}=1\) means that the warehouse at the \(i\)th location will be operated and, if \(y_{i}=0\), it will not be operated there.  
The model of the location problem with these conditions has the following form:  
\[z=\sum_{i=1}^{m}\sum_{j=1}^{n}c_{ij}x_{ij}+\sum_{i=1}^{m}f_{i}y_{i}\rightarrow\min \tag{43}\]  
subject to  
\[\sum_{i=1}^{m}x_{ij}=1,\;j=1,\,\ldots,\,n \tag{44}\]  
\[x_{ij}\leq y_{i},\;i=1,\,\ldots,\,m,\,j=1,\,\ldots,\,n \tag{45}\]  
\[\sum_{j=1}^{n}b_{j}x_{ij}\leq a_{i},\;i=1,\,\ldots,\,m \tag{46}\]  
\[x_{ij}\in\{0,1\},\;i=1,\,\ldots,\,m,\,j=1,\,\ldots,\,n \tag{47}\]  
\[y_{i}\in\{0,1\},\;i=1,\,\ldots,\,m \tag{48}\]  
As in the allocation problem, the condition (44) means that each customer takes the entire requested quantity from a single location, the condition (46) monitors the non-overstocking of individual locations by customers receiving the requested quantity from the same location.  
Let us have a look at condition (45). The left and right sides are binary variables with the inequality satisfied for the combinations \(0\leq 0\), \(0\leq 1\) and \(1\leq 1\), but not for the combination \(1\leq 0\). This ensures that no customer can get anything from a location where the warehouse will not be operated.  
It is clear that, for all combinations of indices \(i\) and \(j\), (45) represents a system of \(mn\) conditions. Expressing this for the values of the indices \(j\), we get:  
\[x_{i1}\leq y_{i},\ i=1,\ \ldots,\ m\] \[x_{i2}\leq y_{i},\ i=1,\ \ldots,\ m\] \[\vdots\] \[x_{in}\leq y_{i},\ i=1,\ \ldots,\ m\]  
Summing up the previous inequalities, we get:  
\[x_{i1}+x_{i2}+\cdots+x_{in}\leq y_{i}+y_{i}+\cdots+y_{i}\ i=1,\ \ldots,\ m,\]  
and hence  
\[\sum_{j=1}^{n}x_{ij}\leq ny_{i},\ i=1,\ \ldots,\ m \tag{49}\]  
Equation (49) is equivalent to (45), but is simpler because it represents only \(m\) conditions rather than the \(mn\) conditions in the original expression (45).