Sizing Intermediate Storages in Discrete Models under Stochastic Operational Conditions

In this paper the appropriate size of an intermediate storage is investigated. The input process is described by a stochastic process and the output process is deterministic. Both filling time points and filled amounts of material are described by discrete random variables. We focus on the necessary volume of the intermediate storage for the material in order to avoid the overfilling. To solve the sizing problem for a given reliability, an auxiliary function is defined and a difference equation is set up for it. In special cases it is solved analytically. Overflow probabilities and expected time of overflow are compared in continuous and discrete models. Analytic results are compared to the results arising from Monte-Carlo simulations as well. In general cases approximate solutions are presented and used for determining the necessary volume of storage for the change of material.


Introduction
Intermediate storages are frequently applied in many fields of industry, e.g.food industry, pharmaceutical industry, chemical industry [1,2], in environmental systems, logistic, supply chain [3], information technology, in data storage systems, etc, consequently the investigation of their operation is important in practice.Their applications serve to compensate the differences in the operations of different kinds of producing systems.They supply spare material in case of failures; they are suitable to handle the shortfall due to maintenances or uncertainties arising from the possibly stochastic operation.In the designing phase of a producing system, it is a relevant information how much spare volume is needed to avoid the damages originating from the random effects.
The material stored in the buffer is produced and processed by different operational systems.One can distinguish deterministic and stochastic systems.In random systems, the operation can be modelled by either continuous or by discrete random variables as well.In insurance mathematics similar problems are investigated but mainly continuous random variables are applied therefore the methods and results are mainly elaborated for these models (see [4] and the references therein), but sometimes one can find discrete models as well [5].
Two main aspects of investigation are distinguished, namely the determination of the initial amount of material [6,7] and the determination of the necessary size of the storage to avoid the overflow [8].In earlier papers we presented results for continuous [6,8] and discrete distributions [7], this paper is the fourth one in this series.
The problems of the initial amount of material and sizing are similar and different at the same time.The problem statements are congenial but the governing equations differ from each other.Consequently, their solutions have different forms.The idea of finding the solution of an equation in a special form is very useful and it can be applied after thorough investigation of the equation.We use this technique.We analyse the equations governing the process, we solve them analytically in some special cases and in the general case we try to approximate the solution in that special form.The parameters of the function of the special shape are determined by parameter fitting applying least square method.The points for which the functions are fitted arise from Monte-Carlo simulation.The approximate function is useable for determining the appropriate size of the storage to a given reliability level.We investigate the role of the distributions and we present the effect of the dispersions as well.

The investigated model
In this paper the intermediate storage connects two types of processing subsystems, the input and the output subsystems.Both subsystems work that is fill and withdraw material in batches.The input subsystem produces the material and fills it into the buffer and the output subsystem withdraws it for further processing.A schematic figure of this system can be seen in Fig. 1.
The operation of the filling subsystem is assumed to be stochastic.The fillings happen at random time points and the amount of the filled material is random as well.
The time interval between the k th and (k+1) th filling is given by the random variables t k , k = 1,2,… and t 0 = 0. We suppose that t k k = 1,2,… are independent, identically distributed nonnegative discrete random variables with nonnegative integer values.
The k th filling happens at and the number of fillings from 0 to T is given by The quantities t k , k = 1,2,3... are independent random variables with nonnegative integer values and the distribution of t k is given by P(t k = j) = f(j), j = 0,1,2,… .The condition 0 < f(0) means that more than one filling may happen at the same time which is a reasonable option in the industry.The amount of filled material during the k th filling is denoted by Y k , k = 1,2,3,… and they are also nonnegative integer valued random variables.We use the notation for j = 0,1,2,… and for i=1,2,... .We suppose that (t k ,Y k ) are independent random variables for any values of k = 1,2,… .As the number of fillings is given by N(T), and the amounts are Y k , k = 1,2, … , N(T) , the total amount of material filled to the buffer from time 0 to time .
We can choose the amount of withdrawn material during one unit time as a unit.Withdrawal happens at the same time when fillings happen.More detailed, we consider the withdrawal and the filling process as point processes.In Fig. 2, for example at m = 2 we can realize that the amount of material is decreasing as compared to m = 1, and in the same moment, there is a jump upwards representing by the arrow upside.The withdrawal means the waste of material, the filling is the rise in the function V(m).The object is to determine the appropriate volume of the buffer in order to avoid overflow in a large time interval.More precisely, we determine the volume necessary for change of material, which has to be increased by the initial amount.As the filling process is stochastic, the required size can be determined to a given reliability.
First, let us consider the amount of material in the storage in a continuous model.If t denotes the time and V(t) the amount of material in the storage, then .

