A New Formulation for the Capacitated Lot Sizing Problem with Batch Ordering Allowing Shortages

: This paper addresses the multi-product, multi-period capacitated lot sizing problem. In particular, this work determines the optimal lot size allowing for shortages (imposed by budget restrictions), but with a penalty cost. The developed models are well suited to the usually rather inﬂexible production resources found in retail industries. Two models are proposed based on mixed-integer formulations: (i) one that allows shortage and (ii) one that forces fulﬁlling the demand. Both models are implemented over test instances and a case study of a real industry. By investigating the properties of the obtained solutions, we can determine whether the shortage allowance will beneﬁt the company. The experimental results indicate that, for the test instances, the fact of allowing shortages produces savings up to 17% in comparison with the model without shortages, whereas concerning the current situation of the company, these savings represent 33% of the total costs while preserving the revenue.


Introduction
Today's companies are immersed in a globalized market crammed with considerable demands for different products. Regardless of the size or type of industry, the selling business always involves two parties: customers and sellers. Customers search for quality products that meet their requirements, whereas companies search for adaptive strategies to compete against each other and satisfy the preferences of their individual customers while minimizing any negative impact on their operations and other aspects of their businesses [1].
One of the most integral operations of a company is inventory management, because many resources are expended on goods and products that will generate profits for the company. Yet, the purchased materials must be ordered at an economic price and then stored. On the other hand, companies that sell products in large quantities or with high variability in their demand commonly face the overstock problem, wherein the optimum stocking level is exceeded, and the stored products cannot be sold beyond an estimated time. This is the problem faced by a Mexican textile and footwear distributor that inspired this research. This company handles several products in catalogues and sells (1) studies considering space or monetary budgets; (2) studies on lead time; and (3) studies considering batch size.
First, among the studies considering space or monetary budgets, Ben-Daya and Raouf [17] developed an algorithm that optimizes the ordering policy in the multi-item, single-period inventory problem, within the context of perishable commodities. In this study, the algorithm determines the setup costs and lot size decisions when items compete for budgetary and floor-or shelf-space restrictions. Any shortage is translated into a penalty cost, and the excess of products (above demand) is disposed at a reduced price. Nonetheless, the policy is fixed during the planning horizon and does not consider the possibility of replenishment. A few years later, Guan and Li [18] presented two models of lot size, one with a restricted storage capacity and a second with a constraint on the order capacity. Meanwhile, a different study was developed by Fan and Wang [19], who modelled a lot size problem that sought to reduce ordering and storing expenses in a scenario where the size of the warehouse could be altered at a cost for each change in capacity. One more study was conducted by Woarawichai et al. [20], who developed an MILP for the multi-period inventory lot size problem with supplier selection under storage and budget constraints. The authors introduced a supplier-dependent transaction cost, but the order lead time was deterministic and assumed identical for all products, which limited the contribution of the model.
Second, among the studies on lead time, Karmarkar [21] related the lead time to lot size and concluded that extending the lead time negatively affected the response to customers. The author also argued that small batches created more setups while large batches lengthened the lead time. Some years later, Ben-Daya and Raouf [22] reviewed different inventory models that considered the lead time and order quantity as decision variables. However, most of the revised works assumed an invariant lead time over the entire planning horizon. For this reason, Kuik et al. [9] defined these models as finite capacity models. Meanwhile, Hariga and Ben-Daya [23] developed a continuous-review inventory model in which the reorder point, the ordering quantity, and the lead time were the decision variables, followed by Ouyang, Chen, and Chang [24], who studied a reorder-point inventory model with a variable lead time and partial backorders in an imperfect production process. These authors similarly defined the lead time as a decision variable to be minimized, in combination with other variables such as lot size, reorder point, process quality, and setup cost. A more recent study conducted by Helber and Sahling [25] solved a dynamic multilevel CLSP with positive lead times by a mathematical programming approach. Here, the authors developed an iterative procedure that fixed the products to be purchased in each period and then optimized the lot size of each purchased item. They developed four variants of this procedure with different decomposition structures to diversify the search in the solution space.
Finally, among studies considering batch size, more recent studies have been carried out. For example, Yang et al. [26] analyzed the optimal inventory management of a single product that is purchased in batches. This method accounts for the placement cost in a limited warehouse capacity. A different algorithm was later proposed by Akbalik et al. [27], who addressed a company that buys its products in batches and varies the storage cost when supply exceeds the determined capacity. At the same time, Farhat et al. [28] studied batch purchases with the option of returning the items that were not sold to the supplier. When the products purchased in batches are perishable, they must be treated with special care, and the model must consider a series of constraints, as proposed by Broekmeulen and van Donselaar [29].
As shown in this section, there is a vast literature addressing different variants of the lot sizing problem. Yet, literature focusing on optimizing the CLSP by considering variable batch sizes and variable delivery times (lead times) in retail applications is very scarce. In addition, many articles apply discounts when buying in large volumes, which is managed differently by the company under study.

