DISKRÉTNY PROCES ZHROMAŽĎOVANIA S DVOMA TRIEDAMI PRIORÍT THE DISCRETE PROCESS OF STORAGE WITH TWO PRIORITY CLASSES DISKRÉTNY PROCES ZHROMAŽĎOVANIA S DVOMA TRIEDAMI PRIORÍT THE DISCRETE PROCESS OF STORAGE WITH TWO PRIORITY CLASSES

paper is devoted to a specific model of the discrete process of storage with two priority classes. Every priority class of the elements is formed by independent Poisson distributed incoming streams of the elements. There are derived some basic characteristic values, a method of assignment optimal out-going capacities for the classes of priority and a costs minimising method for the length of the storage period as well.


Introduction
The following discrete process of priority storage is a generalisation of the storage process with a determining time of service T Ͼ 0 and the incoming stream of elements following the Poisson distribution with rate Ͼ 0. Capacity of a storage area will be identical with the infinite length of waiting line and we shall assume that the accumulation of the elements ends in each moment of time t i , so that T ϭ t i Ϫ t iϪ1 , ᭙i. Either the group containing M elements or all waiting line, when its length is below M, is served immediately after the moment t i . The rest of the elements which have not been served waits for their service at the next moment t iϩ1 . Exactly prescribed time T is called a storage period and its length defines a duration of the accumulation. The positive integer M is usually called a maximum out-going capacity. We assume that the incoming stream of elements follows the Poisson distribution, so the probability to enter exactly r elements during storage period T has a form r ϭ ᎏ ( r T ! ) r ᎏ e ϪT with a mean value T Ͼ 0 during period T. The ratio of the mean-value T elements during a storage period and maximum out-going capacity M will be called utilisation factor and it will satisfy We denote S n the amount of accumulated elements at the moment when the nth period T ends, and it is called the state at the end of the period. Value of the state at the end of the period depends on the number of entered elements X T during period T and on the rest of elements Z nϪ1 from the last period. We can express the stochastic variable Z by the form Z n ϭ S n Ϫ M, if the tov počas prebiehajúcej periódy je aspoň M, alebo ako hodnotu 0, ak zhromaždených elementov je menej ako M. Stavy S n na konci periódy môžeme tak vyjadriť v nasledujúcom tvare kde výraz Z nϪ1 ϭ max{S nϪ1 Ϫ M, 0} stručne vyjadruje zvyšok elementov z predchádzajúcej periódy.

