# On the Use of Biased-Randomized Algorithms for Solving Non-Smooth Optimization Problems
## 4 Applications in Logistics  
The field of logistics encompasses several problems, including supply chain design, facility location, warehouse management, etc. All of these problems have been studied extensively in the literature, mostly with the consideration of hard constraints and smooth objective functions. Nevertheless, as previously discussed, real-world problems in the field of logistics may allow some constraints to be violated by incurring a penalty cost, which needs to be incorporated into the objective function. This typically leads to the emergence of non-smooth objective functions. Therefore, traditional exact methods cannot always be efficiently employed to solve these problems and heuristic-based algorithms are required. This section focuses on the use of BRAs in solving the facility location problem (FLP) [48] and its variants. This problem consists of locating a set of facilities--e.g., production plants, distribution centers, warehouses, etc.--from which a set of customers must be served. Basic decisions are as follows: (i) which potential facilities must be open (or remain open) and which ones must be closed (or not open) and (ii) how to allocate customers to open facilities. This problem is _NP-hard_[49]. Moreover, facilities can be considered capacitated or uncapacitated. The former refers to the case in which each facility has a limited capacity that cannot be exceeded by the total demand served from there. In the latter, the facilities' total capacity is virtually infinite or at least much greater than the cumulative demand of all customers. Figure 3: Biased-random sampling of elements from a list using a geometric distribution. BRAs have been applied successfully to solve both capacitated and uncapacitated FLPs. The latter has been tackled mainly considering hard constraints [50]. In [PERSON] and [PERSON] [51], the authors considered a multi-period FLP in which customers are sensitive to delivery lead times (i.e., some flexibility is allowed regarding the delivery dates). Using similar concepts, [PERSON] et al. [52] consider soft constraints and a non-smooth and non-convex objective function for the single-source capacitated FLP. In this context, \"single-source\" refers to an additional constraint stating that each customer must be served from just one facility. The capacity of each facility may be exceeded by the consideration soft constraints. In real world, decision-makers manage this by using strategies such as storing safety stocks, performing emergency deliveries, and outsourcing part of the customers' service. These strategies tend to generate additional costs that need to be considered as well during the optimization process. The aforementioned authors propose the following model to represent the single-source FLP with soft capacity constraints:  
Minimize \[\sum_{i\in I}f_{i}^{*}y_{i}+\sum_{(i,j)\in I\times J}c_{ij}x_{ij}\] subject to: \[\sum_{j\in I}x_{ij}=1 \forall\;i\in I\] \[x_{ij}\leq y_{j} \forall\;(i,j)\in I\times J\] \[y_{j}(1-y_{j})=0 \forall\;j\in J\] \[x_{ij}(1-x_{ij})=0 \forall\;(i,j)\in I\times J\] \[y_{j}\in\mathbb{R} \forall\;j\in J\] \[x_{ij}\in\mathbb{R} \forall\;(i,j)\in I\times J\]  
In this model, \(x_{ij}\) is a binary variable that takes the value of \(1\) if customer \(i\) is serviced by facility \(j\) (0 otherwise). Similarly, \(y_{j}\) is another binary variable that takes the value \(1\) if facility \(j\) is open; \(c_{ij}\) is the service cost of assigning customer \(i\) to facility \(j\); and \(f_{j}^{*}\) is a piecewise function representing the cost of opening a facility \(j\):  
\[f_{j}^{*}= \begin{cases}f_{j}&\text{if }\sum_{i\in I}d_{i}x_{ij}\leq s_{j}y_{j} \\ f_{j}+\lambda\left(d_{j}^{*},s_{j}\right)&\text{otherwise}\end{cases}