Problem Statement
The problem analyzes a retailer who buys products in large quantities (lot sizes) from manufacturers and then sells them in smaller quantities (possibly single units) to consumers. The ordered quantities are merely considered as integer multiples of the batch size of each item. The retailer, should decide "what products to order", "how much to order for each product", and "when to order".
Unlike common lot sizing models in manufacturing environments, in our model, the retailers depend mainly on the lead time (LT) established by the suppliers. To ensure their timely receipt, purchase orders must be placed ahead of time (i.e., in advance). This anticipation is represented by an artificial shift (ST) created over the planning horizon, where the periods to be phased out are added before the first week of demand.
The following example attempts to show how the artificial shift over the time horizon periods will work. The instance considers three products to be purchased within a planning horizon of six (r = 6) periods (1, . . . , r). Item 1 belongs to imported products, i.e., is provided by an external supplier. The demand for each product in each period is displayed in Table 1. The lead time (LT) of items 1, 2, and 3 are 3, 1, and 2 periods, respectively. The batch sizes of Items 1, 2, and 3 are 200, 200, and 150 units, respectively.
To create the shifted horizon (ST), we must determine the maximum number of periods that must be added to the horizon planning time. We assume that the maximum lead time (LTmax) is the maximum LT of the imported products (LTmax = 3 in this example). Therefore, the end of the time horizon is shifted from the sixth (r) to the ninth period (s = r + LT max ). Table 2 shows the corresponding demands over the ST shifted horizon in the illustrative example.  As shown in Table 2, the first three periods represent the artificial shift (with zero demand values). From the fourth to the ninth period, the demands correspond to those of the original planning horizon (Table 1).
Since the company has the policy of paying the orders in advance (to seize the discount prices), we formulated the model to take into account this feature. For this reason, we considered the shifted time horizon, in which the company can place the orders LT i periods ahead (depending on the item) of the period in which they will be sold. To avoid dealing with negative indices, the first demand period is shifted to the LT max + 1 period.

Mathematical Formulation
In this section, we formally define the addressed problem and propose an MILP formulation. Prior to that, let us introduce the following sets and parameters: Two particular features must be considered in the proposed model. On the one hand, the company classifies the items into two categories: imported (purchased from external suppliers) and domestic (acquired from internal manufacturers). On the other hand, imported items share a common lead time that requires the placing of future orders. Therefore, for them, only an initial order must be placed. For this reason, imported items represent the first items in the N set.

MILP Formulation with Shortages
The problem consists of determining the purchase orders, i.e., the quantity of batches to be purchased per item over the planning period, in such a way that the total cost incurred by the holding, shortages, and final inventory costs are minimized. We also determined the maximum inventory levels in order to take advantage of the availability of space in the warehouse.
Let us introduce the following decision variables to establish the mathematical model: X it = Quantity of batches of item i to purchase at period t.
I it = Quantity of units of item i to hold in inventory at period t.
Z it = Quantity of shortage units of item i at period t.
R i = Maximum allowed inventory of item i in any period.
The objective function (1) aims to minimize three terms: the holding cost, the shortage cost, and the final inventory costs. The third term is considered only over the last period stock per item.
The balance equation for item i in period t (equals the sum of the inventory over the previous period and the purchase in the current period, minus the remaining surplus in the current period) is established by Equation (2).
The maximum allowable inventory of each item in each period is ensured by Equation (3). Meanwhile, Equation (4) ensure that, for each item, no inventory is generated before the LT max period.
For imported items, only one purchase order must be placed, and it should be placed at the beginning of the time horizon; this is ensured by Equation (5).
The amount of the initial purchase cannot exceed the budget assigned at the first original time period; this is ensured by Equation (6), while the total lot size based on the weekly budget is ensured by Equation (7).
Based on the batch size of each item, the maximum allowable quantity of purchased batches (in general) of item i is determined by Equation (8).
The units of shortage per item and per period is estimated by Equations (9) and (10), respectively.
The nature of the variables is established by the group of Equations (11)- (15).
This model will be referred to as the "AS model" in the computational experiments section. Let us continue with the illustrative example of Section 3. The optimal solution has an objective function value of $33,895.40. Table 3 shows the purchase orders of each item over the planning period.  During the first three periods, the purchases listed in Table 3 satisfy the demands in the fourth period. The created inventories and shortages of each item are described in Tables 4 and 5, respectively.

