• Tidak ada hasil yang ditemukan

Session Approximate Solution

that produces the maximum steady state income per unit time are optimal decisions.

We do not assume that an optimal decision is unique. There may be multiple optimal decisions and each of those decisions may produce the same income at steady state.

The objective is to get any optimal decision. To make the analysis tractable, we consider only the number of clients connected in taking any decision. For a given value of the number of connected clients, the number that will be idle and the number that will be waiting for a session are estimated. So we find the optimal set of values for the array Ca(m) and then map them to the arrayC(m, N, R).

to be waiting and the penalty rate is P(0). The first part of the second term is the expected income from arriving clients. This is the rate at which clients arrive when in state m times the expected number of data units each client requests times the price per data unit when in this state. The second part of the second term is to handle the case when the client is rejected, and this is a loss and is the arrival rate at the highest price times the penalty to be paid.

Income =

mmax

X

m=0

P ri(m)

×

−W aiting(m)×P(0) +





λ(−Ca(m))×

Ed×price(−Ca(m)) , Ca(m)≤0

−λ(T −1)×P(1) , otherwise

(5.1) As can be seen, the expected income depends on the decision taken which is the value ofCa(m). So to find the best expected income rate, we have to find the proper values of Ca(m).

5.2.3 Finding W aiting()

As the state space has been reduced, the number of clients waiting for bandwidth (for a session) is approximated by calculating the expected number of clients waiting when m clients are connected and this is denoted by W aiting(m). The method to find W aiting(m) is as follows. The expected number of clients waiting when the state is (m, n1, n2, ..., ne, r1,..., re) is multiplied by the probability that the state is (m, n1, n2,..., ne, r1,..., re) when m clients are connected and this is added for every possible value of ni and ri, for all i. When m clients are connected, the probability that the state is (m, n1, n2,..., ne, r1,..., re) is given by P r(m, n1, n2, ..., ne, r1, ..., re).

The number of clients waiting when state is (m, n1, n2, ..ne, r1, ..., re)is by definition Pe

i=1ri. So

W aiting(m) = X

(n1,...,ne,r1,...,re)

