A Mathematical Model for an Inventory Management and Order Quantity Allocation Problem with Nonlinear Quantity Discounts and Nonlinear Price-Dependent Demand

: This article focuses on solving the order quantity allocation problem for retailers. It considers factors such as quality constraints, nonlinear quantity discounts, and price-dependent demand. By formulating it as a nonlinear maximization problem, the article aims to ﬁnd the best combination of suppliers and order quantity out of inﬁnite solutions to maximize the retailer’s proﬁt. The main contribution of this research is a new mathematical model that can solve the problem of quality constraint and demand in a single step. This problem is complex due to the number of equations, their nonlinear nature, and the various trade-offs given by the market. Additionally, this research considers demand as output and includes price-dependent demand, which is more realistic for retailers. The proposed model was tested using an example from the recent literature and showed better results than the previously published best solution regarding proﬁt maximization.


Introduction
Efficient inventory management is crucial for large companies and retailers as it directly affects profitability [1,2]. A retailer's profits rely on factors such as the cost of purchasing items, the selling price, and the number of items sold in a given period. Therefore, to maximize profits, retailers can increase the number of items sold, the difference between the purchasing and selling costs, or both.
This study focuses on the Economic Order Quantity (EOQ) problem, which involves choosing the appropriate supplier, selecting the order size or percentage of total demand, and determining the order cycle. The EOQ problem can optimize two problems: minimizing costs for manufacturing companies with predetermined production quantities or maximizing profits for final retailers with unpredictable demand. This article belongs to the second group, where the selling price is determined in a single step during problem-solving. This approach is ideal for elastic markets where demand is price-sensitive.
These types of problems can be complex due to various factors, including the number of equations, the nonlinear nature of the problem, and market trade-offs. For example, a single supplier may suffice if supplier capacity exceeds demand, resulting in a relatively simple solution. However, multiple suppliers may be required if demand exceeds capacity, leading to a more complex optimization model. Additionally, discounts offered by suppliers for purchasing larger quantities can add complexity to the problem.
When making decisions, quality is a crucial factor to consider. A study by Mendoza and Ventura [3] defined quality as the "perfect rate", which is the percentage of items from a supplier that meet all quality standards. For example, a supplier with a perfect rate of 0.98 means that two out of every one hundred items supplied are non-conforming. This affects the total cost, as high-quality suppliers may have higher prices. However, sometimes suppliers with lower perfect rates may be preferred if the cost per item offsets the losses. It is important to note that how defective items are handled may differ from company to company, and this article assumes that the retailer must absorb the cost of defective items without any refunds.
Purchasing is a vital but complicated part of the supply chain. It involves selecting suppliers, determining the number of items to order from each supplier, and deciding how long the order cycle should be. A new mathematical model was introduced in [4] that addresses these challenges recently. This model, referred to as the previous model, considers the demand as output and considers the selling price.
Numerous investigations have been conducted to enhance inventory management. Some of these studies factor in demand as a variable that relies on other parameters or variables. For instance, stock-dependent demand [5,6] assumes that many customers are enticed by the availability of large stock quantities with a wide range of diversity. This can be applied to supermarkets or super-shops. On the other hand, alternative studies postulate that customers are attracted by lower selling prices, which applies to retailers specializing in particular products. Our work belongs to this second category, where demand is price-dependent.
The relationship between demand and selling price can be explained as a trade-off. Retailers have some freedom to choose the selling price. While selling items at a high price may seem logical to make a significant profit, the retailers may not be able to sell the products if the price is too high. There has been research on the mathematical relationship between demand and selling price in the literature [7][8][9][10].
This paper assumes that the retailer buys and sells the same number of items each month, which is crucial for planning and avoiding losses. If the retailer purchases more items than they sell, they can compensate by buying fewer items the following month, but this incurs a stock cost and does not change the average monthly demand. On the other hand, if the retailer fails to meet demand due to purchasing fewer items from the supplier(s), it causes losses and is unacceptable in the decision-making process.
This study examines the impact of a quality constraint, nonlinear quantity discounts on purchasing cost, and a nonlinear price-dependent demand on a retailer's profit. The demand equation used is the same as in a previous study for easy comparison. The goal is to propose a new mathematical model that improves the retailer's profit compared to the previously published solution. The problem is formulated as a nonlinear maximization problem that aims to maximize a retailer's profit by choosing a combination of suppliers and ordering quantities. The article's main contribution is a new mathematical model that solves the quality constraint and demand in a single step, which is a significant advancement. The problem is complex due to several factors, including nonlinear equations, market trade-offs, and price-dependent demand. Furthermore, unlike previous research, demand is considered an output rather than a given parameter. The proposed model was tested against a recent example from the literature and resulted in a better profit-maximizing solution than the previously published best solution.
The proposed model is solved in MATLAB with the particle swarm optimization (PSO) algorithm because commercial software such as Lingo may not be efficient for such complex problems. To simplify the comparison of results, the numerical example was taken from the state-of-the-art literature. The results showed that the proposed model satisfactorily maximized the benefits while meeting all constraints.
This article is organized as follows: Section 2 provides a literature review on how other works have addressed demand and its relationship to the selling price. Section 3 introduces the problem and its feasibility conditions. Section 4 presents the proposed model and the metaheuristic used to solve the problem. Section 5 analyzes the results, and Section 6 presents the conclusions.