MILP Formulation without Shortages
To evaluate properly if allowing the model to consider shortages was beneficial, a second formulation that did not allow having shortages was developed to compare. The version without shortages is denoted as "WS model". The WS model was obtained by removing the Z it variables from the AS model and also removing the equations involving them. In particular, Equations (2), (9), and (10) were reformulated in terms of the inequalities proposed in [30]. The reformulated expressions are given by (16), (17), and (18) respectively: Under these equations, the model must fulfill the demand of each period. In particular, Equation (16) balances the inventories to suit the demand in period t. Equation (17) imposes an inventory in weeks when no purchases will be placed. Finally, Equation (18) places an upper bound on the maximum purchase amount in a specific period.
In addition, the objective function (1) is modified by removing the component of shortage. It will be stated as shown in Equation (19). For the sake of clarity, we present the condensed MILP formulation; from the AS model, this model preserves Equations (3)-(8) and (11)-(15).
subject to: In the following section, the experimental results and a discussion about the advantages and disadvantages for each mathematical model will be presented.

Computational Experiments
This section is devoted to the implementation and experimental results of the two proposed formulations. The validation was performed over a test set of random instances. The performance assessments were over the instances' size and the CPU time. We also present the results over the instance of the case study that motivated this research.
The computational experimentation was executed on a Workstation Think Centre, ThinkStation P910 Xeon E5-2620, and a Windows 10 operating system. The mathematical model was coded using Visual Studio 2019 and solved by the commercial solver CPLEX 12.9. The time limit was set to two hours (7200 s).

Case Study
As explained in the Introduction Section, this study was motivated by a real problem in which a retailer sells clothes, shoes, and accessories by catalogue. This company has over 29 years of experience in the market and manages two sales seasons per year: the spring-summer season and the autumn-winter season. In each 21 week season, the company handles around 465 stock-keeping units (items) purchased from different suppliers. Each supplier has its own delivery time (lead time). Around 30% of these items (139 out of 465) belong to the category of imported, and the remaining 70% are domestic. In the case of the imported items, the length of the lead time (seven weeks) requires the company to place replenishment orders. For this reason, they established the policy of placing only an initial purchase order, purchasing as much as possible. To ensure competitive prices, the suppliers also stipulate batch ordering of their items, which complicates the purchase and inventory management policy. Currently, the company performs the ordering process empirically, through a purchasing department involving approximately 20 personnel. Each person is in charge of purchasing certain items and considers both the placement and the order size under individual criteria. As these criteria are non-standardized (i.e., there is no institutionalized ordering scheme for either time or order size), the fear of overfilling the inventory constantly generates an opportunity cost. For this reason, the company decided to incorporate efficient methods for determining the appropriate number of orders per week, as well as the number of orders per item type that would minimize both the costs of placing purchase orders and keeping the inventory. To fulfill this need, we developed an efficient ordering scheme policy based on MILP.

Test Instances
Based on the case study instance that considered 465 items, we created nine different instances by randomly selecting subsets of items from the case study instance (10, 20, 30, or 50 items). As in the case study, we preserved the percentages of items provided by external and internal suppliers (30% and 70%, respectively).
For each subset size, we generated four instances. Each instance was labelled by "X-Y", where X and Y denote the number of items and the instance number, respectively.
The demands, lead times, setup order costs, batch sizes, unitary purchasing costs, and holding cost of the items in a specific instance were decided from the case study instance. The initial and periodical budget were proportionally scaled regarding the vales considered for the case study instance. The time horizon was set to 21 weeks, and the penalty cost per unit of shortage was set to 2.5 times the unitary purchasing cost.

