Stochastic optimization model for random demand stocks, with storage expenses accounting

The paper presents a possible stock level optimization method, based on a stochastic model. The consume demand for the stored product is considered a discrete random quantity. It was adopted the hypothesis that the repartition law of the demand probability is known for the time interval of stock existence (operation). The main aim of the optimization procedure is to minimize the total expenses (costs) involved by the existence or lack of the reserve stock. For a better understanding of the proposed algorithm, a calculation example is presented.


Introduction
The management of the stocks needed for the different economical activities represents today an important source for the company's profits.This is the reason for which the problem of cost optimizations was and still is intensively studied.
The present article was written with the intention to present a possible way of mono-product stock optimization, useful and easy to implement mainly for small and medium production or servicing companies.

Presentation of the stochastic model for stock-optimization
To establish the mathematical model for stocks optimization, the following hypotheses were considered: -the consumer demand V for the product has a random magnitude; -the probability distribution law p(V) of the demand V in the time interval T of stock existence is known; -the aim of the model use is to minimize the total storage costs.
In these conditions, two different situations may be possible for the consumption of stock products (Fig. 1): a) when consumer's product demand V in the time interval T is smaller as the stock Q; b) when consumer's product demand V in the time interval T is bigger as the stock Q.
Supposing the stock variation is linear, it results: -for the first case, in which the stock Q is bigger as-or equal with the demand V in the time interval T (Fig. 1.a), the mean stock Q' is established with the equation: -for the second case, in which the stock Q is smaller as the demand V in the considered time interval T (Fig. 1.b), the mean stock Q'' is established with the equation: where T1 is the depletion time of the stock.From the Figure 1.b it can be also observed that and replacing in (2) it results: Reasoning in a similar way, the mean lack of stock Q''' in the considered time interval T may be established with the equation: For the calculation of the total storage cost, two constant values will be considered: -c 1 , that represents the storing cost per product unit during the time T; -c 2 , that represents the cost (loss) for the lack of stock per product unit during the time T.
Using the previously determined mean values Q', Q'' of the stocks and Q''' of the lack of stock, the three partial contributions to the storage cost can be calculated with the equations: and then the total storage cost z results summing these three partial costs z 1 , z 2 and z 3 : Using the equation (10) of the mean value z(Q) of the total storage costs, one calculates a series of values z for different stock values Q and one retains the value Q opt for which the possible total costs depending on Q present the minimum value z min =z(Q opt ).

Analytic solution
An analytic solution to obtain the optimal stock level Q opt and the minimal storing cost z min , demonstrated by G. Ciolan, F. Kirstein, I. Preda, P. Petre in [9], but not presented here, exists and may also be used.That solution states that the optimal value Q opt of the stock verifies the condition: where L is a monotonically increasing function and the ratio is obtained from c 1 , the unitary storing cost during the time unit T, and c 2 , the unitary cost (loss) for the lack of stock during the same time period.The function may be calculated with the help of the next three intermediate functions: which is the probability that the product demand V to be smaller as-or equal with the existing stock Q, and If one compare the ratio ρ with the series of calculated values L(Q), the optimal stock level Q opt will be obtained.
The minimum total cost for the products storage will be determined by replacing the founded value Q opt in the equation (10) of the total mean cost: z min = z(Q opt ).