Literature Review
This topic has been studied extensively by various authors. Whitin [11] first connected inventory theory and economic price theory by examining how demand is affected by product price. He found that suppliers can offer price discounts to incentivize larger orders. References [12,13] explored how suppliers can offer optimal quantities with quantity discounts. Later, models were developed to determine lot size and optimal price for purchasing a product with all-unit quantity discounts [12,13]. Other researchers have extended the relationship between demand and selling price to include time in their analysis [14,15]. Additionally, supplier selection has been studied with uncertain demand, quantity discounts, and fixed costs [16].
Pricing policies and optimal replenishment schedules have also been explored [17]. Maiti and Giri [18] looked at this topic in a two-echelon supply chain, while others have examined it as a means of coordinating supplier selection and order quantity allocation [19][20][21].

Description of the Problem and Its Analysis
This section will discuss the problem under study and provide some parameters for a numerical example. Our goal is to help retailers maximize their profits by focusing on a single item that can be purchased from various suppliers. It is worth noting that the optimization algorithm can be run multiple times, depending on the number of items being considered. Table 1 shows the notation that will be used to describe the problem. As a retailer, it is important to maintain inventory levels without any shortages. Therefore, the decision maker must purchase a specific type of item and can choose to buy it from one or more of the n suppliers available. Each supplier has its own setup cost (k i ), perfect rate (q i ), and capacity (c i ), ∀ i = 1, . . . , n. It is also essential to establish a minimum perfect rate (q a ). Please refer to Table 1 for a summary of all the parameters and decision variables.
The cost per unit of the item from different suppliers is based on a quantity discount structure. Three suppliers are considered in this example, and their costs are presented in Tables 2-4, respectively. The discount structure for each supplier is shown in their respective tables. Table 2. The per-unit cost of items-Supplier 1.

Supplier 1 Interval
Bound (Units) Unit Cost (USD)    Please refer to Table 2 for the pricing information. If the retailer purchases less than 50 items from Supplier 1, the cost is 9 per item. The setup costs for the three suppliers are as follows: Supplier 1 is $500, Supplier 2 is $250, and Supplier 3 is $450. The perfect rates for each supplier are q 1 = 0.92, q 2 = 0.95, and q 3 = 0.98. Suppose the setup or order cost of $500 is dominant for purchases of a few items. In that case, the average cost can be reduced for purchases of larger quantities due to the volume discount offered by the supplier.
After analyzing the suppliers, we found that supplier 1 has the lowest per-unit costs, but their setup cost is the highest. This is because they prefer to sell in larger quantities. On the other hand, Supplier 3 has the most expensive items, and their setup cost is not low either, but they have the highest perfect rate.
Moving on, we express the relationship between selling price and demand through the function in Equation (1): where α and e are the scaling factor and price elasticity index, respectively. For this article's numerical example, α is equal to 3,375,000 and e is equal to 3.