Experimental Results over the Test Instances
The AS model was solved by the commercial solver CPLEX 12.9. The results obtained for the test instances are reported in Table 6. The first column displays the instance name, while columns 2, 3, and 4 report the integer solution, the best bound obtained, and the GAPreported by the commercial solver, respectively. For optimal solutions, the GAP value reported is zero. Finally column 5 reports the elapsed CPU time. According to the results, the model solved to optimality eight out of 16 instances. For the remaining instances, it reached the specified time limit imposed on the solver. The GAPs deviated by up to 1.30% from the best bound. Among these instances, the average GAP was only 0.43%. Based on these results, the model showed a reasonable performance by providing high-quality integer values.
In particular, from the instances of 30 and 50 items, the formulation was unable to obtain optimal solutions; for those instances, we decided to increase the time limit of 7200 s imposed on the solver in pursuit of getting optimal solutions. However, the commercial solver got stuck in a positive GAP after more than 10,000 s. We analyzed the behaviour of the solver during the solution process on a test instance, evaluating the behaviour of the GAP when the elapsed time increased. Figure 1 illustrates this behaviour for Instance 30-1. Due to this, we decided to preserve the time limit of 7200 s for solving the case study. Another point to highlight is that, for the instance of 50 items, the solution value was significantly higher than the rest of the cases. When revising in detail the cost segments contributing to the objective function, we realized that, for some cases, the model preferred to generate a high level of shortage, in particular for imported items. Based on this result, we could infer that the model determined when it was worth purchasing products or leaving a shortage in pursuit of minimizing costs. To validate this hypothesis, we conducted a complementary analysis by evaluating the case in which the formulation must fulfill the demand, through the WS model. The next section presents the results of this comparison.

Comparison between the AS Model and WS Model over Test Instances
The WS model was solved by the commercial solver CPLEX 12.9. The results obtained for the test instances are summarized in Table 7. In this table, column 1 indicates the instance name, whereas columns 2, and 3 display the objective function and the elapsed CPU time, respectively.
As expected, the WS model solved all of the instances to optimality and produced higher objective function values than the AS model. In particular, the AS model obtained solutions that produced savings up to 35.80% of the objective function. However, we conducted a Man-Whitney analysis with a confidence level of 95 % to determine if the the savings were statistically significant. The alternative hypothesis (H a ), "the WS model computes higher objective function values than the AS model", was evaluated against the null hypothesis (H o ) "there is no objective function value difference between the models". The obtained p-value was 0.107, which accepted the null hypothesis that, eventually, both models could produce an equivalent total cost. Another important aspect to analyze is the one related to the inventories. In this case, the inventory cost of the WS model was compared with the inventory cost plus the opportunity cost of the AS model. The results are displayed in Table 8. For this table, column 1 displays the instance name, column 2 the Inventory Costs (IC) for the WS formulation, columns 3 and 4 the inventory cost, the Opportunity Cost (OC), and the Total Cost (TC) composed by the sum of the inventory cost and the opportunity cost (lost-sales costs), for the AS formulation, respectively. Column 6 estimates the savings gained by AS (monetary savings), and column 7 presents the percentage of savings of the AS model over the WS model (% of savings AS vs. WS). In the table, IC, OC, and TC are estimated by Equations (20), (21), and (22), respectively: From Table 8, we observe that the AS model, in terms of inventory costs, was more cost effective than the WS model, producing savings up to 35.8%. However, the total cost, composed by the inventory and opportunity cost, presented a mixed behaviour, showing that 68.5% of the instances produced savings (values with a positive sign in the last column) when the AS model was compared with the WS model. We also observed that the WS approach produced higher values (up to 18%) of inventory costs than the AS model. Thus, the AS formulation could be useful to decrease the overstock while ensuring the availability of items (i.e., minimizing the shortage levels).
In particular, for the 20-3 instance and all 30 item instances, it was observed that the AS model produced an opportunity cost (estimated as the prices of the unsold items) that, after being added to the inventory cost, exceeded the inventory cost created by the WS model. The effect could be explained by the fact that, in order to minimize the final inventory, the AS model preferred to generate a high level of shortages in the last period, which was less expensive than buying complete batches that would be penalized at the end of the time horizon. However, in general, the AS model produced lower opportunity cost values, which also supported the fact that the model offered the advantage of determining which products should be prioritized at the time of purchase for each period. In terms of CPU time, the WS model optimized the test instances within 4 s of CPU time, whereas for the AS model, the fastest instance required almost 9 s to solve to optimality. The results of the WS model could be used to obtain a "fast" purchasing plan in which all items will have overstock, and with the aim of minimizing the inventory levels, the company could create a clearance or sales strategy for the last period.
The inventory cost is commonly used to assess the efficiency of the overall purchase policy. We compared the final inventory costs of the two models. The results are reported in Table 9. Column 1 shows the instance name and columns 2 ans 3 the final inventory cost for the WS model and the AS model, respectively. Column 4 shows the percentage of saving of the AS model over the WS model. From Table 9, the AS model saved up to 93% of the final inventory cost computed in the WS model. Even when there was not significant evidence of savings with respect to the objective value against the AS model, a statistical analysis was conducted to determine if the AS model produced significant savings regarding the final inventory cost. We analyzed the results of the test instances by performing a hypothesis test. Given the distribution of the costs, a Mann-Whitney (non-parametric test) with a confidence level of 95 % was selected again for this purpose. The alternative hypothesis (H a ), "the WS model computes higher final inventory costs than the AS model", was evaluated against the null hypothesis (H o ) "there is no final inventory cost difference between the models". The test yielded a p-value of 0.013, which supported the evidence that the WS model computed higher final inventory costs than the AS model. However, the WS model reached the optimal results in a significantly shorter CPU time than the AS model. Based on these findings, we could conclude that the WS model could be used to determine the total cost for the worst scenario (i.e., avoiding shortages). In other words, by the WS model, it was possible to obtain an upper bound for the AS model.

