most-queue 1.41__tar.gz → 1.42__tar.gz

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.

Files changed (90) hide show
  1. {most_queue-1.41 → most_queue-1.42}/PKG-INFO +1 -1
  2. {most_queue-1.41 → most_queue-1.42}/most_queue.egg-info/PKG-INFO +1 -1
  3. {most_queue-1.41 → most_queue-1.42}/most_queue.egg-info/SOURCES.txt +0 -3
  4. {most_queue-1.41 → most_queue-1.42}/pyproject.toml +1 -1
  5. {most_queue-1.41 → most_queue-1.42}/setup.py +8 -8
  6. most_queue-1.41/most_queue/compare_fj_calc.py +0 -118
  7. most_queue-1.41/most_queue/flow_sum.py +0 -98
  8. most_queue-1.41/most_queue/weibull.py +0 -36
  9. {most_queue-1.41 → most_queue-1.42}/LICENSE +0 -0
  10. {most_queue-1.41 → most_queue-1.42}/README.md +0 -0
  11. {most_queue-1.41 → most_queue-1.42}/most_queue/__init__.py +0 -0
  12. {most_queue-1.41 → most_queue-1.42}/most_queue/general_utils/__init__.py +0 -0
  13. {most_queue-1.41 → most_queue-1.42}/most_queue/general_utils/approx_cdf_make.py +0 -0
  14. {most_queue-1.41 → most_queue-1.42}/most_queue/general_utils/conv.py +0 -0
  15. {most_queue-1.41 → most_queue-1.42}/most_queue/general_utils/tables.py +0 -0
  16. {most_queue-1.41 → most_queue-1.42}/most_queue/general_utils/vacations_paper_utils.py +0 -0
  17. {most_queue-1.41 → most_queue-1.42}/most_queue/rand_distribution.py +0 -0
  18. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/__init__.py +0 -0
  19. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/batch_sim.py +0 -0
  20. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/fj_delta_sim.py +0 -0
  21. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/fj_sim.py +0 -0
  22. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/flow_sum_sim.py +0 -0
  23. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/impatient_queue_sim.py +0 -0
  24. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/priority_network.py +0 -0
  25. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/priority_queue_sim.py +0 -0
  26. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/qs_sim.py +0 -0
  27. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/queue_finite_source_sim.py +0 -0
  28. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/utils/__init__.py +0 -0
  29. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/utils/distribution_utils.py +0 -0
  30. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/utils/exceptions.py +0 -0
  31. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/utils/phase.py +0 -0
  32. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/utils/qs_queue.py +0 -0
  33. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/utils/servers.py +0 -0
  34. {most_queue-1.41 → most_queue-1.42}/most_queue/sim/utils/tasks.py +0 -0
  35. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/__init__.py +0 -0
  36. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_batch.py +0 -0
  37. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_ek_d_n.py +0 -0
  38. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_engset.py +0 -0
  39. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_fj_delta.py +0 -0
  40. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_fj_im.py +0 -0
  41. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_gi_m_1_calc.py +0 -0
  42. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_gi_m_n_calc.py +0 -0
  43. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_impatience.py +0 -0
  44. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_m_d_n_calc.py +0 -0
  45. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_m_h2_h2warm.py +0 -0
  46. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_m_ph_n_prty.py +0 -0
  47. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_mg1_calc.py +0 -0
  48. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_mgn_tt.py +0 -0
  49. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_mgn_with_h2_delay_cold_warm.py +0 -0
  50. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_mmn3_pnz_cox_approx.py +0 -0
  51. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_mmn_h2cold_h2warm.py +0 -0
  52. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_mmn_prty_pnz_approx.py +0 -0
  53. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_network_im_prty.py +0 -0
  54. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_qs_sim_prty.py +0 -0
  55. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_qs_sim_test.py +0 -0
  56. {most_queue-1.41 → most_queue-1.42}/most_queue/tests/test_queue_types.py +0 -0
  57. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/__init__.py +0 -0
  58. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/batch_mm1.py +0 -0
  59. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/ek_d_n_calc.py +0 -0
  60. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/engset_model.py +0 -0
  61. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/fj_calc.py +0 -0
  62. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/gi_m_1_calc.py +0 -0
  63. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/gi_m_n_calc.py +0 -0
  64. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/impatience_calc.py +0 -0
  65. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/m_d_n_calc.py +0 -0
  66. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/m_h2_h2warm.py +0 -0
  67. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/m_ph_n_prty.py +0 -0
  68. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/mg1_calc.py +0 -0
  69. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/mg1_warm_calc.py +0 -0
  70. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/mgn_tt.py +0 -0
  71. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/mgn_with_h2_delay_cold_warm.py +0 -0
  72. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/mmn3_pnz_cox_approx.py +0 -0
  73. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/mmn_prty_pnz_approx.py +0 -0
  74. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/mmn_with_h2_cold_and_h2_warmup.py +0 -0
  75. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/mmnr_calc.py +0 -0
  76. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/network_calc.py +0 -0
  77. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/network_viewer.py +0 -0
  78. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/priority_calc.py +0 -0
  79. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/utils/__init__.py +0 -0
  80. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/utils/binom_probs.py +0 -0
  81. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/utils/diff5dots.py +0 -0
  82. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/utils/flow_sum.py +0 -0
  83. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/utils/passage_time.py +0 -0
  84. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/utils/q_poisson_arrival_calc.py +0 -0
  85. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/utils/student_stat.py +0 -0
  86. {most_queue-1.41 → most_queue-1.42}/most_queue/theory/utils/weibull.py +0 -0
  87. {most_queue-1.41 → most_queue-1.42}/most_queue.egg-info/dependency_links.txt +0 -0
  88. {most_queue-1.41 → most_queue-1.42}/most_queue.egg-info/not-zip-safe +0 -0
  89. {most_queue-1.41 → most_queue-1.42}/most_queue.egg-info/top_level.txt +0 -0
  90. {most_queue-1.41 → most_queue-1.42}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: most_queue