The Previous Model
The total average (monthly) profit is formulated using a mixed-integer nonlinear model and depends upon the order quantity assigned to the selected suppliers. This section briefly explains the model introduced by [4], called hereafter the reference model. The solution to the problem consists of finding the number of orders assigned to each supplier j i during the order cycle and the order size for each supplier Q i .
First, the order cycle period is defined as follows: Therefore, the complete mixed-integer nonlinear programming model used as our reference model is as follows: (Reference Model) Subject to: Y ij ∈ (0, 1), ∀i = 1 . . . n and ∀j = 1 . . . a i .
Constraint (4) represents the sum of the total ordered quantities considering all selected suppliers. Constraint (5) confirms that the order quantity per supplier does not exceed the supplier's capacity. Constraint (6) ensures that the supplier's average quality level is greater than the minimum acceptable quality of the retailer. Constraints (7) and (8) guarantee that the order quantity per selected supplier is within the correct quantity discount interval. Constraint (9) ensures that an interval per selected supplier is selected. Constraint (10) establishes the maximum number of orders per cycle that can be assigned. Constraint (11) ensures that each selected supplier has a total assigned order less than or equal to the total orders per cycle. Constraint (12) ensures that the total number of orders per supplier is an integer. Constraints (13) and (14) help to control non-negative conditions, and constraint (15) establishes the requirements for the binary variable.
The objective of the Reference Model is to maximize the profit function per time unit. The total profit equals the total sales per time unit, αP (1−e) , minus the total cost per time unit. The profit function considers the ordering cost per time unit, holding cost per time unit, and purchasing cost per time unit.
The total ordering cost per time unit is calculated as follows: The holding cost per time unit from supplier i is calculated by multiplying the holding cost r by the average inventory level, expressed as To incorporate it into the objective function, the average inventory cost is calculated as follows: Finally, the purchasing cost per time unit is calculated as follows:

Reference Model's Analysis: The Feasibility of the Solution Considering a New Focus on the Quality Parameters
To analyze the reference model, we need to measure the demand based on the number of pieces without defects. We can define the demand for perfect items, the number of perfect items required considering the demand, and it can be expressed as the demand multiplied by the minimum perfect rate of the retailer (see Equation (20)): The solution will provide the following: (i) The number of orders and the order quantity assigned to each supplier. The number of orders to supplier i is called j i ; it is assumed that all orders assigned to a specific supplier are of the same size, and the size of the order assigned to supplier i is referred to as Q i . (ii) The order cycle period is in months. This, along with the number of orders and order quantity, determines how many items are purchased each month or each order cycle (the order cycle is expressed in months, it does not need to be an integer). In other words, this can be used to calculate the demand. Then, it is not necessary to provide the demand explicitly. Notice that the percentage of the demand covered by each supplier is not explicitly provided but can also be calculated.
(iii) The selling price. This is also implicit since the demand can be calculated, and the selling price can be determined from Equation (1). Still, it is an important variable. In this work, we will consider it to be part of the solution to the problem.
There are countless solutions available, especially if there are no limits to the order cycle or the number of orders. However, some solutions may lead to lower profits or even losses if the selling price is too low. Before we delve into those details, we must differentiate between feasible and infeasible solutions. An infeasible solution is one where the perfect demand is not met or there is a planned shortage. To avoid this, we must set the selling price based on the demand, ensuring that it matches the established demand and minimum perfect rate. If these values do not match up, it will reduce expected profits, which is essentially the same as a shortage.
To meet the demand, you must purchase a quantity of items that is at least equal to the monthly demand multiplied by the order cycle in months: To meet the retailer's minimum perfect rate, we need a second equation. In other words, the demand can be covered by low-quality suppliers, but we must not only ensure that all the items are in demand but also consider that some items will be defective. We can compensate for this by purchasing more items or shortening the order cycle. Equation (22) tells us no planned shortage will be caused by the quality of items: It is important to ensure that the solutions do not exceed the suppliers' monthly capacity: A solution is feasible if it meets the requirements of Equations (21)-(23), regardless of the method used to arrive at it or the mathematical model. The monthly profits are another parameter that needs to be assessed.