Experimental Results over the Case Study
To conclude the present set of computational experiments, the performances of the WS and AS models were compared on real data provided by the company. Whereas the WS model solved this instance to optimality in 15.94 s, the AS model reached the time limit of 7200 s and reported a GAP of 0.81%. Regarding the objective function values, Table 10 summarizes the results. In this table, columns 1 and 2 provide the objective function value obtained by the WS and AS models, respectively. Columns 3 and 4 display the savings of the AS model over the WS model, in monetary and percentage terms, respectively. It is important to note that the AS model achieved significant monetary savings, which represented almost 17% of the total cost incurred by the WS model. In the real situation, these savings rose up to 33.33% with regard to the last year's operation costs of the company (their costs according to our proposed objective function were equal to $44,078,209). For the case of the administration of the warehouse capacity, it could be observed that, according to the results of the R i variables, the AS formulation distributed the maximum inventories of the items in a way that the total stock in any period did not exceed 70% of the full capacity. In the case of the WS model, this value was not superior to 90%. Finally, the comparisons of the final inventory between both models is presented in Table 11. In the real situation, the company incurred a final inventory cost of $195, 778.50. Therefore, both models improved this cost substantially. In particular, the AS model recovered approximately 32.29% of the inventory cost, increasing the company's profits by approximately 1.2%.

Conclusions and Future Work
This work addressed the capacitated lot sizing problem with lead times, batch ordering, and shortages. This problem was motivated by a retail company that sells clothes, shoes, and accessories by catalogue. The problem considered a retail environment in which items were not produced, but purchased from manufacturers (suppliers) who stipulated the batch ordering and who provided different delivery times (lead times) for each item. The problem was modelled and solved via an MILP formulation.
Two mathematical formulations were developed, one that allowed shortage (AS model) and another that did not (WS model). In the AS version, instances up to 20 items were solved to optimality, whereas the WS version solved all instances. The performance of the formulation was evaluated on different instance sizes. The AS model obtained significant savings (up to 17%) over the current situation of the company. Most relevantly, both mathematical formulations significantly improved the current situation of the company, saving up to 33% of the current final inventory costs. These results would be of interest to both academics and practitioners.
To assess whether introducing shortages benefited the company, we compared the final inventories computed by both models. The inventory costs in the AS version were cost-effective in all cases, but these savings were not statistically different from the savings gained in the WS model. In addition, the WS version optimized the test instances within 16 s of CPU time. In the case study, the best obtained solution deviated by 0.80% from the lower bound after reaching the specified time limit.
This research contributes to the body of knowledge as it optimized the CLSP by considering multiple items along with variable batch sizes and variable delivery times (lead times) in a retail environment. Still, the study addressed a comprehensive problem in the retail industry, but the approach assumed the following: first, there was a deterministic demand, which represented the first limitation of this study; and second, suppliers presented the right deliveries in terms of quality and amount and time, which represented the second limitation of this study. Any change to these assumptions would create a different scenario that should be addressed in a very particular way.
Further research should consider stochastic environments, in particular the uncertainty in the demand and/or lead times. Moreover, considerations such as the quality and timely deliveries by the suppliers can be questioned since these scenarios might not reflect 100% of the real-life cases. Including these variants will bring value to the lot sizing problem literature. Other considerations may include not only the lost-sales costs, but the cost of losing future customers in order to improve the estimation of opportunity costs. Finally, high-quality solutions within short computational time frames can be obtained by heuristics and metaheuristic algorithms. The models presented in this study will benefit companies by providing a good starting point to facilitate their decision-making process.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: