EF
and
CS
is omitted here because it is quite straight forward and
its schematics were shown in Figure 4.7.
We will analyze change of performance indices by varying the
number of servers. The number of servers used in CS
can be
varied by passing different numbers
with the following API,
where
is the number of servers desired.
Coupled* MakeTotalClientServerSystem(int n);
The simulation settings we use here are: the simulation ending time=10000; no display of continuously increasing , the scale factor is maximum, in which the clock jumps to the next event time; and there is no display of discrete event transitions. The following code shows the case where the number of servers is 5.
void main( void ) { Coupled* Sys = MakeTotalClientServerSystem(5);// n=5 Sys->PrintCouplings(); SRTEngine simEngine(*Sys, 10000); // simEngine.SetAnimationFlag(false); simEngine.SetTimeScale(DBL_MAX); // simEngine.Set_dtmode(SRTEngine::P_NONE); simEngine.RunConsoleMenu(); delete Sys; }
Let's change
sequentially from 1 to 5, and build the various
system models, and try mrun 20
for each configuration.
After completion of mrun 20
, DEVS++ summarizes the
performance indices to the console. 5.2 Table
4.1 shows performance
indices for each configuration and Figure 4.9s show
the trend of performance changes as
changes.
Average Queue Length and Average System Time are drastically reduced until reaches 3. Average Throughput increase up to 0.2 jobs/time-unit at =3 and then there is no increase at =4 and 5. The reason why Throughput doesn't increase after =3 might be that there is lack of client arrival from outside the system. We can find a similar phenomenon in Utilization which doesn't decrease when =2 but starts to decrease when =3.
Another interesting trend is that both utilizations at
=1 and
are equal to about 80%, not 100%, even though Average
Queue Length is 589 and 173 and Average System Time is 2,927.33
and 873.86 time-units, respectively. The reason seems to be caused
by Buffer::tau(SENDTO)
=2. Server
's
Idle
) is about 0.2, which makes sense when
considering Server::tau(Busy)
=10. In other words, except
for the client transmission time from Buffer
to
Server
, Server
keeps working all the time.
Performance Indices | =1 | =2 | =3 | =4 | =5 |
Queue Length | 589.00 | 173.79 | 1.65 | 0.71 | 0.58 |
System Time | 2,927.33 | 873.86 | 18.30 | 13.54 | 12.86 |
Throughput | 0.08 | 0.17 | 0.20 | 0.20 | 0.20 |
Utilization | 0.83 | 0.83 | 0.67 | 0.50 | 0.40 |
The following screen shot illustrates the average value and its
95% confidence interval for each statistical item listed where
the number of servers is 5. We can find uneven utilizations in
this screen shot. For example,
Busy
)=0.61 for
SV0
server, while
Busy
)=0.17 for SV4
server. This phenomenon is caused by the searching order in the
Buffer::Matched()
function in which checking for the
availability of servers starts from 0 index all the time. We may
need to modify the searching order if we want to utilize the
servers more evenly.
Note that in order to have a confidence interval for mu, you must have run a large number of simulations.[Zei76,LK91] It would help the analyst to know how many simulations were run to produce these results.
... ============= Total Performance Indices ========= CSsystem.CS.BF Average Q length: : 0.575612, 95% CI: [0.560994, 0.590231] CSsystem.CS.SV0 Busy: 0.61411, 95% CI: [0.611001, 0.617219] Idle: 0.38589, 95% CI: [0.382781, 0.388999] CSsystem.CS.SV1 Busy: 0.525135, 95% CI: [0.520404, 0.529867] Idle: 0.474865, 95% CI: [0.470133, 0.479596] CSsystem.CS.SV2 Busy: 0.413587, 95% CI: [0.408219, 0.418955] Idle: 0.586413, 95% CI: [0.581045, 0.591781] CSsystem.CS.SV3 Busy: 0.28686, 95% CI: [0.279344, 0.294376] Idle: 0.71314, 95% CI: [0.705624, 0.720656] CSsystem.CS.SV4 Busy: 0.16772, 95% CI: [0.159812, 0.175628] Idle: 0.83228, 95% CI: [0.824372, 0.840188] CSsystem.EF.Trans Average System Time: 12.8643, 95% CI: [12.8222, 12.9064] Throughput: 0.20068, 95% CI: [0.198181, 0.203179] ========== Simulation Run Completed! ==========