Application example
The problem.An auto service ensures, between others activities, the replacement of the oil filter for a car type.During a week (the time period T), the demand for oil filter change has a random discrete size and is statistically characterized by a known discrete probability distribution p(V) (also called probability mass function).The values of this function are given in the Table I and obey to the equation =1. ( The workshop it is supplied once per week with the ordered number of spare parts. The cost c 1 needed to store a product unit (an oil filter) for the period of time T (one week) will be considered constant and equal with 1 r.c.(reference unitary cost): If the demand of oil filter replacements exceeds the existent stock, the workshop can order a supplementary oil filter which will be delivered in short time, but with a penalty of transport cost and customer delay.That unitary loss involved by the unsatisfied product demand is bigger as c 1 .In this example: c 2 = 5•c 1 = 5 r.c.
In these conditions, one intends to determine the optimal stock level Q opt to be ensured at any beginning of the working week and the mean cost z min involved by the storage and lack of oil filters in that time.
The solution.The probability distribution function p(V) describes a random process and may give useful information about this.In the present example, such function may be obtained by observations noted in a long period of time (for example, one year in this case).
The meaning of the probability distribution law p(V) indicated in the Table I (and presented graphically in the Fig. 2 -the histogram) is that from 100 working weeks considered, in 10 weeks it is no command to replace oil filters, in 10 weeks it is needed to replace only 1, in 30 weeks it is needed to replace 2, and so on.
The cumulative frequency distribution can be obtained by summation from the probability distribution p(V) and indicates the probability that in one week to be replaced up to V oil filters.For example, according with the data in the Table I (and presented in Fig. 2), the probability to replace maximum 3 filters is 0.8 (or 80%).Fig. 2. Discrete probability functions used in the algorithm application example (Table I): density of probability (red circles); cumulated probability (blue diamonds).
The probability distribution p(V) can be used also to calculate the mean number of oil filter interventions per week: =2.45.
The solving of the problem starts with the calculation of the ratio p(V)/V, used to obtain the values L(Q).The corresponding values of this ratio for different demand amounts V are indicated in the Table II.14), ( 15) and ( 16)) for the considered example.
The values L(Q) are obtained with the equations ( 14), (15), ( 16) and (13).These calculated values are presented in the Table III and represented graphically in the Figures 3 and 4. The value of the ratio from equation ( 12) results as:

Table 3. Results of calculation example (L=L
Comparing the value ρ = 0.8333 with the series of the calculated values L(Q) in Table III, it retains 0.869 (the first value bigger as ρ), for which corresponds the optimum stock level Q = 2.A graphical representation of that searching process it is given in Fig. 4. It can be observed the monotonic increase of the function L(Q) and the finding of the optimal stock level Q opt when the function L(Q) exceeds the level ρ.For this optimal number of spare parts (Q=2), one can calculate now the mean value z(Q opt ) of the storage costs: = 0.65 = 0.295  In the Figure 5 there are presented the partial costs z 1 , z 2 , z 3 as are calculated with the equations ( 7), ( 8) and ( 9) for different stock levels Q.In the same figure it is moreover presented the total cost z, also calculated in the Table IV.7), ( 8) and ( 9)) in the total cost z of the stock management.
For comparison, the cost z m involved by a stock level equal with the maximal number of oil filter interventions per week V max = 5 is: which shows the economy realized with an optimized stock level (1.795 < 5).
The optimal stock magnitude Q opt is influenced not only by the probability distribution function p(V) of demands (interventions) per week (which determines also the mean number N m of demands), but also by the ratio c 2 /c 1 of the unitary costs involved by the existence (c 1 ) and lack (c 2 ) of stock.The Figure 6 shows comparatively the total storage costs for different stock levels Q and component costs ratios c 2 /c 1 (the values 2, 5, 10, 15).It can be observed that if c 2 is much bigger as c 1 , then the optimal stock level Q opt and the minimal total cost z min increase also.

Conclusions
The paper presented an algorithm allowing to determine the optimum size of the reserve stock so that the expenses to be minimal.
It was considered the case of a company with a random demand for products or activities which implies the existence of a reserve stock.The probability density function of the demand in a considered working time it is considered known.
A model, easy to be implemented in a computer program, was presented.
The model may be modified for different particular cases, as for the situations of variable unitary cost, dependent of the demand level or stock product packaging.

Fig. 1 .
Fig. 1.Possible situations for the stock consumption during the time T: a) the stock is bigger as-or equal with the demand (Q ≥ V); b) the stock is smaller as the demand (Q < V).

Fig. 6 .
Fig. 6.Influence of the stock magnitude and ratio c 2 /c 1 over the cost of the stock management.

Table 1 .
Density of probability for the parts demand.

Table 4 .
Total mean storage costs z(Q) vs. stock level Q.