P r(m, n1, n2, ..ne, r1, ..., re

e

X

i=1

ri

!

(5.2) When a client is connected, he may be in idle state, in session or waiting for a session. When m clients are connected, the probability that ni clients are in

session and ri clients are waiting for a session for i ranging from 1 to e is given by P r(m, n1, n2, ..ne, r1, ..re). If the value of e is 1 (all clients request exactly one unit of bandwidth), Pr() can be obtained using the finite source queueing theory formula[57].

P r(m, n1, r1) = m!

(m−n1−r1)!×n1!×Br1 (

S(0) S(1)

n1+r1)

×P r(m,0,0) (5.3)

and

P r(m,0,0) = 1

P

n1,r1

m!

(m−n1−r1)!×n1!×Br1

S(0)

S(1)

n1+r1

For values of e > 1, we expand the terms of the above equation in a “natural”

manner (we are unable to prove that this is an accurate formula), and, form clients, we use the following expression for steady state probability.

P r(m, n1, n2, ..ne, r1, ..., re) = m!

(m−Pe

i=1{ni+ri})!×(Pe

i=1ni)!×Qe i=1

B i

ri

×

e

Y

i=1

(

S(0)×G(i) S(i)

ni+ri)

×P r(m,0,0, ...,0) (5.4) The sum of probabilities is 1. Therefore, another equation is

X

(n1,...,ne,r1,...,re)

P r(m, n1, n2, ..ne, r1, ..., re) = 1

On substituting the value of P r(m, n1, n2, ..ne, r1, ..., re) from equation 5.4, we get

X

(n1,...,ne,r1,...,re)

[ m!

(m−Pe

i=1{ni+ri})!×(Pe

i=1ni)!×Qe i=1

B i

ri

×

e

Y

i=1

(

S(0)×G(i) S(i)

ni+ri)

×P r(m,0,0, ...,0)] = 1

TH-1482_08610101

From this the value ofP r(m,0,0...0)is P r(m,0,0, ...,0) =( X

(n1,...,ne,r1,...,re)

{ m!

(m−Pe

i=1{ni+ri})!×(Pe

i=1ni)!×Qe i=1

B i

ri

e

Y

i=1

S(0)×G(i) S(i)

ni+ri

})−1 (5.5)

5.2.4 Finding P ri()

I(m), the expected number of idle clients when there aremclients in the system can be found the same way as W aiting(m). So, the expression is

I(m) = X

(n1,...,ne,r1,...,re)

(

P r(m, n1, n2, ..ne, r1, ..., re)×(m−

e

X

i=1

{ni+ri})!

)

(5.6) Now, the departure rate from the system isI(m)×d×S(0) by definition of the model. If we consider this departure process to be memoryless and if we ignore the rejection of clients at connection time (making the arrival process memoryless), then the system can be modelled as a Markov Chain and the global balancing equation can be applied:

P ri(m)×departure rate=P ri(m−1)×arrival rate (5.7) equation where P ri(m) is the steady state probability of m connected clients. The mean arrival rate when there are m −1 clients is λm−1, and this depends on the price being charged in state m − 1. By our definition given in Table 5.1 this is λ(−Ca(m−1)). So we get,

P ri(m)×I(m)×d×S(0) =P ri(m−1)×λ(−Ca(m−1)) (5.8) This can be re-written as

P ri(m) = 1 I(m)

λ(−Ca(m−1)) d×S(0)

×P ri(m−1) (5.9)

Further, the following will hold and the two equations can be used to solve for P ri(m).

1 =

mmax

X

i=0

P ri(i) (5.10)

5.2.5 Finding E

d

The method to find the approximate data consumption by an arriving client, Ed is given below. When a client connects, he consumes i units of bandwidth for a period with mean S(i)1 with probability G(i)and then becomes idle for a period with mean

1

S(0). At the end of this idle period he disconnects with probability d. Otherwise, he again requests for bandwidth with probability (1−d) and therefore again transfers Ed units of data. So we get,

Ed=

e

X

i=1

G(i)× 1

S(i)×i+ (1−d)×Ed This can be re-written as

Ed=

e

X

i=1

G(i) d×S(i) ×i

(5.11) .

5.2.6 Complexity Analysis

The values of P r() and W aiting(m) have to be calculated only once because these do not depend on the values ofCa(). The number of timesP r()has to be computed depends on the number of unique possible values of P r(m, n1, ..ne, r1, ..re). m ranges from 0 tommax. Whenmmax is large,n1 tonedepend onB and not onmmax so they are of order (B). r1 tore are of order (mmax). By multiplying all of them, the number of possible values of P r() formmax connected clients is O(mmaxe×Be). Since m can range from 0 tommax, this complexity has to be multiplied bymmaxto get the number of possible values of P r(). For a given value ofm, the value of P r() is computed by using equations 5.4 and 5.5. Their complexity is the same as the number of values computed. The time complexity is therefore given by O(mmaxe+1×Be). For example, if e is 2, mmax is 100 and B is 20, the time taken is O(1002+1×202) (O(4×108)).

As can be seen from equation 5.4, the values of P r(m, n1, ..., ne, r1, ..re) are in terms ofP r(m,0,0, ...,0). For findingP r(m, 0,0, ...,0), equation 5.5 is solved which has constant space requirement. Once P r(m,0,0, ..,0) is computed, every other value can be computed by using equation 5.4. Therefore, the space requirement to compute all values of P r() is a constant.

OnceP r()is found,W aiting()is computed and its value has to be stored. There- fore, the space complexity depends on the value ofW aiting(). The space complexity is O(mmax).

TH-1482_08610101

The time taken to find income and P ri(m) from equations 5.9 and 5.10 is O(mmax).

The next step is to find the number of possible values of Ca(). As already men- tioned, a service provider has to consider all possible values ofCa()and to choose that Ca() which maximizes the expected income. It is asserted without proof (although it is intuitively obvious if the model is examined) that, in any optimal solution, the price charged when there are k users will always be greater than or equal to the price charged when there are j users when k>j. So all permutations of the array Ca() do not have to be considered. We have a case of permutations of lengthmmax (the length of Ca() ) with elements ranging from 1 to T with repetitions allowed, but with all numbers in a permutation in non-decreasing order left to right. These permutations can be generated by T nested loops with indices i1, i2 ...iT and each index ranging from i(j) = i(j −1) to mmax , with i1 starting from 0. The number of instances of Ca() that will be generated will be of the order of mmaxT. For each instance the time to find the income has already been shown to be O(mmax). So the time com- plexity of the method is O(mmaxT+1). This complexity of O(mmaxT+1) is under the assumption that the value of P r(), W aiting(), Ed are already known. The overall time complexity is the maximum of the two and it is O(mmaxe+1×Be+mmaxT+1). If the solution is recomputed after modifying only the mean arrival rate λ(), the values of P r(), W aiting(), Ed need not be recomputed and therefore the time taken will be O(mmaxT+1). When the solution is implemented, a service provider observes the mean arrival rate of clients and based on this it calculates the output. If the mean arrival rate of client changes, it may recalculate the solution.