3
- Version: 1.41
3
+ Version: 1.42
4
4
  Summary: Software package for calculation and simulation of queuing systems
5
5
  Home-page: https://github.com/xabarov/most-queue
6
6
  Author: Xabarov Roman
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: most_queue
3
- Version: 1.41
3
+ Version: 1.42
4
4
  Summary: Software package for calculation and simulation of queuing systems
5
5
  Home-page: https://github.com/xabarov/most-queue
6
6
  Author: Xabarov Roman
@@ -3,10 +3,7 @@ README.md
3
3
  pyproject.toml
4
4
  setup.py
5
5
  most_queue/__init__.py
6
- most_queue/compare_fj_calc.py
7
- most_queue/flow_sum.py
8
6
  most_queue/rand_distribution.py
9
- most_queue/weibull.py
10
7
  most_queue.egg-info/PKG-INFO
11
8
  most_queue.egg-info/SOURCES.txt
12
9
  most_queue.egg-info/dependency_links.txt
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "most_queue"
3
- version = "1.41"
3
+ version = "1.42"
4
4
  authors = [
5
5
  { name="Xabarov Roman", email="xabarov1985@gmail.com" },
6
6
  ]
@@ -1,8 +1,8 @@
1
1
  from setuptools import setup, find_packages
2
2
 