Batch
(2) (5) We mention that the numerical value of qt is equal the value of t but the dimensions of these quantities differs.Keeping this in mind, to be as simple as it can be, we neglect the . If the size of the storage is z s , then overflow means that the inequality z s < V(t) holds for some value of t.
In discrete models, if the time values are integer, then it is worth investigating the process for integer values of time and initial amount of material, that is for 0 ≤ m, 0 ≤ k integers.Now, k is the initial amount of material.Keeping in mind that q • m represents the value of the withdrawn material, but as its numerical value equals m.Now, if s denotes the size, overflow means that the amount of material exceeds the storage size.This can be written in form for some value of m. s − k is the volume for change of material in the storage.Of course, the size of the storage can not be smaller, than the initial amount of material, hence we investigate the case k ≤ s , which means the inequality 0 ≤ s − k .We denote s − k by n for the further part of this paper.Then the inequality has to be investigated for 0 ≤ n .If it holds for a value of 0 ≤ m, then there is overflow in the process if the volume for change equals n.The probability of overflow is , for some value of for 0 ≤ n .If n < 0 , then u(n) = 1 obviously holds, because the inequality ( 8) is satisfied at m = 0 .The time of overflow is the first time point for which the inequality (8) holds, that is The probability of the value m as the time of overflow is , and and, of course The change of the amount of material in the storage can be followed step by step in Fig. 2. To investigate u(n) and T V (n), for 1 ≤ z we introduce the sequence of functions . The penalty function is able to penalize the overflow.φ z w n ( ) ( ) defined by ( 13) is a sequence for any fixed value of z, and it is a function for any fixed value of n.The penalty function depends on the measure of the overflow, which is not indifferent in case of environmental systems.The continuous version of (13) is defined in [9] and is called the Gerber-Shiu penalty function in insurance mathematics.The properties of the Gerber-Shiu function for the continuous case are investigated in insurance mathematics [4,10,11].
For the rest of this paper we frequently deal with the special case w ≡ 1 and omit w from the notation.Substituting w ≡ 1 into (13) we get (6) which is the z transform of p m (n) [12].Substituting z = 1 , we can easily see, that Taking the derivative of ( 14) with respect to z, we obtain that Applying theorems of renewal theory, the φ z w n ( ) ( ) satisfy the following difference equation: Suppose that sup ( , ) ( )

. Then
Eq. ( 17) has a unique solution for any fixed value of 1 < z in the set of bounded functions assuming k z f j z j j Remark The condition k(z) < 1 is satisfied if 1 < z and f (0) < 1 .The property f (0) = 1 expresses that each filling happens at time 0, which is out of interest.
If z = 1, then the bounded solution is not unique.We are interested in the one which is the limit of functions φ z (n) when z tends to 1.If we focus on φ 1 (n) = u (n) defined by (9), then applying probabilistic argument one can prove that u(n) = 1 for any value of n, if the inequality holds, consequently we deal with the case E(Y i ) < E(t i ).Inequality (20) expresses, that, in average, the filled amount of material during one unit is more than or equal to the withdrawn material.This is the reason of the material aggregation and it causes overflow.
Further properties of φ z w n ( ) ( ) are the following: Moreover, the rate of convergence is

