• Ei tuloksia

Simulations of the systems of loads

As it was mentioned earlier, the simulations of the two systems will be realized in order to analyze the dynamics of the loads. Each of the systems has a generator of the daily load for each car represented by values following some predefined distribution. The simula-tions activities will be performed for the 365 days. The first system contains a generator that produces values according to the assumption about the maximal load for all cars. It is obvious that in reality, despite the known maximum load, the vehicles can often be filled

with a smaller amount of garbage. Thus, the generator will produce values sufficiently close to the predetermined maximum but with some variability. This case will be denoted asSAML(system with assumed maximal loads). The simulations of another system will be performed with the generator of values based on the initial information about the real loads for cars. This case can be labelled asSRL(system with real loads).

5.3.1 Parameters of the systems

For both systems, one initial parameter is the arrival timetable 3, from which just the first column that represents the area of the arrived car will be used.

In case of SAML it was decided to use exponential distribution with parameter λ to generate the variability in the values. Consequently, the number representing the amount of garbage for each car can be generated from the formula:

−exprnd(λ) + 50

The parameter λ is unstudied, but it is initially assumed to be equal to 30. The further calibration of the parameters will be performed during the optimization stage. Thus, for theSAMLapart of arrival timetable the initial parameter isλ.

In the case of SRLthe second initial parameter is the data that contains the information about the monthly loads for each area for nine months. This data will be used in order to compute the values of the empirical cumulative distribution function (CDF) that will be used for inverseCDFmethod for simulating from a real distribution.

The algorithm of inverse CDF method is based on the fact that random variable x = F(−1)(u)has the distribution withCDFF, whereF isCDFof some continuous random variable,uis sampled fromU[0,1],F(−1) is the inverse function ofF. The visualization of this method can be performed in such way that uniform random number are ”shootted”

from the y-axis to theCDFcurve and the corresponding points in the x-axis are samples from the correct target. It is illustrated for the exponential distribution in the following figure [30]:

Figure 10. Producing samples from the exponential distribution using inverse CDF, F(x) = 1−exp(−x)andF(−1)(u) =ln(1−u)

For both systemsSAMLandSRLthe simulations will be performed twice: the first time based on the conditions mentioned above, the second time with additional settings that approximate the conditions of simulations to real. This means that the system admits the situations when some number of cars have not arrived due to the unforeseen circum-stances. To achieve this the random generators are used. One of them each day (simula-tion) generates the number of the cars which will not arrive. This number was determined to be no more than one-fourth of the total number of cars arriving this day. Another one randomly generates the line numbers in arrival timetable 3 in the total amount equal to the number has been generated. These line numbers determine from which areas the vehicles will not arrive this day.

The initial data about the loads for each area for nine months can be collected in the following table:

Table 4.Loads for each area for nine months

January 3071 3831 1084 1448 901 706 719

February 3489 2350 914 1055 419 739 554

March 5054 2811 1317 1238 425 927 751

April 2476 2040 879 695 1425 607 653

May 3661 1200 781 528 658 530 777

June 2777 1941 875 1560 1132 416 853

July 2754 1598 760 633 849 523 378

August 2401 1335 482 687 408 457 618

September 2498 1368 1130 607 499 521 483

Here all values are presented in tons.

Based on the table above as well as on the table that describes the number of the cars transporting the garbage for each area (Table 3) it is possible to calculate the average daily amount of garbage transported from each region by one car through division of the values in each column by the number of cars working at the corresponding region and by division the values in each row by the number of days corresponding to the month. This structure that contains this information will be denoted as ADGT (average daily amount of garbage transported)

The output of the SAML and SRL are the annual loads computed for each area, that means the total amount of garbage transported from each region for the one year.

5.3.2 Algorithm of simulation of the system work

The algorithm of one-day simulation can be described by following steps:

Data: arrival timetable, ADGT ifcase ofSAML then

Initialization of the parameterλ;

Generation of the day loads as arrayAof the sizeNCthe values of which follows the distribution:−exprnd(λ) + 50;

end

ifcase ofSRL then

Initialization ofADGT;

Generation of the day loads as arrayAof the sizeNCthe values of which will be obtained from inverseCDF(ADGT) method;

end

According to Table 3 andAcalculation of the amount of garbage that will be transported separately for each area;

GenerationNCNAandALN(NCNA);

Removing of rows in Table 3, line number of which are in theALN;

Repetition of the first two steps but with a modified matrix;

The algorithm above demonstrates one-day working processes related to the dynamics of loads. In order to make the conclusions, it is necessary to repeat this simulation 365 times summing the output.