Popis modelu a jeho riešenie
Predpokladajme, že máme daný diskrétny proces zhromažďovania s predpísanou dĺžkou periódy T. Nech do systému vstupujú amount of accumulated elements during previous period is at least as big as M, or by value 0, if the amount is below M. States S n at the end of periods can be described in the following form where the term Z nϪ1 ϭ max{S nϪ1 Ϫ M, 0} briefly expresses the rest of elements from the last period.
Under the condition (1.1.) the amount of the elements at the end of period S n forms a random variable of the Markov chain having steady-state probabilities of states whereas those probabilities are not dependent on the number of period and we can leave out the index of period. If probabilities to have a state S ϭ k elements at the end of the period are denoted as p k ϭ P(S ϭ k) and probabilities to have k incoming elements as then we can express the probabilities at the end of period by infinite system of equations The basic solution of the system (1.3.) using generating functions is characterised in [1] and those results are completed in detail from [2]. We can derive the mean-value of the state at the end of period by a usual method of computing the first derivative of the corresponding generating function at point z ϭ 1. So, we get where z k are roots of the characteristic equation z M Ϫ e ϪM(1 Ϫ z) ϭ 0 for M Ն 2 and their computing method with characteristics is completely described in [2]. For M ϭ 1 we have a special form The mean-value of the rest of elements at the end of period is expressed with a help of (1.2.), leaving out indexes of periods, as (1.5.) In the next part of this paper we shall be interested in the storage system with the elements divided into the classes of service priority.
Dôležitou zmenou v druhom prípade je dopĺňanie voľnej kapacity elementami druhej triedy. Deficitom D výstupnej kapacity nazveme rozdiel celkovej výstupnej kapacity M a aktuálneho počtu obslúžených elementov prvej triedy (ANSE1) v príslušnej perióde, t. j. D ϭ M Ϫ ANSE1. Pretože uvažujeme systém zhromažďovania s nekonečným zhromažďovacím priestorom v stabilizovanom režime, je zrejmé, že pre strednú hodnotu obslúžených elementov prvej triedy E(ANSE1) a strednú hodnotu elementov prvej triedy, ktoré počas periódy T do systému vstúpili E(X T ), platí E(ANSE1) ϭ E(X T ) ϭ ϭ 1 T. Strednú hodnotu deficitu môžeme potom definovať ako Maximálna výstupná kapacita M 2 pre elementy druhej triedy nemôže byť zrejme väčšia ako stanovená stredná hodnota deficitu different classes enter the system e.g. according to a supplier. To make it simple, we shall discuss only two independent incoming streams with rates 1 Ͼ 0, 2 Ͼ 0 following the Poisson distribution. The accumulation of all elements performs at a common storage area. One common machine provides their service with a maximum outgoing capacity M at the same time, immediately when a period of storage is finished. We can organise their own accumulation and service in the following two ways: 1. Each class of elements disposes of a reserved self-capacity of the service from the total maximum out-going capacity M (i.e. the elements of the first class have a reserved maximum outgoing capacity M 1 , the elements of the second class have the maximum out-going capacity M 2 where M 1 ϩ M 2 ϭ M). The service of accumulated elements is accomplished by serving the elements of each class separately as if there are fewer of them than M i , all of the elements are served. If there are accumulated more of them than M i they are served to a full capacity M i of each class and the rest waits for its service in the next period. For this model of service has been considered a cost method optimising length of period in [3]. 2. The second case is defined as: Denote each class of elements as a class of priority and we shall organise their service according to their priority classes. It is usual that the smaller number denotes a higher class of priority and a higher number denotes a lower class of priority. The marked elements of the first class will have a higher priority than the elements of the second class and they will be preferred. Incoming elements are ordered to the waiting lines with respect to their priority class. Within the accumulated elements first are served the elements of the first class (higher priority). According to their amount either M of accumulated elements are served, if there are more elements than M and the rest of them (together with elements of the 2nd priority class) waits for the next service or if there are fewer of them than M, they are served all and the rest of outgoing capacity M 2 is completed with elements of the second class as follows: If the amount of the elements of the second class is smaller than the remaining capacity M 2 filled with the first class elements, they are served all, otherwise the rest of them waits for the service in the next period.
We shall be interested in detail in the second case in the following chapters.
An important change in the second case is filling up of the idle capacity with the elements of the second class. We shall call a difference between the out-going capacity M and the actual number of served elements of the first class (ANSE1) in a corresponding period as a deficit D ϭ M Ϫ ANSE1. Since we reason a steady-state infinite storage area system, it is clear that the meanvalue of the served elements of the first class E(ANSE1) and a meanvalue of the entered elements E(X T ) the system of the same class during the period T will hold E(ANSE1) ϭ E(X T ) ϭ 1 T. We shall define the mean-value of the deficit as Maximal out-going capacity M 2 for the elements of the second class cannot probably be higher than the mean-value of the deficit Pre elementy prvej triedy priority je teda vyhradená kapacita M 1 ϭ M Ϫ M 2 . Teda, obe výstupné kapacity M 1 , M 2 sú diskrétne závislé od dĺžky zhromažďovacej periódy.
denotes an integer part of the number x, the greatest integer Յ x. M 1 ϭ M Ϫ M 2 assigns the capacity for the elements of the first class. So, both the out-going capacities M 1 , M 2 are discreetly dependent on the length of the accumulation period.
Imagine now that our system of storage is composed of two different parts (two fictive subsystems) when the accumulated elements are served at the same time immediately after the end of the storage period by a common machine with the total out-going capacity M. The first part disposes of the out-going capacity M 1 and the second part of capacity M 2 related to the existing period T. To each part of a system incomes independent stream of elements respecting Poisson distribution with the mean-value of entered elements 1 T Ͼ 0, 2 T Ͼ Ͼ 0, see Fig. 1. Previous adaptation of the self-out-going capacities to the classes of priorities gives a feasible approximation for the system with priority classes and enables us to use a solving method from [3].
A stability condition of such an accumulation system is given by a requirement so that an equivalent condition to (1.1.) applied for entered elements of each class of priority. Thus, we have i T Ͻ Ͻ M i , i ϭ 1, 2. The utilisation factor [i] for each fictive subsystem of the priority class is given by a following expression [1] States of single subsystems are defined as a number of accumulated elements of single priority classes and states of a whole system will be defined as their sum. From an independence of incoming streams we shall easily derive a probability generating function of the states of the whole system.
We can obtain a mean-value of the state at the end of period by a usual method. Compute the first derivative at point z ϭ 1. So, we get and partial mean values E(S [i] ) can be expressed by (1.4a, b.) for each class of priority.
The mean-value of the rest at the end of period is expressed again from (1.5.) by (2.3.). So, we can write Overall time spent in the system is formed by the time which elements of each class of priority spend in a system. According to [1] and (1.5.) we can express the time in the form

