mirror of
https://github.com/Zenithsiz/ist-ddrs-lab2
synced 2026-02-03 14:10:05 +00:00
Started work on exercise 14.
This commit is contained in:
parent
ed8b8b61c4
commit
ef2df1159c
@ -21,7 +21,7 @@ for (𝜌 in 𝜌_all) {
|
||||
)
|
||||
|
||||
kleinrock <- approx_kleinrock(LinkCapacities, Flows, packet_size)
|
||||
cat(sprintf("Kleinrock average: %.5f\n", kleinrock$total_wait))
|
||||
cat(sprintf("Kleinrock average: %.5f\n", kleinrock$avg_packet_delay_network))
|
||||
|
||||
min_rate <- min(sapply(Flows, function(flow) flow$rate))
|
||||
endTime <- 10000 * (1 / min_rate)
|
||||
|
||||
@ -54,3 +54,5 @@
|
||||
)
|
||||
|
||||
#indent_par[Our values are the same as calculated manually, and thus we conclude our script is valid.]
|
||||
|
||||
#pagebreak()
|
||||
|
||||
46
typst/exercises/14.typ
Normal file
46
typst/exercises/14.typ
Normal file
@ -0,0 +1,46 @@
|
||||
#import "@preview/tablex:0.0.6": tablex, rowspanx, colspanx
|
||||
#import "/typst/util.typ" as util: indent_par, code_figure
|
||||
|
||||
#indent_par[We used our previously developed kleinrock simulator and the `pnet` simulator, running it 10 times and calculating 95% confidence intervals, acquiring the following results in table 18:]
|
||||
|
||||
#figure(
|
||||
pad(1em, tablex(
|
||||
columns: (auto, auto, auto, auto, auto),
|
||||
align: center + horizon,
|
||||
|
||||
|
||||
rowspanx(2)[ ρ ],
|
||||
rowspanx(2)[ λ ],
|
||||
rowspanx(2)[ μ ],
|
||||
colspanx(2)[ Average packet delay ],
|
||||
[ Kleinrock ],
|
||||
[ `pnet` ],
|
||||
|
||||
[ 0.05 ],
|
||||
[ 3.2 ],
|
||||
rowspanx(4)[ 64 ],
|
||||
[ 0.03289 ],
|
||||
[ 0.03315 .. 0.03359 ],
|
||||
|
||||
[ 0.5 ],
|
||||
[ 32.0 ],
|
||||
[ 0.0625 ],
|
||||
[ 0.0636 .. 0.06655 ],
|
||||
|
||||
[ 0.95 ],
|
||||
[ 60.8 ],
|
||||
[ 0.625 ],
|
||||
[ 0.28067 .. 0.43387 ],
|
||||
|
||||
[ 0.975 ],
|
||||
[ 62.4 ],
|
||||
[ 1.25 ],
|
||||
[ 0.45371 .. 0.88948 ],
|
||||
)),
|
||||
kind: table,
|
||||
caption: [Results]
|
||||
)
|
||||
|
||||
#indent_par[Although the kleinrock approximation never enters the confidence intervals obtained from the `pnet` simulator, for lower values of $ρ$, it is close to the confidence intervals. However for larger values of $ρ$, it starts to drift apart very noticeably.]
|
||||
|
||||
#pagebreak()
|
||||
@ -97,3 +97,6 @@
|
||||
|
||||
=== 13. Exercise 13
|
||||
#include "exercises/13.typ"
|
||||
|
||||
=== 14. Exercise 14
|
||||
#include "exercises/14.typ"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user