Economic Disposal Quantity of Leftovers kept in storage: a Monte Carlo simulation method

Abstract This article describes how to reach an item’s threshold, or in other words, the limit time for it to be retrieved from stock and sold for a different use, as well as the remaining foreseen period for this situation to occur. Once a minimum length, or weight, is reached, left quantities are more difficult to sell, as demand often exceeds the remaining parts or leftovers. The number of unfulfilled orders increases, as time goes by, until it becomes further cost effective to dispose the leftover and sell it for a lower price and alternative use. A Monte Carlo simulation model was built in order to consider the randomness of future transactions and quantifying consequences providing this way a simple and effective decision-making framework.


Introduction
In the retail trade activity, a particular situation might occur when a piece of a material in the form of a reel (e.g. electric cable, flexible tube, rope, wire, paper, or tape) or in the form of a rod or rigid tube is cut into different lengths to satisfy custom orders. Once reduced lengths become more difficult to sell, only entire pieces are acceptable by the end user, since joints are technically and/or economically unfeasible [1].
This type of subject can be better evaluated using simulation techniques. Which concerns Monte Carlo simulation there are several recent developments in literature that can be cited, e.g. articles on stochastic approach for dy-  [2][3][4], and papers about new approaches for random variable and process characterization [5][6][7].
Chen and Simchi-Levi (2004) analyzed a model of periodic review, unique product and infinite horizon, in which pricing decisions and production / inventory are simultaneously taken. The demands at different periods are randomly distributed variables that are independent of each other and their distributions depend on the price of the product. Price and order decisions are made at the beginning of each period and shortages are backlogged. The order cost also includes a fixed price and a variable cost proportional to the quantity ordered. The goal is to maximize the expected discount, or expected average, and profit over the infinite planning horizon. It has been shown that a stationary policy is optimal for both discounted and average profit models with general demand functions. In such policy, the stocking period is managed based on a classical (s, S) policy and the price is determined based on the stock position at the beginning of each period [2].
Chen, Ray and Song (2006) studied a problem of pricing and control of periodic inventory for a retailer, which faces stochastic demand prices, under very general modeling assumptions. Any unsatisfied demand is lost and any remaining inventory at the end of the finite sales horizon has a residual value. The cost component for the retailer includes exploration, scarcity, and both variable and fixed order costs. The retailer's goal is to maximize its expected discounted profit over the sales horizon by dynamically deciding on optimal pricing and replacement policy for each period. Authors showed that, under an assumed additive demand function, at the beginning of each period, a (s, S) policy is optimal for replenishment, and the price value depends on the stock level after the replenishment decision. Their numerical study also suggested that for a sufficiently long sales horizon, optimal policy is almost stationary. In addition, the fixed order cost plays a role in authors' modeling framework. On the other hand, the impact on profit of dynamically changing the retail price, as opposed to a single fixed price across the entire sales horizon, also increases with the fixed cost of ordering [3]. Levin, McGill and Nediak (2012) have presented a dynamic pricing model for oligopolistic firms that sell differ-entiated consumable products to multiple finite segments of strategic consumers who are aware that price is dynamic and can delay their purchases accordingly. This model encompasses the strategic behavior of both firms and consumers in a dynamic stochastic game in which the objective of each firm is to maximize its expected total revenues, and each consumer responds according to a consumer choice model of intensity purchasing allocation.
The model provides awareness about equilibrium price dynamics under different levels of competition, asymmetry between firms and multiple market segments with variable properties. Authors have shown that strategic consumer behavior can have serious revenue impacts if companies ignore this behavior in their dynamic pricing policies. In addition, optimal balance responses to consumer strategic behavior can recover only part of the lost revenue. A key conclusion is that companies can benefit more from limiting the information available to consumers than from allowing full information and responding to strategic behavior in an ideal way [4].
Additionally, Paola and Pinnola (2012) discussed the probabilistic representation of the probability density function (PDF) or the characteristic function (CF) in terms of complex fractional moments, showing that such complex moments are related to Riesz and complementary integrals of Riesz at the origin. According to the authors, discretization leads to the conclusion that with a few fractional moments, the entire PDF or CF can be restored.
Also, Alotta, Paola and Pinnola (2017) presented an approach that characterizes normal processes of multivariate stochastic vectors, based on the evaluation of complex spectral moments. The knowledge of these moments allows to obtain the power spectral densities providing a complete characterization of the processes of multivariate stochastic vectors [6]. These quantities are the generalization of the full-order spectral moments introduced by Vanmarcke (1971) [7]. For more general pioneered work see the contributions proposed by Arrow (1970Arrow ( , 1974 [8,9].
Having reviewed some literature regarding the issue, we propose the following research objective: The construct and use of a Monte Carlo simulation model for decision-making of randomness future transactions and quantifying costs.
In other words, one intends to understand what the limit time for an item is, to be retrieved from stock and sold for a different use, as well as the remaining foreseen period for this situation to occur.
At this point, two courses of action are possible: (i) sell immediately the remaining piece for an alternative use (e.g. for scrap) at a lower price than the market one; or (ii) wait in the expectation to sell it at the market price, despite uncertain it might be.
From an economical perspective, there must be a minimum length (or weight), where the expected marginal benefit from selling to the every-day market turns to be smaller than the expected marginal benefit from selling to an alternative use [10,11]. This so called minimum or 'optimal economic equilibrium quantity', can be deduced by simulating the upcoming future, and assuming the following defined condition proposed earlier by Assis and Figueira [1]: Where, ERM is the Expected Revenue from the Market and ERA is the Expected Revenue from an Alternative use.

Methods and Tools
To deal with the current problem an algorithm was developed by the authors using the constant price [1,10]. As so, one defines the following:

Opportunity for ERM sales
The economic potential / mathematical expectation of sales -or the opportunity for ERM sales -at any time t (month, week, day), as an alternative to the ERA divestment opportunity at the same time t, can be calculated by summing all expected sales (weighted with probabilities) in time interval T-t, where T is the instance at which sales probability equals 0. This result can be expressed by the following Expression [1,10]: Where, P t -Probability of selling the existing length at the end of period t; Q t -Expected average sales rate during each period t; v t -Net selling price supposed to remain valid during each period t; i -Stock holding cost; T -Analysis ending time (after which P t = 0). Making note that in previous Expression (1), the sum of expected (or potential) sales is discounted, making possible to compare ERM T−t and ERA t at any time t.  The stock holding cost i is equal to the sum of the opportunity cost of tied up capital with warehousing costs [1,10].
It is assumed that the frequencies of the dispatched lengths in recent past are known and remain constant over near future, according to Figure 1.
In this figure, L 0 represents the maximum length ever delivered for an order fulfillment. As it can be seen, the probability (or success) of a sale is maximum -equal to 1until the piece reaches the length L 0 , i.e. for L ≥ L 0 .
From here on, the probability decreases progressively till 0, which occurs when the length of the piece reaches L min .
The average sales Q t , during each period t, can assume any value according to the forecasted sales profile within a time period of analysis and may consider the existence of eventual trend, seasonality, and random as depicted in next Figure 2.
Being likely the net price, v t sales might suffer a major change over different periods of analysis and the current price should be adopted instead. This will not change any calculation steps but contributes to increase complexity. In order to keep the case as simple as possible, the net selling price, v t is assumed constant and equal to v. Thus, previous Expression (1) can be rewritten as follows:

Opportunity for ERA sales
As an alternative, disposal for scrap or any other possible solution, might occur at the end of any time period t. The economic potential or the opportunity for disposal ERA t is calculated by the next Expression [1,10]: Where: s -Unit sales price (for scrap or any other solution); L t -Existing length at the end of period t; j -Opportunity cost of tied up capital. In Expression (3), the product s.L t is discounted, being possible to compare ERM T−t and ERA t at any period t. The discount rate j is, for this case, equal to the cost of capital held up, an opportunity cost.

Trade-off point
A trade-off point can be established with Expressions (2) and (3). This is graphically depicted in the following Figure 3.
As it can be observed, the later the alienation is decided, the lower L is, as well as values for ERM T−t and ERA t . While L > L 0 is met, the probability of satisfying any request is 1. As soon as L < L 0 , the probability decreases progressively, until it reaches the value of 0 for L = Lmin, thus becoming a leftover. There is, however, a certain point where the two curves intercept, i.e., a point of economic indifference. This point corresponds to length L*, which   represents an economic minimum length, and can be addressed as a point of change in the decision or economic disposal quantity. In fact: -for L t > L*, is more cost effective to keep the part, continuing the market sale as ERM T−t > ERA t ; and -for L t < L*, an immediate disposal becomes more cost effective as ERM T−t < ERA t .
The value for L* can be deduced analytically by equalizing Expressions (2) and (3) and solving the following Being manual calculations laborious, Monte-Carlo simulation method presents a valuable alternative [12,13]. An example of application illustrates the use of the developed algorithm.

Results
A company trades alloy steels for the metal-mechanical industry in the form of rods, cut to different lengths. These rods, when new, have a standard length. When a rod reaches a minimum length, it becomes progressively more difficult to fulfill orders and to judge how long it should be retained before being sold for alternative use.
Let one assume a piece with 1,000 kg. This material is traded in the market at 5 /kg, being sold immediately for an alternative use at 3 /kg. Considering an opportunity cost of the capital to be held in stock equal to 15% and 20% as a warehouse costs, both per year, the following question arises: what is the minimal weight (to be sold) for an alternative use?
To answer this question, one needs to investigate sales history. Analyzing the sales of the last two years, it was possible to set a season component, an increasing trend component, and a random component. Then, it is also necessary to define, as a frequency, the amount of received orders and their respective size. Hence, Table 1 and 2 show an analysis of the last two months (since the rod's cross section is constant, it is rather indifferent to use linear or mass units).
In order to solve this problem, a representativesimulation model was developed in MS-Excel©. In this simulation model, the time variable can progress in two ways: (1) by variable increments (for each moment of an order arrival), or (2) by fixed increments (days, weeks, etc.). In the last case, for each period, a random quantity of orders, as well as a random quantity (number of kg) for each order was simulated. The second alternative was chosen regarding simplicity.
This simulation model allowed ones to fix the difference between ERM T−t and ERA t at the end of each period t and revealing at which time t* (or length L*) this difference is worthless. Denote that the parameters that characterized demand were trend, seasonality, and randomness, along with a time horizon of 300 weeks. Also, fixed data corresponded to selling price, disposal price, opportunity capital cost, storage cost, and quantity presently existing in stock. The simulation model randomly generated, at each run, a demand profile over 300 weeks. Next Figure 4 beneath shows one of these profiles.
Subsequently data from Table 1 and 2 along with the desired number of runs were set. One should note that the number of runs depends on the desired outputs' accuracy. A confidence level of 90% was set. After 500 runs, the simulation model provided the following statistics: -Economic Disposal Quantity = 5.97 ± 0.37 kg with a sampling error of 6.2 %; -Present value of ERM = 4,698 ± 1.79 with a sampling error of 0.04%; -Present value of ERA = 3,000 ; and -Remaining time until L* is reached = 30 ± 1.51 weeks with a sampling error of 4.98%.
As matter of fact, for the existing quantity of 1,000 kg, the following results were found: -ERM = 4,698 , and -ERA = 3,000 .
Once ERM > ERA (or 1,000 kg > 5.97 kg) the remaining piece should be retained, as ERM is far higher than ERA. In addition, the simulation model also provided a 30 week-long estimate as time span left, until the moment for disposal arrives. Following Table 3 and 4 depict results from one of the numerous runs performed by the simulation model, i.e.: - Table 3 shows the orders profile from week 10 through week 30, based on the parameters and the frequency distributions from Table 1 and 2; and - Table 4 shows the level of stock and values of ERM sales and ERA disposal, verified at the end of weeks 10 to 30.
Column (3) was obtained by the ratio between column (1) / 26.25, where 26.25 is the mean value of each order delivered (see Table 1). The result was rounded to the nearest multiple. Column (4) was obtained by interpolating the frequency distribution of the weekly number of delivers represented on Table (2), by Monte-Carlo simulation, taking as mean values those in column (3). Columns (5), (6) and (7) were obtained by interpolating the frequency distribution of the delivered quantities shown in Table 1 and according