most-queue 2.1__py3-none-any.whl → 2.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of most-queue might be problematic. Click here for more details.
- most_queue/misc/approx_cdf_make.py +3 -3
- most_queue/misc/calc_v_pls.py +1 -1
- most_queue/misc/flow_sum.py +11 -11
- most_queue/misc/run_mgn_with_h2_delay_cold_warm.py +66 -66
- most_queue/misc/{test_fj_delta.py → tests/test_fj_delta.py} +4 -4
- most_queue/misc/{test_network_opt_approx.py → tests/test_network_opt_approx.py} +1 -1
- most_queue/misc/{test_network_opt_plus.py → tests/test_network_opt_plus.py} +1 -1
- most_queue/misc/vacations_paper_utils.py +6 -6
- most_queue/random/__init__.py +0 -0
- most_queue/{rand_distribution.py → random/distributions.py} +70 -28
- most_queue/{sim/utils → random}/distributions.yaml +7 -4
- most_queue/{general/interfaces.py → random/utils/base.py} +2 -2
- most_queue/random/utils/create.py +71 -0
- most_queue/{general/distribution_fitting.py → random/utils/fit.py} +17 -22
- most_queue/random/utils/load.py +100 -0
- most_queue/sim/base.py +3 -3
- most_queue/sim/finite_source.py +1 -1
- most_queue/sim/flow_sum.py +6 -6
- most_queue/sim/fork_join_delta.py +1 -1
- most_queue/sim/impatient.py +1 -1
- most_queue/sim/negative.py +2 -1
- most_queue/sim/networks/network.py +1 -1
- most_queue/sim/networks/priority_network.py +1 -1
- most_queue/sim/priority.py +1 -1
- most_queue/sim/utils/servers.py +3 -3
- most_queue/sim/vacations.py +2 -3
- most_queue/theory/fifo/ek_d_n.py +1 -1
- most_queue/theory/fifo/gi_m_1.py +3 -3
- most_queue/theory/fifo/gi_m_n.py +3 -3
- most_queue/theory/fifo/mg1.py +1 -1
- most_queue/theory/fifo/mgn_takahasi.py +1 -1
- most_queue/theory/fifo/mmnr.py +1 -1
- most_queue/theory/negative/mg1_disasters.py +1 -1
- most_queue/theory/negative/mg1_rcs.py +1 -1
- most_queue/theory/negative/mgn_disaster.py +1 -1
- most_queue/theory/negative/mgn_rcs.py +1 -1
- most_queue/theory/networks/open_network.py +1 -1
- most_queue/theory/networks/open_network_prty.py +1 -1
- most_queue/theory/priority/non_preemptive/mg1.py +1 -1
- most_queue/theory/priority/preemptive/m_ph_n_busy_approx.py +9 -9
- most_queue/theory/priority/preemptive/mm2_3cls_busy_approx.py +4 -4
- most_queue/theory/priority/preemptive/mmn_2cls_pr_busy_approx.py +4 -4
- most_queue/theory/utils/busy_periods.py +1 -1
- most_queue/theory/utils/conditional.py +2 -2
- most_queue/theory/utils/flow_sum.py +6 -6
- most_queue/theory/utils/max_dist.py +1 -1
- most_queue/theory/utils/q_poisson_arrival_calc.py +1 -1
- most_queue/theory/utils/transforms.py +1 -1
- most_queue/theory/vacations/m_h2_h2warm.py +1 -1
- most_queue/theory/vacations/mg1_warm_calc.py +1 -1
- most_queue/theory/vacations/mgn_with_h2_delay_cold_warm.py +3 -3
- most_queue/theory/vacations/mmn_with_h2_cold_and_h2_warmup.py +1 -1
- {most_queue-2.1.dist-info → most_queue-2.3.dist-info}/METADATA +33 -3
- most_queue-2.3.dist-info/RECORD +110 -0
- most_queue/sim/utils/distribution_utils.py +0 -222
- most_queue/sim/utils/exceptions.py +0 -37
- most_queue-2.1.dist-info/RECORD +0 -109
- /most_queue/{general → io}/__init__.py +0 -0
- /most_queue/{general → io}/plots.py +0 -0
- /most_queue/{general → io}/tables.py +0 -0
- /most_queue/{general/distribution_params.py → random/utils/params.py} +0 -0
- {most_queue-2.1.dist-info → most_queue-2.3.dist-info}/WHEEL +0 -0
- {most_queue-2.1.dist-info → most_queue-2.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -4,21 +4,21 @@ import matplotlib.pyplot as plt
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
from tqdm import tqdm
|
|
6
6
|
|
|
7
|
-
from most_queue.
|
|
7
|
+
from most_queue.random.distributions import GammaDistribution, H2Distribution
|
|
8
8
|
|
|
9
9
|
if __name__ == "__main__":
|
|
10
10
|
|
|
11
11
|
# Входные данные
|
|
12
12
|
|
|
13
13
|
b1 = 3 # мат. ожидание
|
|
14
|
-
|
|
14
|
+
cv = 1.2 # коэффициент вариации
|
|
15
15
|
a_s = 4 # ассиметрия
|
|
16
16
|
|
|
17
17
|
# задаем начальные моменты распределения
|
|
18
18
|
|
|
19
19
|
b = [0, 0, 0]
|
|
20
20
|
b[0] = b1
|
|
21
|
-
b[1] = pow(b[0], 2) * (1 + pow(
|
|
21
|
+
b[1] = pow(b[0], 2) * (1 + pow(cv, 2))
|
|
22
22
|
|
|
23
23
|
# дисперсия
|
|
24
24
|
D = b[1] - pow(b[0], 2)
|
most_queue/misc/calc_v_pls.py
CHANGED
|
@@ -9,7 +9,7 @@ from functools import lru_cache
|
|
|
9
9
|
import numpy as np
|
|
10
10
|
from scipy.misc import derivative
|
|
11
11
|
|
|
12
|
-
from most_queue.
|
|
12
|
+
from most_queue.random.distributions import H2Distribution, H2Params
|
|
13
13
|
from most_queue.theory.fifo.mgn_takahasi import MGnCalc, TakahashiTakamiParams
|
|
14
14
|
from most_queue.theory.utils.conv import conv_moments
|
|
15
15
|
from most_queue.theory.utils.transforms import lst_exp
|
most_queue/misc/flow_sum.py
CHANGED
|
@@ -5,7 +5,7 @@ Test summation of flows.
|
|
|
5
5
|
|
|
6
6
|
import matplotlib.pyplot as plt
|
|
7
7
|
|
|
8
|
-
from most_queue.
|
|
8
|
+
from most_queue.random.distributions import GammaDistribution
|
|
9
9
|
from most_queue.sim.flow_sum import FlowSumSim
|
|
10
10
|
from most_queue.theory.utils.flow_sum import SummatorNumeric
|
|
11
11
|
|
|
@@ -17,7 +17,7 @@ def test():
|
|
|
17
17
|
|
|
18
18
|
# Задаем следующие параметры:
|
|
19
19
|
n_nums = 10 # число суммируемых потоков
|
|
20
|
-
|
|
20
|
+
cv = 0.74 # коэффициент вариации каждого потока
|
|
21
21
|
mean = 1 # среднее каждого потока
|
|
22
22
|
num_of_jobs = 400000 # количество заявок для ИМ
|
|
23
23
|
is_semi = False # True, если необходимо использовать метод семиинвариантов вместо H2
|
|
@@ -30,7 +30,7 @@ def test():
|
|
|
30
30
|
# одинаково распределены
|
|
31
31
|
a = []
|
|
32
32
|
for i in range(n_nums):
|
|
33
|
-
params1 = GammaDistribution.
|
|
33
|
+
params1 = GammaDistribution.get_params_by_mean_and_cv(mean, cv)
|
|
34
34
|
a1 = GammaDistribution.calc_theory_moments(params1, 4)
|
|
35
35
|
a.append(a1)
|
|
36
36
|
|
|
@@ -47,14 +47,14 @@ def test():
|
|
|
47
47
|
# i - кол-во суммируемых потоков, j - номер начального момента
|
|
48
48
|
|
|
49
49
|
# Расчет ошибок и отображение результатов
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
cvs_sim = s_sim.cvs
|
|
51
|
+
cvs_num = s.cvs
|
|
52
52
|
errors1 = []
|
|
53
53
|
errors2 = []
|
|
54
|
-
|
|
54
|
+
errors_cv = []
|
|
55
55
|
|
|
56
56
|
str_f = "{0:^18s}|{1:^10.3f}|{2:^10.3f}|{3:^10.3f}|{4:^10.3f}|{5:^10.3f}"
|
|
57
|
-
print("{0:^18s}|{1:^10s}|{2:^10s}|{3:^10s}|{4:^10s}|{5:^10s}".format("-", "a1", "a2", "a3", "a4", "
|
|
57
|
+
print("{0:^18s}|{1:^10s}|{2:^10s}|{3:^10s}|{4:^10s}|{5:^10s}".format("-", "a1", "a2", "a3", "a4", "cv"))
|
|
58
58
|
print("-" * 80)
|
|
59
59
|
|
|
60
60
|
for i in range(n_nums - 1):
|
|
@@ -67,7 +67,7 @@ def test():
|
|
|
67
67
|
s_sim.flows_[i][1],
|
|
68
68
|
s_sim.flows_[i][2],
|
|
69
69
|
s_sim.flows_[i][3],
|
|
70
|
-
|
|
70
|
+
cvs_num[i],
|
|
71
71
|
)
|
|
72
72
|
)
|
|
73
73
|
print("-" * 80)
|
|
@@ -78,13 +78,13 @@ def test():
|
|
|
78
78
|
s.flows_[i][1].real,
|
|
79
79
|
s.flows_[i][2].real,
|
|
80
80
|
s.flows_[i][3].real,
|
|
81
|
-
|
|
81
|
+
cvs_sim[i],
|
|
82
82
|
)
|
|
83
83
|
)
|
|
84
84
|
print("-" * 80)
|
|
85
85
|
errors1.append(SummatorNumeric.get_error(s.flows_[i][0].real, s_sim.flows_[i][0]))
|
|
86
86
|
errors2.append(SummatorNumeric.get_error(s.flows_[i][1].real, s_sim.flows_[i][1]))
|
|
87
|
-
|
|
87
|
+
errors_cv.append(SummatorNumeric.get_error(cvs_num[i], cvs_sim[i]))
|
|
88
88
|
|
|
89
89
|
fig, ax = plt.subplots()
|
|
90
90
|
linestyles = ["solid", "dotted", "dashed", "dashdot"]
|
|
@@ -104,7 +104,7 @@ def test():
|
|
|
104
104
|
fig, ax = plt.subplots()
|
|
105
105
|
ax.plot(ns, errors1, label="error a1", linestyle=linestyles[0])
|
|
106
106
|
ax.plot(ns, errors2, label="error a2", linestyle=linestyles[1])
|
|
107
|
-
ax.plot(ns,
|
|
107
|
+
ax.plot(ns, errors_cv, label="error cv", linestyle=linestyles[2])
|
|
108
108
|
|
|
109
109
|
plt.legend()
|
|
110
110
|
str_title = "Отн. ошибка от числа сумм-х потоков, %"
|
|
@@ -9,13 +9,13 @@ import time
|
|
|
9
9
|
import numpy as np
|
|
10
10
|
|
|
11
11
|
from most_queue.misc.vacations_paper_utils import (
|
|
12
|
-
|
|
12
|
+
calc_moments_by_mean_and_cv,
|
|
13
13
|
dump_stat,
|
|
14
14
|
load_stat,
|
|
15
15
|
make_plot,
|
|
16
16
|
print_table,
|
|
17
17
|
)
|
|
18
|
-
from most_queue.
|
|
18
|
+
from most_queue.random.distributions import GammaDistribution
|
|
19
19
|
from most_queue.sim.vacations import VacationQueueingSystemSimulator
|
|
20
20
|
from most_queue.theory.vacations.mgn_with_h2_delay_cold_warm import (
|
|
21
21
|
MGnH2ServingColdWarmDelay,
|
|
@@ -144,13 +144,13 @@ def get_tt_stat(stat, n, l, buff, b, b_c, b_w, b_d, p_limit, w_pls_dt, stable_w_
|
|
|
144
144
|
|
|
145
145
|
def run_ro(
|
|
146
146
|
b1_service,
|
|
147
|
-
|
|
147
|
+
cv_service,
|
|
148
148
|
b1_warm,
|
|
149
|
-
|
|
149
|
+
cv_warm,
|
|
150
150
|
b1_cold,
|
|
151
|
-
|
|
151
|
+
cv_cold,
|
|
152
152
|
b1_cold_delay,
|
|
153
|
-
|
|
153
|
+
cv_cold_delay,
|
|
154
154
|
n=1,
|
|
155
155
|
num_of_jobs=300000,
|
|
156
156
|
num_of_roes=12,
|
|
@@ -168,16 +168,16 @@ def run_ro(
|
|
|
168
168
|
Parameters:
|
|
169
169
|
----------
|
|
170
170
|
b1_service: mean service time
|
|
171
|
-
|
|
171
|
+
cv_service: service time coefficient of variation
|
|
172
172
|
|
|
173
173
|
b1_warm: setup (or "warm-up ") mean time
|
|
174
|
-
|
|
174
|
+
cv_warm: warm-up coefficient of variation
|
|
175
175
|
|
|
176
176
|
b1_cold: vacation (or "cooling") mean time
|
|
177
|
-
|
|
177
|
+
cv_cold: vacation (or "cooling") coefficient of variation
|
|
178
178
|
|
|
179
179
|
b1_cold_delay: average cooling start delay time
|
|
180
|
-
|
|
180
|
+
cv_cold_delay: coefficient of variation of cooling start delay
|
|
181
181
|
|
|
182
182
|
n: number of channels
|
|
183
183
|
num_of_jobs - number of jobs for the simulation model
|
|
@@ -214,22 +214,22 @@ def run_ro(
|
|
|
214
214
|
stat["ro"] = ro
|
|
215
215
|
stat["n"] = n
|
|
216
216
|
|
|
217
|
-
b =
|
|
218
|
-
b_w =
|
|
219
|
-
b_c =
|
|
220
|
-
b_d =
|
|
217
|
+
b = calc_moments_by_mean_and_cv(b1_service, cv_service)
|
|
218
|
+
b_w = calc_moments_by_mean_and_cv(b1_warm, cv_warm)
|
|
219
|
+
b_c = calc_moments_by_mean_and_cv(b1_cold, cv_cold)
|
|
220
|
+
b_d = calc_moments_by_mean_and_cv(b1_cold_delay, cv_cold_delay)
|
|
221
221
|
|
|
222
222
|
stat["b"] = b
|
|
223
|
-
stat["
|
|
223
|
+
stat["cv_service"] = cv_service
|
|
224
224
|
|
|
225
225
|
stat["b_w"] = b_w
|
|
226
|
-
stat["
|
|
226
|
+
stat["cv_warm"] = cv_warm
|
|
227
227
|
|
|
228
228
|
stat["b_c"] = b_c
|
|
229
|
-
stat["
|
|
229
|
+
stat["cv_cold"] = cv_cold
|
|
230
230
|
|
|
231
231
|
stat["b_d"] = b_d
|
|
232
|
-
stat["
|
|
232
|
+
stat["cv_cold_delay"] = cv_cold_delay
|
|
233
233
|
|
|
234
234
|
get_tt_stat(
|
|
235
235
|
stat,
|
|
@@ -255,13 +255,13 @@ def run_ro(
|
|
|
255
255
|
|
|
256
256
|
def run_n(
|
|
257
257
|
b1_service,
|
|
258
|
-
|
|
258
|
+
cv_service,
|
|
259
259
|
b1_warm,
|
|
260
|
-
|
|
260
|
+
cv_warm,
|
|
261
261
|
b1_cold,
|
|
262
|
-
|
|
262
|
+
cv_cold,
|
|
263
263
|
b1_cold_delay,
|
|
264
|
-
|
|
264
|
+
cv_cold_delay,
|
|
265
265
|
num_of_jobs=300000,
|
|
266
266
|
ro=0.7,
|
|
267
267
|
n_min=1,
|
|
@@ -279,16 +279,16 @@ def run_n(
|
|
|
279
279
|
----------
|
|
280
280
|
|
|
281
281
|
b1_service: mean service time
|
|
282
|
-
|
|
282
|
+
cv_service: service time coefficient of variation
|
|
283
283
|
|
|
284
284
|
b1_warm: setup (or "warm-up ") mean time
|
|
285
|
-
|
|
285
|
+
cv_warm: warm-up coefficient of variation
|
|
286
286
|
|
|
287
287
|
b1_cold: vacation (or "cooling") mean time
|
|
288
|
-
|
|
288
|
+
cv_cold: vacation (or "cooling") coefficient of variation
|
|
289
289
|
|
|
290
290
|
b1_cold_delay: average cooling start delay time
|
|
291
|
-
|
|
291
|
+
cv_cold_delay: coefficient of variation of cooling start delay
|
|
292
292
|
|
|
293
293
|
ro - QS utilization factor
|
|
294
294
|
|
|
@@ -325,22 +325,22 @@ def run_n(
|
|
|
325
325
|
stat["ro"] = ro
|
|
326
326
|
stat["n"] = n
|
|
327
327
|
|
|
328
|
-
b =
|
|
329
|
-
b_w =
|
|
330
|
-
b_c =
|
|
331
|
-
b_d =
|
|
328
|
+
b = calc_moments_by_mean_and_cv(b1_service, cv_service)
|
|
329
|
+
b_w = calc_moments_by_mean_and_cv(b1_warm, cv_warm)
|
|
330
|
+
b_c = calc_moments_by_mean_and_cv(b1_cold, cv_cold)
|
|
331
|
+
b_d = calc_moments_by_mean_and_cv(b1_cold_delay, cv_cold_delay)
|
|
332
332
|
|
|
333
333
|
stat["b"] = b
|
|
334
|
-
stat["
|
|
334
|
+
stat["cv_service"] = cv_service
|
|
335
335
|
|
|
336
336
|
stat["b_w"] = b_w
|
|
337
|
-
stat["
|
|
337
|
+
stat["cv_warm"] = cv_warm
|
|
338
338
|
|
|
339
339
|
stat["b_c"] = b_c
|
|
340
|
-
stat["
|
|
340
|
+
stat["cv_cold"] = cv_cold
|
|
341
341
|
|
|
342
342
|
stat["b_d"] = b_d
|
|
343
|
-
stat["
|
|
343
|
+
stat["cv_cold_delay"] = cv_cold_delay
|
|
344
344
|
|
|
345
345
|
get_tt_stat(
|
|
346
346
|
stat,
|
|
@@ -366,12 +366,12 @@ def run_n(
|
|
|
366
366
|
|
|
367
367
|
def run_delay_mean(
|
|
368
368
|
b1_service,
|
|
369
|
-
|
|
369
|
+
cv_service,
|
|
370
370
|
b1_warm,
|
|
371
|
-
|
|
371
|
+
cv_warm,
|
|
372
372
|
b1_cold,
|
|
373
|
-
|
|
374
|
-
|
|
373
|
+
cv_cold,
|
|
374
|
+
cv_cold_delay,
|
|
375
375
|
n=1,
|
|
376
376
|
num_of_jobs=300000,
|
|
377
377
|
ro=0.7,
|
|
@@ -390,15 +390,15 @@ def run_delay_mean(
|
|
|
390
390
|
Parameters:
|
|
391
391
|
|
|
392
392
|
b1_service: mean service time
|
|
393
|
-
|
|
393
|
+
cv_service: service time coefficient of variation
|
|
394
394
|
|
|
395
395
|
b1_warm: setup (or "warm-up ") mean time
|
|
396
|
-
|
|
396
|
+
cv_warm: warm-up coefficient of variation
|
|
397
397
|
|
|
398
398
|
b1_cold: vacation (or "cooling") mean time
|
|
399
|
-
|
|
399
|
+
cv_cold: vacation (or "cooling") coefficient of variation
|
|
400
400
|
|
|
401
|
-
|
|
401
|
+
cv_cold_delay: coefficient of variation of cooling start delay
|
|
402
402
|
|
|
403
403
|
n - number of channels
|
|
404
404
|
num_of_jobs - number of jobs for the simulation model
|
|
@@ -434,22 +434,22 @@ def run_delay_mean(
|
|
|
434
434
|
stat["ro"] = ro
|
|
435
435
|
stat["n"] = n
|
|
436
436
|
|
|
437
|
-
b =
|
|
438
|
-
b_w =
|
|
439
|
-
b_c =
|
|
440
|
-
b_d =
|
|
437
|
+
b = calc_moments_by_mean_and_cv(b1_service, cv_service)
|
|
438
|
+
b_w = calc_moments_by_mean_and_cv(b1_warm, cv_warm)
|
|
439
|
+
b_c = calc_moments_by_mean_and_cv(b1_cold, cv_cold)
|
|
440
|
+
b_d = calc_moments_by_mean_and_cv(d, cv_cold_delay)
|
|
441
441
|
|
|
442
442
|
stat["b"] = b
|
|
443
|
-
stat["
|
|
443
|
+
stat["cv_service"] = cv_service
|
|
444
444
|
|
|
445
445
|
stat["b_w"] = b_w
|
|
446
|
-
stat["
|
|
446
|
+
stat["cv_warm"] = cv_warm
|
|
447
447
|
|
|
448
448
|
stat["b_c"] = b_c
|
|
449
|
-
stat["
|
|
449
|
+
stat["cv_cold"] = cv_cold
|
|
450
450
|
|
|
451
451
|
stat["b_d"] = b_d
|
|
452
|
-
stat["
|
|
452
|
+
stat["cv_cold_delay"] = cv_cold_delay
|
|
453
453
|
|
|
454
454
|
get_tt_stat(
|
|
455
455
|
stat,
|
|
@@ -496,13 +496,13 @@ def test_all():
|
|
|
496
496
|
|
|
497
497
|
ro_stat = run_ro(
|
|
498
498
|
b1_service=10.0,
|
|
499
|
-
|
|
499
|
+
cv_service=1.2,
|
|
500
500
|
b1_warm=3.1,
|
|
501
|
-
|
|
501
|
+
cv_warm=0.87,
|
|
502
502
|
b1_cold=4.1,
|
|
503
|
-
|
|
503
|
+
cv_cold=1.1,
|
|
504
504
|
b1_cold_delay=3.71,
|
|
505
|
-
|
|
505
|
+
cv_cold_delay=1.2,
|
|
506
506
|
n=n,
|
|
507
507
|
num_of_jobs=300000,
|
|
508
508
|
num_of_roes=10,
|
|
@@ -530,13 +530,13 @@ def test_all():
|
|
|
530
530
|
|
|
531
531
|
n_stat = run_n(
|
|
532
532
|
b1_service=10.0,
|
|
533
|
-
|
|
533
|
+
cv_service=1.2,
|
|
534
534
|
b1_warm=3.1,
|
|
535
|
-
|
|
535
|
+
cv_warm=0.87,
|
|
536
536
|
b1_cold=4.1,
|
|
537
|
-
|
|
537
|
+
cv_cold=1.1,
|
|
538
538
|
b1_cold_delay=3.71,
|
|
539
|
-
|
|
539
|
+
cv_cold_delay=1.2,
|
|
540
540
|
num_of_jobs=300000,
|
|
541
541
|
n_min=1,
|
|
542
542
|
n_max=10,
|
|
@@ -566,13 +566,13 @@ def test_all():
|
|
|
566
566
|
|
|
567
567
|
delay_stat = run_delay_mean(
|
|
568
568
|
b1_service=10.0,
|
|
569
|
-
|
|
569
|
+
cv_service=1.2,
|
|
570
570
|
b1_warm=3.1,
|
|
571
|
-
|
|
571
|
+
cv_warm=0.87,
|
|
572
572
|
b1_cold=4.1,
|
|
573
|
-
|
|
573
|
+
cv_cold=1.1,
|
|
574
574
|
ro=ro,
|
|
575
|
-
|
|
575
|
+
cv_cold_delay=1.2,
|
|
576
576
|
n=n,
|
|
577
577
|
num_of_jobs=1000000,
|
|
578
578
|
num_of_delays=10,
|
|
@@ -599,13 +599,13 @@ if __name__ == "__main__":
|
|
|
599
599
|
UTILIZATION = 0.7
|
|
600
600
|
N_STAT = run_n(
|
|
601
601
|
b1_service=10.0,
|
|
602
|
-
|
|
602
|
+
cv_service=1.2,
|
|
603
603
|
b1_warm=3.1,
|
|
604
|
-
|
|
604
|
+
cv_warm=0.87,
|
|
605
605
|
b1_cold=4.1,
|
|
606
|
-
|
|
606
|
+
cv_cold=1.1,
|
|
607
607
|
b1_cold_delay=3.71,
|
|
608
|
-
|
|
608
|
+
cv_cold_delay=1.2,
|
|
609
609
|
num_of_jobs=300000,
|
|
610
610
|
n_min=1,
|
|
611
611
|
n_max=10,
|
|
@@ -7,8 +7,8 @@ import os
|
|
|
7
7
|
import numpy as np
|
|
8
8
|
import yaml
|
|
9
9
|
|
|
10
|
-
from most_queue.
|
|
11
|
-
from most_queue.
|
|
10
|
+
from most_queue.io.tables import times_print
|
|
11
|
+
from most_queue.random.distributions import GammaDistribution
|
|
12
12
|
from most_queue.sim.fork_join_delta import ForkJoinSimDelta
|
|
13
13
|
from most_queue.theory.fork_join.split_join import SplitJoinCalc
|
|
14
14
|
|
|
@@ -44,9 +44,9 @@ def test_fj_delta():
|
|
|
44
44
|
Test for ForkJoin queue with delta.
|
|
45
45
|
"""
|
|
46
46
|
|
|
47
|
-
b_params = GammaDistribution.
|
|
47
|
+
b_params = GammaDistribution.get_params_by_mean_and_cv(SERVICE_TIME_AVERAGE, SERVICE_TIME_CV)
|
|
48
48
|
|
|
49
|
-
delta_params = GammaDistribution.
|
|
49
|
+
delta_params = GammaDistribution.get_params_by_mean_and_cv(SERVICE_TIME_DELTA_AVERAGE, SERVICE_TIME_CV)
|
|
50
50
|
b_delta = GammaDistribution.calc_theory_moments(delta_params)
|
|
51
51
|
b = GammaDistribution.calc_theory_moments(b_params)
|
|
52
52
|
|
|
@@ -4,7 +4,7 @@ Test the NetworkOptimizerWithApprox class.
|
|
|
4
4
|
|
|
5
5
|
import numpy as np
|
|
6
6
|
|
|
7
|
-
from most_queue.
|
|
7
|
+
from most_queue.random.distributions import ExpDistribution
|
|
8
8
|
from most_queue.theory.networks.open_network import OpenNetworkCalc
|
|
9
9
|
from most_queue.theory.networks.opt.transition_approx import NetworkOptimizerWithApprox
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ Test the NetworkOptimizerPlus class.
|
|
|
4
4
|
|
|
5
5
|
import numpy as np
|
|
6
6
|
|
|
7
|
-
from most_queue.
|
|
7
|
+
from most_queue.random.distributions import ExpDistribution
|
|
8
8
|
from most_queue.theory.networks.open_network import OpenNetworkCalc
|
|
9
9
|
from most_queue.theory.networks.opt.transition_plus import NetworkOptimizerPlus, Strategy
|
|
10
10
|
|
|
@@ -7,7 +7,7 @@ import math
|
|
|
7
7
|
|
|
8
8
|
import matplotlib.pyplot as plt
|
|
9
9
|
|
|
10
|
-
from most_queue.
|
|
10
|
+
from most_queue.io.tables import probs_print, times_print
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
def print_table(experiments_stat):
|
|
@@ -24,10 +24,10 @@ def print_table(experiments_stat):
|
|
|
24
24
|
print(f"Utilization factor: {stat['ro']:0.2f}")
|
|
25
25
|
# Service time coefficients of variation
|
|
26
26
|
coeff_variants = [
|
|
27
|
-
("Service", stat["
|
|
28
|
-
("Warm-up", stat["
|
|
29
|
-
("Cooling", stat["
|
|
30
|
-
("Cooling delay", stat["
|
|
27
|
+
("Service", stat["cv_service"]),
|
|
28
|
+
("Warm-up", stat["cv_warm"]),
|
|
29
|
+
("Cooling", stat["cv_cold"]),
|
|
30
|
+
("Cooling delay", stat["cv_cold_delay"]),
|
|
31
31
|
]
|
|
32
32
|
|
|
33
33
|
for label, value in coeff_variants:
|
|
@@ -111,7 +111,7 @@ def make_plot(experiments_stat, w_moments_num=0, param_name="ro", mode="error",
|
|
|
111
111
|
|
|
112
112
|
if param_name == "ro":
|
|
113
113
|
ax.set_xlabel(r"$\rho$")
|
|
114
|
-
elif param_name == "
|
|
114
|
+
elif param_name == "cv":
|
|
115
115
|
ax.set_xlabel(r"$\nu$")
|
|
116
116
|
elif param_name == "n":
|
|
117
117
|
ax.set_xlabel("n")
|
|
File without changes
|