3
3
  setup(name='most-queue',
4
- version='1.41',
5
- description="Software package for calculation and simulation of queuing systems",
4
+ version='1.42',
5
+ description='Software package for calculation and simulation of queuing systems',
6
6
  author='Xabarov Roman',
7
7
  author_email='xabarov1985@gmail.com',
8
8
  url='https://github.com/xabarov/most-queue',
@@ -15,12 +15,12 @@ setup(name='most-queue',
15
15
  license='MIT',
16
16
  packages=find_packages(),
17
17
  install_requires=[
18
- "matplotlib",
19
- "numpy",
20
- "pandas",
21
- "scipy",
22
- "tqdm",
23
- "colorama"
18
+ 'matplotlib',
19
+ 'numpy',
20
+ 'pandas',
21
+ 'scipy',
22
+ 'tqdm',
23
+ 'colorama'
24
24
  ],
25
25
  include_package_data=True,
26
26
  zip_safe=False)
@@ -1,118 +0,0 @@
1
- from theory.fj_calc import get_v1_fj_varki_merchant, get_v1_fj_nelson_tantawi, get_v1_fj_varma
2
- from sim.fj_sim import ForkJoinSim
3
- import matplotlib.pyplot as plt
4
-
5
- import matplotlib
6
- matplotlib.use('TkAgg')
7
-
8
-
9
- def test_fj_calc():
10
- """
11
- Тестирование аппроксимаций для системы Fork-Join
12
- В пакете theory.fj_calc модержатся следующие методы:
13
-
14
- get_v1_fj_nelson_tantawi - R. D. Nelson and A. N. Tantawi, “Approximate analysis of fork/join
15
- synchronization in parallel queues.” IEEE Trans. Computers, vol. 37, no. 6, pp. 739–743, 1988.
16
-
17
- get_v1_fj_varma - S. Varma and A. M. Makowski, “Interpolation approximations for
18
- symmetric fork-join queues.” Perform. Eval., vol. 20, no. 1, pp. 245–265, 1994.
19
-
20
- get_v1_fj_varki_merchant - E. Varki, “Response time analysis of parallel computer and storage
21
- systems.” IEEE Trans. Parallel Distrib. Syst., 2001.
22
-
23
- Для верификации используем имитационное моделирование (ИМ).
24
-
25
- """
26
-
27
- ro = 0.8 # коэффициент загрузки СМО
28
- n = [x for x in range(2, 15)] # число каналов
29
- num_of_jobs = 1000000 # количество заявок для ИМ. Чем больше, тем выше точночть ИМ
30
-
31
- # интенсивность обслуживания и начальные моменты
32
- mu = 1.0
33
- b = [1 / mu, 2 / pow(mu, 2), 6 / pow(mu, 3)]
34
-
35
- l = ro / b[0] # интенсивность вх потока
36
-
37
- # массивы для накопления средних времен пребывания в СМО
38
- v_sim = []
39
- v_varma = []
40
- v_varki = []
41
- v_nelson = []
42
-
43
- str_f = "{0:^15s}|{1:^15s}|{2:^15s}|{3:^15s}"
44
- str_f_v = "\n{0:^15.3f}|{1:^15.3f}|{2:^15.3f}|{3:^15.3f}"
45
- print(str_f.format("ИМ", "Varki", "Varma", "Nelson"))
46
-
47
- for i, nn in enumerate(n):
48
- # для верификации используем ИМ.
49
- # создаем экземпляр класса ИМ, передаем число каналов обслуживания
50
- # ИМ поддерживает СМО типа Fork-Join (n, k). В нашем случае k = n
51
-
52
- qs = ForkJoinSim(nn, nn, False)
53
-
54
- # задаем входной поток. Методу нужно передать параметры распределения и тип распределения. М - экспоненциальное
55
- qs.set_sources(l, 'M')
56
-
57
- # задаем каналы обслуживания. Методу нужно передать параметры распределения и тип распределения. М - экспоненциальное
58
- qs.set_servers(mu, 'M')
59
-
60
- # запускаем ИМ
61
- qs.run(num_of_jobs)
62
-
63
- # получаем список начальных моментов времени пребывания заявок в СМО и сохраняем
64
- # в массив только среднее (первый нач момент)
65
- v = qs.v
66
- v_sim.append(v[0])
67
-
68
- # расчет средних времен пребывания с помощью аппроксимаций. \
69
- # На вход каждого из методов - l, mu, nn (число каналов СМО)
70
-
71
- v_varki.append(get_v1_fj_varki_merchant(l, mu, nn))
72
- v_varma.append(get_v1_fj_varma(l, mu, nn))
73
- v_nelson.append(get_v1_fj_nelson_tantawi(l, mu, nn))
74
-
75
- print(str_f_v.format(v_sim[i], v_varki[i], v_varma[i], v_nelson[i]))
76
-
77
- # строим графики и сохраняем в текущую директорию:
78
-
79
- fig, ax = plt.subplots()
80
-
81
- linestyles = ["solid", "dotted", "dashed", "dashdot"]
82
-
83
- ax.plot(n, v_sim, label="ИМ", linestyle=linestyles[0])
84
- ax.plot(n, v_varki, label="Varki", linestyle=linestyles[1])
85
- ax.plot(n, v_varma, label="Varma", linestyle=linestyles[2])
86
- ax.plot(n, v_nelson, label="Nelson", linestyle=linestyles[3])
87
-
88
- ax.set_ylabel("v1")
89
- ax.set_xlabel("n")
90
-
91
- plt.legend()
92
- plt.savefig("v1_from_n_with_ro = {0:^4.2f}.png".format(ro), dpi=300)
93
-
94
- # errors
95
- v_nelson_err = []
96
- v_varma_err = []
97
- v_varki_err = []
98
-
99
- for i in range(len(v_sim)):
100
- v_varma_err.append(100 * (v_varma[i] - v_sim[i]) / v_sim[i])
101
- v_varki_err.append(100 * (v_varki[i] - v_sim[i]) / v_sim[i])
102
- v_nelson_err.append(100 * (v_nelson[i] - v_sim[i]) / v_sim[i])
103
-
104
- fig, ax = plt.subplots()
105
- ax.plot(n, v_varki_err, label="Varki", linestyle=linestyles[0])
106
- ax.plot(n, v_varma_err, label="Varma", linestyle=linestyles[1])
107
- ax.plot(n, v_nelson_err, label="Nelson", linestyle=linestyles[2])
108
-
109
- ax.set_ylabel("error, %")
110
- ax.set_xlabel("n")
111
-
112
- plt.legend()
113
- plt.savefig("error_from_n_with_ro = {0:^4.2f}.png".format(ro), dpi=300)
114
-
115
-
116
- if __name__ == "__main__":
117
-
118
- test_fj_calc()
@@ -1,98 +0,0 @@
1
- import matplotlib
2
- import matplotlib.pyplot as plt
3
- from . import rand_distribution as rd
4
- from sim.flow_sum_sim import FlowSumSim
5
- from most_queue.theory.flow_sum import SummatorNumeric
6
-
7
- matplotlib.use('TkAgg')
8
-
9
-
10
- def test():
11
- """
12
- Тестирование суммирования потоков
13
- """
14
-
15
- # Задаем следующие параметры:
16
- n_nums = 10 # число суммируемых потоков
17
- coev = 0.74 # коэффициент вариации каждого потока
18
- mean = 1 # среднее каждого потока
19
- num_of_jobs = 400000 # количество заявок для ИМ
20
- is_semi = False # True, если необходимо использовать метод семиинвариантов вместо H2
21
- distr_im = "Gamma" # распределение, используемое для ИМ
22
-
23
- # число суммируемых потоков
24
- ns = [x + 2 for x in range(n_nums - 1)]
25
-
26
- # начальные моменты суммируемых потоков. В нашем случае все потоки одинаково распределены
27
- a = []
28
- for i in range(n_nums):
29
- params1 = rd.Gamma.get_mu_alpha_by_mean_and_coev(mean, coev)
30
- a1 = rd.Gamma.calc_theory_moments(*params1, 4)
31
- a.append(a1)
32
-
33
- # Численный расчет
34
- s = SummatorNumeric(a, is_semi=is_semi)
35
- s.sum_flows() # в s._flows[i][j] содержатся начальные моменты суммируемых потокоы,
36
- # i - кол-во суммируемых потоков, j - номер начального момента
37
-
38
- # ИМ
39
- s_sim = FlowSumSim(a, distr=distr_im, num_of_jobs=num_of_jobs)
40
- s_sim.sum_flows() # в s_sim._flows[i][j] содержатся начальные моменты суммируемых потокоы,
41
- # i - кол-во суммируемых потоков, j - номер начального момента
42
-
43
- # Расчет ошибок и отображение результатов
44
- coevs_sim = s_sim.coevs
45
- coevs_num = s.coevs
46
- errors1 = []
47
- errors2 = []
48
- errors_coev = []
49
-
50
- str_f = "{0:^18s}|{1:^10.3f}|{2:^10.3f}|{3:^10.3f}|{4:^10.3f}|{5:^10.3f}"
51
- print("{0:^18s}|{1:^10s}|{2:^10s}|{3:^10s}|{4:^10s}|{5:^10s}".format("-", "a1", "a2", "a3", "a4", "coev"))
52
- print("-" * 80)
53
-
54
- for i in range(n_nums - 1):
55
- print("{0:^80s}".format("Сумма " + str(i + 2) + " потоков"))
56
- print("-" * 80)
57
- print(str_f.format("ИМ", s_sim.flows_[i][0], s_sim.flows_[i][1], s_sim.flows_[i][2], s_sim.flows_[i][3],
58
- coevs_num[i]))
59
- print("-" * 80)
60
- print(str_f.format("Числ", s.flows_[i][0].real, s.flows_[i][1].real, s.flows_[i][2].real, s.flows_[i][3].real,
61
- coevs_sim[i]))
62
- print("-" * 80)
63
- errors1.append(SummatorNumeric.get_error(s.flows_[i][0].real, s_sim.flows_[i][0]))
64
- errors2.append(SummatorNumeric.get_error(s.flows_[i][1].real, s_sim.flows_[i][1]))
65
- errors_coev.append(SummatorNumeric.get_error(coevs_num[i], coevs_sim[i]))
66
-
67
- fig, ax = plt.subplots()
68
- linestyles = ["solid", "dotted", "dashed", "dashdot"]
69
-
70
- ax.plot(ns, s_sim.a1_sum, label="ИМ a1", linestyle=linestyles[0])
71
- ax.plot(ns, s.a1_sum, label="Числ a1", linestyle=linestyles[1])
72
-
73
- plt.legend()
74
- str_title = "Среднее сумм-х потоков, %"
75
- if is_semi:
76
- str_title += ". Метод семиинвариантов"
77
- else:
78
- str_title += ". Метод H2"
79
- plt.title(str_title)
80
- plt.show()
81
-
82
- fig, ax = plt.subplots()
83
- ax.plot(ns, errors1, label="error a1", linestyle=linestyles[0])
84
- ax.plot(ns, errors2, label="error a2", linestyle=linestyles[1])
85
- ax.plot(ns, errors_coev, label="error coev", linestyle=linestyles[2])
86
-
87
- plt.legend()
88
- str_title = "Отн. ошибка от числа сумм-х потоков, %"
89
- if is_semi:
90
- str_title += ". Метод семиинвариантов"
91
- else:
92
- str_title += ". Метод H2"
93
- plt.title(str_title)
94
- plt.show()
95
-
96
-
97
- if __name__ == "__main__":
98
- test()
@@ -1,36 +0,0 @@
1
- import numpy as np
2
- from most_queue.theory.weibull import Weibull
3
- import matplotlib.pyplot as plt
4
-
5
- import matplotlib
6
- matplotlib.use('TkAgg')
7
-
8
-
9
- def test():
10
- """
11
- Тестирование аппроксимации Вейбулла
12
- """
13
- mean = 1.0
14
- coevs = [1.0, 2.1, 3.2]
15
-
16
- fig, ax = plt.subplots()
17
-
18
- for coev in coevs:
19
- k, T = Weibull.get_params_by_mean_and_coev(mean, coev)
20
-
21
- print("Параметры распределения Вейбулла при коэфф вариации {0:1.3f}: k = {1:1.3f} T = {2:1.3f}".format(coev, k,
22
- T))
23
-
24
- t = np.linspace(0, 3 * coevs[len(coevs) - 1], 100)
25
- dfr = Weibull.get_tail([k, T], t)
26
-
27
- ax.plot(t, dfr, label="$\\nu$ = {0:1.1f}".format(coev))
28
-
29
- ax.set_xlabel('t')
30
- ax.set_ylabel('ДФР')
31
- plt.legend()
32
- plt.show()
33
-
34
-
35
- if __name__ == "__main__":
36
- test()
File without changes
File without changes
File without changes