Model Analysis
We have presented a revised version of the reference model in Section 3.2. This update aims to expand the range of solutions that can be examined using the reference model, potentially leading to improved outcomes, as evidenced in the results section. It is important to note that the original reference model only accounted for the traditional order cycle period T c : Additionally, the reference model is subject to several constraints. Recall the quality constraint is as follows: This formulation ensures that the quality of selected suppliers is greater than or equal to the minimum acceptable quality of the retailer q a .
The perfect rate from each supplier (Equation (25)) presents a lack of possibility of finding a solution in scenarios when the perfect rates of suppliers will be less than the minimum acceptable quality. For instance, let us consider the suppliers in the numerical example with perfect rates of 0.92, 0.95, and 0.98, respectively. However, let us consider that the retailer establishes 0.99 (instead of 0.95) as a minimum acceptable quality and the order quantity per supplier is 1000 units within one order. A feasible solution cannot be found: Since Q i and j i are positive numbers, no combination can satisfy Equation (26). Since this situation (low perfect rate situation) might be possible in real life, it is highly desirable that models can deal with it. An intuitive solution would be to shorten the order cycle to have more items to compensate for the number of imperfect items and satisfy the demand. Then, a new equation to calculate the order cycle may be required.
If the model allows purchasing more (or the same quantity in a shorter time), the lack of perfect items can be compensated. For example, if a retailer requires 1000 pieces a month and establishes a 0.99 minimum acceptable quality, the company needs 990 perfect pieces each month. Even the lower perfect rate supplier can provide them if 1077 pieces are ordered with a perfect rate of 0.92, resulting in 990.84 perfect parts.
One of the main differences in this article is the reformulation of the order cycle, considering the perfect rate. Let us consider the order quantity per supplier with the required quality as Q i j i q i , and the total ordered quantity from supplier i as follows: Demand is calculated as shown in Equation (28), where the minimum acceptable quality of the retailer is considered: Then, the order cycle can be formulated as follows: One of the key components of this work is the reformulation of the order cycle process. Quality parameters are now included in the calculation of the order cycle, rather than being treated solely as constraints. Our proposed model has been shown to yield higher profits than the reference model. Table 5 provides a comparison of various works on the EOQ/EPQ problem using traditional order cycle calculations. In Table 6, a comparison is made between works using traditional order cycle calculation and quality parameters. All the works listed in Tables 5 and 6 use nonlinear models, with most of them considering demand as a dependent function based on production cost, stock, or price. Specific works consider all quantity discounts in purchasing costs. Analytic methods and geometric programming are used to find solutions in many works, but this paper explores the use of metaheuristic methods as a fast and efficient alternative. The novelty of this work lies in considering quality parameters as part of the order cycle and demand as a function of price, as shown in Tables 5 and 6.

Reformulated Model
After incorporating the redefinition of the order cycle into the reference model, the reformulated model is as follows: Subject to: Y ij ∈ (0, 1), ∀i = 1 . . . n and ∀j = 1 . . . a i .
The profit function considers the ordering, holding, and purchasing costs per time unit. The order cycle is calculated using Equation (29). The total ordering cost is expressed as The holding cost per time unit from supplier i is calculated by multiplying the holding cost r by the average inventory level: To calculate the objective function, this is incorporated as Finally, the purchasing cost per cycle is Constraint (31) ensures that the order quantity per supplier does not exceed the supplier's capacity. Constraints (4) and (6) are unnecessary in this formulation. Equations (32) to (40) are the same as in the reference model.

Particle Swarm Optimization (PSO)
The PSO algorithm is used to improve possible solutions by optimizing a function iteratively. This is achieved by adjusting the position and velocity parameters of particles within a search space. The algorithm simulates the behavior of birds and begins by initializing a population of random particles, each representing a possible solution. At each iteration, the particles evolve, and their velocity is updated. The PSO process is further explained using a presentation of the pseudocode. The algorithm starts by initializing the population. The population represents all the solutions as particles. Decision variables establish particles and are randomly initialized and distributed over the search space of the objective function, following uniform probability distribution. When particles (solutions) are initialized, this decision vector is evaluated in the objective function, and the algorithm calculates the local and global particles. The velocity and position are updated, and particles are modified over iterations.

Velocity of Particles
In order to obtain a new solution vector, the velocity of particles must be updated. This process is based on the local and global influence of the best particles and the last velocity value. The new velocity can be adjusted using the cognitive (c 1 ) and social (c 2 ) factors. The velocity v k i of each particle or decision vector x k i is updated by employing Equation (45): where the velocity vector of the particle x k i for the next iteration k + 1 is denoted by v k+1 i . v k i is the current velocity, g k is the global best current particle so far, and p k i is the best local so far (up to the current iteration). Additionally, r k 1 and r k 2 are random uniform values usually in the interval [0, 1].

Movement of Particles
The particles are changed to their new position. This action allows the exploration of new candidate solutions in the search space. The new position is calculated as shown in Equation (46): where x k+1 i is the updated position of the particle x k i with its new velocity v k+1 i . After the particles are updated, they are evaluated in the objective function. The local and global solutions are updated. The entire process is repeated until the maximum number of iterations is reached. Table 7 introduces the parameters for an illustrative numerical example. Tables 2-4 show the item's per-unit cost from each supplier, respectively. Table 7. Parameters of the instance.