Optimal decomposition of the total out-going capacity to the priority classes
In this part we shall deal with a problem of a decomposition of out-going capacity M for individual priority classes. Proportions of out-going capacities are for both priority classes discreetly dependent and they are joined by the following preliminary assumption M ϭ M 1 ϩ M 2 . For the optimal decomposition criteria we can take the mean-value of the rest of the elements at the end of the period. We shall minimise the objective function Z(T) ϭ E(Z [1] ) ϩ E(Z [2] ) , (2.5.) at given length of the storage period T.
According to the dependency of particular capacities and steady-state condition (2. which determines a finite number of integers of out-going capacity M 2 . By a sequential computing objective function (2.5.) we take such a capacity for which (2.5.) gets a minimal value. Value M 1 of out-going capacity of the first class of priority is then determined.
utilising factor [i] from (2.2.), which are searched for by a proper numerical method using the procedure described in [2]. According to [3], for a significant simplifying we can use a linear approxima- whose coefficients dependent on M i have the form We show the overall previous procedure in the following example.
Example: Let us have given for the storage system with two priority classes as follows: the incoming rates 1 ϭ 3 el./h., 2 ϭ ϭ 2 el./h., a common storage period T ϭ 1.2 h and the out-going capacity M ϭ 10 el.
From (2.6.) after substituting we shall obtain 2.4 Ͻ M 2 Ͻ 6.4. Necessary calculations will be assembled to the Tab. 1.
Optimal decomposition of the total out-going capacity M Tab. 1.
We can see from the Tab.1. that the optimal decomposition of total out-going capacity M ϭ 10 el. for the both priority classes is as follows: for the first class ϪM 1 ϭ 6 el., for the second class ϪM 2 ϭ 4 el.

Optimal length of the storage period
A relevant problem within the effective time control of the storage processes is a setting of the moments when the accumulation of elements will end (i.e. the setting of the period duration). The optimising method of the length of period in [3] regards the costs of the storage system with two independent incoming streams of elements where each variety of elements has a reserved actual out-going capacity from the system. We can use that technique after a simple modification for the reasoned model with priorities.
Let us denote c [i] 1 Ͼ 0 the service costs of one element, c [i] 2 Ͼ 0 denotes fixed costs for performing the system during one period and c [i] 3 Ͼ 0 are the costs for remaining in the system and a waiting line corresponding one element of the ith class of priority per time unit. The system serves T elements in average during one period and their costs will be C [i] 1 (T) ϭ c [i] 1 i T under the assumption of linear dependence on the amount of the served elements. If we [1] E(Z [2] ) E(Z [1]  Celkové náklady v závislosti od dĺžky periódy môžeme potom vyjadriť funkciou celkových nákladov združujúcou čiastkové náklady na obsluhu a prestoje v systéme. Pri daných nákladových sadzbách môžeme celkové náklady znížiť tým spôsobom, že budeme minimalizovať fixné náklady c [i] 2 Ͼ 0 rozložením na väčší počet obslúžených elementov tak, že vyjadríme pomernú časť celkových nákladov (2.8.) pripadajúcu na jeden obslúžený element vydelením hodnoty C [i] (T) priemerným počtom obslúžených elementov zodpovedajúcej triedy priority za jednu periódu i T. Z nákladovej funkcie (2.8.) potom dostaneme  Total costs function of the length of the period T can be expressed which joins the partial costs for service and the time spent in the system. At given cost rates we can reduce the global costs if we minimise fixed costs c [i] 2 Ͼ 0 by their distribution to a higher number of served elements by expressing a relative part of the total costs (2.8.) corresponding to one served element dividing the value C [i] (T) by the average number of served elements corresponding to the class of the priority per one period i T. From the costs function (2.8.) then we shall get We construct comprehensive costs function for the both priority classes From the stability conditions 1 T Ͻ M 1 , 2 T Ͻ M 2 for the both priority classes we shall get the limitation for the length of For computing E(Z [1] ) to (2.10.) we again use corresponding approximation terms (2.7.) adapted according to (1.5.).
Dependence of the individual out-going capacities M 1 , M 2 for the classes of priority does not allow us an analytical solution in (2.10.). Thus we use a method of consecutive calculations for the chosen lengths of period by application the condition (2.6.), from which we choose an optimal value.

Tab. 3
Let us choose T ϭ 3. From the condition (2.6.) 072 Ͻ M 2 Ͻ 5.74 we shall obtain feasible values of the out-going capacity M 2 whose calculations are aligned in the Tab. 3.
For T ϭ 5 and T ϭ 9 results are set in the Tab. 4. and Tab. 5. Tab. 5 Following Fig. 2. shows a dependency of the costs in the function (2.10.) on the length of period T for the selected parameters: 1 ϭ 0.42, 2 ϭ 0.24, M ϭ 7.

Conclusions
In the first part of the paper basic characteristic mean-values are defined and derived describing effective functioning of the considered storage system with two priority classes. It gives us a possibility to exploit those characteristic mean-values for deriving the optimal length period of element accumulation. In the second part of the paper is analysed the costs optimising method of the length of period minimising fixed costs according to the amount of served

Poďakovanie
Táto práca bola podporovaná Ministerstvom školstva a vedy SR v rámci grantového projektu č. 1/7211/20. elements during one period. There is also suggested a possibility of the optimal decomposing of the total out-going capacity for the classes of priority minimising the cumulative rest of elements regardless the class of the priority.