• Ei tuloksia

Parameters of the system

4.3 Simulation of the traffic system

4.3.1 Parameters of the system

As initial data of event-based queuing system the following items are used:

• Information about the arrival time of each car

• Information about service time for each vehicle

• Information about working hours of a company

For the current system, the variability in the arrival time was assumed in such meaning that the cars may not directly follow the schedule determined. They can arrive earlier agreed time or come late, as it was mentioned before. Thus, apart from the arrival timetable, some additional noise will be generated.

Similar approach can be used in order to add the variability to the service time. Despite it has been already agreed to be about 30 minutes for one car, the unforeseen situations and the human factor may influence the continuation of the working process in both directions, decreasing and increasing. Consequently, the natural way to realize this variability is to consider some additional noise as well.

The common approach for the realization of the purposes mentioned above is to consider the values of the random variable that follows a specified probability distribution as a noise. The random variable is a function f, each outcome ω ∈ Ωof which associates with real number f(ω) ∈ R, where Ω is nonempty point set, representing all possible outcomes of the experiment. Let us denoteΣ as an algebra of subsets ofΩ. And let us P : Σ →R+be a mapping, called a probability, defined for all elements ofΣso that the following rules are satisfied

• For eachA ∈Σ,06P(A)andP(Ω) = 1

• A, B ∈Σ,A∩B =∅, impliesP(A∪B) =P(A) +P(B)

Thus, the distribution function is a mappingFf(x) :R→R+given by

Ff(x) = P(f−1(−∞, x)) = P[ω :f(ω)< x] =P[f < x], x∈R

The probability density function (PDF) isf(x) = F0(x)[28]

The PDF of normal distribution is following:

f(x|µ, σ2) = 1

2πσ2

(x−µ)2

2

Where:

• µis the mean or expectation of the distribution

• σis the standard deviation

• σ2is the variance

The PDF of exponential distribution is:

f(x, λ) =

The PDF of continuous uniform distribution is:

f(x) =

Whereaandbare the boundary values [29, 28].

Initially, no sufficient statistical data has been received in order to create a hypothesis about the kind of probability distribution of the noise values. Consequently, for genera-tion of the noise for arrival time it was decided to consider three different distribugenera-tions and compare their effect on the queue.

Thus, the first distribution that was chosen is the exponential distribution with mean pa-rameterλ = 30. Physically it means that the majority of cars will arrive just a little bit later than they have to according to the scheduled time, but the situations with significant delays are also possible. However, in this case, ”noisy” random variable may have just positive values that exclude the possibility of earlier arrival and arrival in time as well.

To avoid this the outcomes of another generator that randomly generates integer numbers uniformly distributed at the [-1 1] interval is used. Its results are multiplied by the out-come of exponential noise, so after these manipulations, the noise value is capable to have negative and zero values as well. Further, for the convenience, this kind of noise in arrival time will be marked as ATN1 (arrival time noise of the first type). The PDF and CDF of this exponential distribution are presented in the following figure:

Figure 1.Exponential distribution with parameterλ= 30

Another possible kind of distribution is normal (Gaussian), with parameters µ = 0and σ = 15. In physical terms, it means that for all drivers the maximal deviation from the predefined time can be about 45 minutes. However, such situations are least likely and usually, the arrival time of drivers will just slightly vary from scheduled, but it does not exclude the possibility of appearance too late or too early arrival. This noise is marked as ATN2 (arrival time noise of the second type).

Figure 2. Normal distribution with parametersµ= 0andσ= 15

The least probable but still possible is noise, the values of which are uniformly distributed at the interval [-30 30]. Such kind of arrival uncertainty means that each car can have fluctuations in arrival time from 0 to 30 minutes and any deviation may occur with equal probability. The ATN3 (arrival time noise of the third type) indication will be used when referring to such kind of uncertainty in arrival time.

Figure 3. Uniform distribution with lower endpoint -30 and upper endpoint 30

Finally, the information about arrival time for each car from each area can be generated a combination of scheduled time and generated noise. For mathematical representation scheduled service time is written as numbers representing the minutes after the beginning

of the working day. In these terms start time 7:00 corresponds to 0 and the end time which is at 22:00 corresponds to 900. Thus, arrival timetable 3 can be reformulated as a matrix, the first column of which represents the order of cars from different regions and the second one relates to arrival time written in the form mentioned above:

First column - order of cars:

[1 6 2 4 1 5 7 1 3 1 2 1 1 2 5 3 7 1 2]τ Second column - scheduled arrival time:

[15 45 105 135 195 225 285 315 375 405 465 555 585 645 675 735 765 825 855]τ

This matrix is denoted as SAT (scheduled arrival time). Thus, in these terms ”noisy” ar-rival time can be generated as the sum of scheduled and one of the generated noise (ATN1, ATN2 or ATN3, in dependence on the required conditions). The arrival time vector gen-erated in this way is conveniently denoted by ATN (arrival time with noise).

The service time is assumed to be equal to half of an hour for every car since the differ-ences between the vehicles were not considered. However, taking into account hypothet-ical variations which are based on the possible unobserved reasons, the service time may be generated as values of a random variable that follows normal (Gaussian) distribution with parametersµ= 30andσ= 5. The interpretation of this is that the service time will be not exactly 30 minutes but close enough to it with the maximal deviation of about 15 minutes. Like the cases above, the service time generated in this way will be denoted as STN (service time with noise).

As the attributes of the system which dynamically change during the simulation the fol-lowing items are considering:

• Information about the start of a service time for each vehicle

• Information about the end of a service time for each vehicle

• Information about the queue of the cars, which has been already arrived but were not served at the considering moment

The beginning of a working day, the end of the car service process, and the end of the work are perceived as events in this system. It means that whenever one of these actions occurs the state of dynamic attributes changes.

The output parameters of the system are the total waiting time in queue for all cars and the number of the vehicles which were not served because of the limits of working hours.

Both parameters are computed separately for each area and during one working day.