Variable
Numerical Example Data The experiments are implemented using MATLAB R2017a in a computer with a processor Intel(R) core(TM)i5-4200ucpu@1.60GHz2.30GHz.
The reference solution is the best solution presented in [4], in which several solutions have been presented, but the best of them is j 1 = 4, j 2 = 9, j 3 = 5, Q 1 = 608.68, Q 2 = 378.74, Q 3 = 486.95, and P = 15.84. This solution led to a monthly profit of $4179.91.
To solve the proposed model, we utilized the Particle Swarm Optimization (PSO) algorithm. Our population consisted of 200 individuals (m = 200), and we limited the number of iterations to 300 (k max = 300). By balancing the number of individuals and iterations, we were able to conduct a thorough search for solutions within a reasonable timeframe. The problem involved nine decision variables, which means that it had nine dimensions (n = 9). Our cognitive and social factors were set at c 1 = 2 and c 2 = 2, respectively. To ensure accuracy and consistency, we repeated the optimization process 30 times for each metaheuristic algorithm. PSO yielded a total of 30 results, and we have provided a summary of the top 10 in Table 8.  Table 9 shows three solutions to the problem, two of them obtained using the proposed model and the third is the solution presented along with the reference model. The solutions for the reference model obtained through the PSO strategy to solve the problem are listed in Table 10. It is important to mention that these results are not as good as the ones obtained by the proposed model.  Figure 1 shows that the reference model yields results ranging from $4000 to around $4130, while the new reformulation (see Figure 2) generates results ranging from $4197 to approximately $4235. It is worth noting that all solutions obtained through the proposed model are superior to those obtained through the reference model.

Conclusions
This article explores the problem of selecting suppliers and allocating order quantities to maximize profit while considering the effect of the selling price on demand. Previous studies have focused on minimizing inventory costs. Still, this article presents a new mathematical model that includes quality constraints, nonlinear quantity discounts, pricedependent demand, and supplier capacity constraints. The model differs from previous ones in that it considers the perfect rate of suppliers in the order cycle calculation equation and solves the quality constraint in a single step. The Particle Swarm Optimization (PSO) algorithm was used on a numerical example from the literature to test the model. The proposed model outperformed the previous model, leading to a higher profit.

Conclusions
This article explores the problem of selecting suppliers and allocating order quantities to maximize profit while considering the effect of the selling price on demand. Previous studies have focused on minimizing inventory costs. Still, this article presents a new mathematical model that includes quality constraints, nonlinear quantity discounts, pricedependent demand, and supplier capacity constraints. The model differs from previous ones in that it considers the perfect rate of suppliers in the order cycle calculation equation and solves the quality constraint in a single step. The Particle Swarm Optimization (PSO) algorithm was used on a numerical example from the literature to test the model. The proposed model outperformed the previous model, leading to a higher profit. Funding: The authors thank the Universidad Panamericana for its support through the internal fund "Fomento a la Investigació n UP 2022" under the approved project "UP-CI-2022-GDL-02-ING -Estudio de algoritmos heurí sticos y metaheurí sticos en la optimizació n de problemas en la ingenierí a" (Study of heuristic and metaheuristic algorithms in the optimization of engineering problems).
Data Availability Statement: Not applicable.

Conclusions
This article explores the problem of selecting suppliers and allocating order quantities to maximize profit while considering the effect of the selling price on demand. Previous studies have focused on minimizing inventory costs. Still, this article presents a new mathematical model that includes quality constraints, nonlinear quantity discounts, pricedependent demand, and supplier capacity constraints. The model differs from previous ones in that it considers the perfect rate of suppliers in the order cycle calculation equation and solves the quality constraint in a single step. The Particle Swarm Optimization (PSO) algorithm was used on a numerical example from the literature to test the model. The proposed model outperformed the previous model, leading to a higher profit.

Funding:
The authors thank the Universidad Panamericana for its support through the internal fund "Fomento a la Investigación UP 2022" under the approved project "UP-CI-2022-GDL-02-ING -Estudio de algoritmos heurísticos y metaheurísticos en la optimización de problemas en la ingeniería" (Study of heuristic and metaheuristic algorithms in the optimization of engineering problems).
Data Availability Statement: Not applicable.

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