exponential. □ 4 Analytic solutions in special cases
In the remaining part of the paper we restrict ourselves to the case w ≡ 1.We assume the independence of the time and the amount of material, that is, the property h ( j, i) = f (j) • g(i) .We provide analytic solutions of (18) in two special cases concerning the distributions of time intervals and filled amount of material.One of these cases is when both the time intervals and the filled amounts of material have geometric distribution.First we transform Eq. ( 18) into a less complicated form, then we try to find its solution in a special form.Since we know that the solution of (18) is unique, the special form provides the function defined by ( 14).This technique demonstrates the importance of the analysis of the equations presented in the previous section. Let 1 , i = 1,2,... .Then Eq. ( 18) can be transformed into the following form: We look for the solution of (22) in the form Now, μ z satisfies the following (characteristic) equation If 1 < z , then (24) has two real roots, one of them is larger than 1, the other is between 0 and 1.This latter provides a bounded solution of ( 22), therefore it is the function defined by ( 14).
If z = 1 , then Eq. ( 24) has two real roots as well, one of them is 1, the other one is less than 1, and it provides a positive function tending to zero.
In order to set against the formulas experimentally, we computed the analytic solution of (18) and compared it to the values arising from Monte-Carlo simulation.The process can be easily simulated as overflow can happen only at filling time points.Expectations can be estimated by the average.We simulated the process to T = 1000 N = 10000 times.We applied geometric distribution with f = 0 8 . for time intervals and geometric distribution with g = 0 6 . for filled amount of material.The analytic solution, φ z (n) can be seen in Fig. 3, and the differences between the analytic and simulated results are plotted in Fig. 4.This proves the compliance of the Monte-Carlo simulation as well.
One can see that the largest difference is smaller than 0.002.The results for the overflow probabilities are plotted in Fig. 5.
Another special case when the analytic solution can be given is the following.Let t i be the sum of two independent random variables with geometric distribution.More precisely, The filled amount of material is constant, namely Now, if we try to find the solution in the form of ( 23), then μ z satisfies the following (characteristic) equation where μ z is the root of a cubic equation.For z = 1, Eq. ( 28) is simplified to One can easily check that μ 1 = 1 is a root of (29).Simplifying (29) by μ 1 − 1, the remaining quadratic equation to solve is One can prove that the largest root of (30) is larger than 1 for any value of 0 1 < < f , 1/3 ≠ f .The smaller one is between zero and 1 for 1 3 1 < < f and it is also greater than one if 0 13 < < f .
Moreover, both of them are equal to 1, if f = 1 3 .This means that we have a bounded solution in the case of 1 3 < f .As for the reason of the condition 1 3 < f , take into consideration , therefore the expectation of the filled amount of material during one unit time is which is greater than 1 assuming f < 1 3, and smaller than 1 assuming 1 3 < f coinciding with (20).
The exact overflow probabilities and the simulated ones in case of ( 26) and ( 27) with f = 0 35 .can be seen in Fig. 6.The number of simulations was 10000, the time interval on which the process is investigated is [0,10000].Solving (30) we get (u 1 ) 1 ≈ 0.9055, (u 1 ) 2 ≈ 3.809, therefore where c 1 = u(0).In those cases when c 1 can not be computed analytically, it may be determined by Monte-Carlo simulation.In the present case c 1 = 0.9002.Figure 6 presents very good coincidences between the analytic result and the simulated values.

Approximate solutions by parameter fitting
We are far from thinking that exact solutions have always the form of (23).Nevertheless, it can be useful to approximate the solutions by a formula given by (23).First, we provide some estimated values of overflow applying Monte-Carlo simulation, then we fit a curve on them by the least square method.In those cases when we have analytic solutions as well, we compare the fitted curve and that provided by the analytic formula.In the case of the example presented secondly in the previous section, that is when the distribution of the filling times is defined by (26) with f = 0 35 .and the distribution of the filled amount of material is defined by ( 27), the approximate formula results in u * (n) = 0.9027 • 0.9058 n .This function is plotted in Fig. 7.
One can see that this approximate formula is very close to (31).The largest difference between the approximate values and the formula (31) is about 0.01, which is the error of the simulation.This can be seen in Fig. 8.
The next figures (Fig. 9 and 10) represent the goodness of the fitted curves in case of Poisson and binomial distributions.These distributions take value zero.In order to avoid it, we increase the generated values by 1. Namely, let The parameters are λ 1 = 1, λ 2 = 0.9.The simulation was executed to T = 1000 and the number of simulations was N = 10000.The fitted curve is u * (n) = 0.8608 • 0.9003 n , which shows very good coincidence with the simulated points, as Fig. 9 represents.
The expectation of the times equals 1 + 1 = 2, the expectation of the filled amount of material is 0.9 + 1 = 1.9, therefore inequality (20) holds.The fitted curve and the simulated points coincide well, supporting experimentally that the analytic solution of Eq. ( 19) is close to the form in (23).
The same phenomenon can be seen in the case of binomial distribution as well.Binomial distribution has two parameters namely n b and p b , the possible values are 0,1,2,...
and the distribution of the filled amount of material is  The main purpose of the investigations was to find the appropriate size of the storage, that is the volume enough for the changing material with a given reliability.As u(n) is the probability of the overflow, if we want to require reliability 0.95, then we can allow probability 0.05 for overflow.In general, to determine required size to reliability 1 − α , we have to solve the equation u(n) = α.More precisely, we have to find the smallest integer value n, for which u(n) ≤ α.Since usually we do not know the exact form of u(n), we apply the approximate form of it, that is, we investigate the equation u * (n) = α.The form of u * (n) can be easily treated, and  One can see that the expectations are the same in both cases but the dispersions are smaller in the case of binomial distribution.The larger the dispersion, the larger the uncertainty, the larger the required size.This phenomenon can be observed in Fig. 12. Keeping the distributions binomial, the expected values were fixed as E(t k ) = 2 and E(Y k ) = 1.9, but the dispersions change, and the required sizes change as well.Figure 12 confirms the preliminary expectation, namely, the larger the dispersion, the larger the uncertainty of the process, hence larger size is required to a given reliability.In the example, the following parameters are used: (36) Fig. 12 The required size in the function of reliability in case of binomial distributions with parameters included in Table 1 7 Comparison of the discrete and continuous model Finally, we compare the probability of overflow and the expected time of overflow for the discrete and continuous models.To avoid the differences caused by approximations, we apply exponential distributions in the case of the continuous model and geometric distributions in the case of the discrete model.It is a well-known fact that they correspond to each other.We chose parameters in such a way that the expectations are equal.In case of f j f f j ( ) = − ( )( ) 1 .
If f = 0 85 .and g = 0 8 . , the discrete distributions and the corresponding probability density functions are plotted in Fig. 13. and 14. .and exponential probability density function with μ g = 0.2 .
The exact overflow probabilities were computed by (23), ( 24) and (25) in the discrete model.In the continuous model the probabilities were computed by (12) in [8] applying c = 1.The probabilities show very good coincidences and they are presented in Fig. 15.

Conclusion
The operation of a processing system connected by an intermediate storage investigated.The random effects are discrete and the focus is the required volume for the change of material to a given reliability.The main restrictive assumptions of the model are: unity withdrawal rate is supposed and both the filling time and the filled amount of material are independent integer valued random variables.
The main results are the followings: a mathematical model with the governing equations is set up.The properties of the solution of the governing equation are analysed.In special cases the analytic form of the solution is given.We proposed this form for approximate function using the values provided by Monte-Carlo simulation.Goodness of the approximation is illustrated.Approximate solutions are applied for solving the problem of determination of the appropriate size to a given reliability.The results in the discrete and continuous models are compared and good coincidences are experienced.It proves that the discrete model may substitute the continuous model.

Fig. 1
Fig. 1 Schematic model of the batch subsystems connected by an intermediate storage

Fig. 2
Fig. 2 The amount of material in the storage in the function of time

1 .
,n b and the probabilities belonging these possible values are n In order to avoid value zero, the possible values were increased by 1, that is the distribution of the consecutive time intervals is

Figure 10
presents the simulated values of u(n) and the approximate curve of the form (23).The parameters are n t = 10, p t = 0.05, n Y = 10, p Y = 0.09 .The simulations were executed to T = 10000 and the number of simulations was N = 10000 .The fitted curve of the form (23) resulted in u * (n) = 0.8548 • 0.8925 n .Figure 10 shows the adequateness of the fitted curve in this case as well.

Fig. 10
Fig. 10 Simulated values of the overflow and the approximate curve in case of binomial distribution

and the values c 1 * and µ 1 *
are determined by the fitting curve for the simulated values by the least square method.In the case of binomial distribution with parameters presented in the above section, u * (n) = 0.8548 • 0.8925 n provides the results in required sizes.In the case of Poisson distribution with parameters presented in the previous section u * (n) = 0.8608 • 0.9003 n .The required sizes are quickly increasing in case of large reliability (Fig.11).

Fig. 11
Fig. 11 The required volume of the storage in the function of reliability in case of binomial and Poisson distribution

Fig. 15 Fig. 16
Fig. 15 Exact overflow probabilities in case of exponential distribution ( _ ) and discrete geometric distribution (*) 3,… .The case i = 0 means that there is no filling at this time point, we do not allow this option.Moreover, we do not assume the independence of t k and Y k for fixed values of k = 1,2,…, rather we use the two dimensional random variables (t k ,Y k ), with joint distribution

Table 1
Parameters of the binomial distributions in Fig.12