most-queue 1.58__tar.gz → 1.60__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.
- {most_queue-1.58 → most_queue-1.60}/PKG-INFO +2 -1
- {most_queue-1.58 → most_queue-1.60}/most_queue/general/plots.py +3 -3
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/fifo/mgn_takahasi.py +17 -12
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/negative/mgn_disaster.py +71 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/negative/mgn_rcs.py +72 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/vacations/mgn_with_h2_delay_cold_warm.py +33 -1
- {most_queue-1.58 → most_queue-1.60}/pyproject.toml +3 -2
- most_queue-1.60/requirements.txt +169 -0
- {most_queue-1.58 → most_queue-1.60}/setup.py +2 -1
- most_queue-1.60/tests/cold_warm_delay_params.yaml +52 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_mgn_rcs.py +3 -5
- most_queue-1.60/tests/test_mgn_with_h2_delay_cold_warm_one_shot.py +171 -0
- most_queue-1.60/works/vacations/base_parameters.yaml +52 -0
- most_queue-1.58/works/vacations/run_wait_time_vs_channels.py → most_queue-1.60/works/vacations/channels.py +14 -40
- most_queue-1.58/works/vacations/run_wait_time_vs_cooling_time.py → most_queue-1.60/works/vacations/cooling.py +33 -57
- most_queue-1.58/works/vacations/run_wait_time_vs_cooling_delay.py → most_queue-1.60/works/vacations/cooling_delay.py +40 -57
- most_queue-1.60/works/vacations/main.py +60 -0
- {most_queue-1.58 → most_queue-1.60}/works/vacations/run_one_calc_vs_sim.py +19 -34
- most_queue-1.58/works/vacations/run_wait_time_vs_sevice_cv.py → most_queue-1.60/works/vacations/service.py +18 -40
- most_queue-1.60/works/vacations/utilization.py +74 -0
- {most_queue-1.58 → most_queue-1.60}/works/vacations/utils.py +35 -0
- most_queue-1.58/works/vacations/run_wait_time_vs_warmup_time.py → most_queue-1.60/works/vacations/warmup.py +31 -56
- most_queue-1.58/requirements.txt +0 -7
- most_queue-1.58/works/vacations/results/cooling/cooling_probs_vs_cool_ave.png +0 -0
- most_queue-1.58/works/vacations/results/cooling/cooling_probs_vs_cool_cv.png +0 -0
- most_queue-1.58/works/vacations/results/cooling/w1_error_vs_cool_ave.png +0 -0
- most_queue-1.58/works/vacations/results/cooling/w1_error_vs_cool_cv.png +0 -0
- most_queue-1.58/works/vacations/results/cooling/w1_vs_cool_ave.png +0 -0
- most_queue-1.58/works/vacations/results/cooling/w1_vs_cool_cv.png +0 -0
- most_queue-1.58/works/vacations/results/delay/cooling_delay_probs_vs_cool_delay_ave.png +0 -0
- most_queue-1.58/works/vacations/results/delay/cooling_delay_probs_vs_cool_delay_cv.png +0 -0
- most_queue-1.58/works/vacations/results/delay/w1_error_vs_cool_delay_ave.png +0 -0
- most_queue-1.58/works/vacations/results/delay/w1_error_vs_cool_delay_cv.png +0 -0
- most_queue-1.58/works/vacations/results/delay/w1_vs_cool_delay_ave.png +0 -0
- most_queue-1.58/works/vacations/results/delay/w1_vs_cool_delay_cv.png +0 -0
- most_queue-1.58/works/vacations/results/w1_errors_vs_channels.png +0 -0
- most_queue-1.58/works/vacations/results/w1_errors_vs_service_cv.png +0 -0
- most_queue-1.58/works/vacations/results/w1_errors_vs_utilization.png +0 -0
- most_queue-1.58/works/vacations/results/w1_vs_channels.png +0 -0
- most_queue-1.58/works/vacations/results/w1_vs_service_cv.png +0 -0
- most_queue-1.58/works/vacations/results/w1_vs_utilization.png +0 -0
- most_queue-1.58/works/vacations/results/warmup/w1_error_vs_warmup_ave.png +0 -0
- most_queue-1.58/works/vacations/results/warmup/w1_error_vs_warmup_cv.png +0 -0
- most_queue-1.58/works/vacations/results/warmup/w1_vs_warmup_ave.png +0 -0
- most_queue-1.58/works/vacations/results/warmup/w1_vs_warmup_cv.png +0 -0
- most_queue-1.58/works/vacations/results/warmup/warmup_probs_vs_warmup_ave.png +0 -0
- most_queue-1.58/works/vacations/results/warmup/warmup_probs_vs_warmup_cv.png +0 -0
- most_queue-1.58/works/vacations/run_wait_time_vs_utilization.py +0 -97
- {most_queue-1.58 → most_queue-1.60}/.gitignore +0 -0
- {most_queue-1.58 → most_queue-1.60}/LICENSE +0 -0
- {most_queue-1.58 → most_queue-1.60}/README.md +0 -0
- {most_queue-1.58 → most_queue-1.60}/assets/queue_long.png +0 -0
- {most_queue-1.58 → most_queue-1.60}/deploy.txt +0 -0
- {most_queue-1.58 → most_queue-1.60}/docs/Makefile +0 -0
- {most_queue-1.58 → most_queue-1.60}/docs/make.bat +0 -0
- {most_queue-1.58 → most_queue-1.60}/docs/source/conf.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/docs/source/index.rst +0 -0
- {most_queue-1.58 → most_queue-1.60}/docs/source/modules.rst +0 -0
- {most_queue-1.58 → most_queue-1.60}/docs/source/most_queue.rst +0 -0
- {most_queue-1.58 → most_queue-1.60}/docs/source/most_queue.sim.rst +0 -0
- {most_queue-1.58 → most_queue-1.60}/docs/source/most_queue.theory.rst +0 -0
- {most_queue-1.58 → most_queue-1.60}/googleb31d3dccb40f969f.html +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/general/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/general/distribution_params.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/general/interfaces.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/general/tables.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/misc/approx_cdf_make.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/misc/calc_v_pls.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/misc/compare_fj_calc.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/misc/flow_sum.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/misc/test_weibull.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/misc/vacations_paper_utils.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/rand_distribution.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/base.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/batch.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/finite_source.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/flow_sum.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/fork_join.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/fork_join_delta.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/impatient.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/negative.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/networks/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/networks/priority_network.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/priority.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/utils/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/utils/distribution_utils.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/utils/exceptions.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/utils/phase.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/utils/qs_queue.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/utils/servers.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/utils/stats_update.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/utils/tasks.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/sim/vacations.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/batch/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/batch/mm1.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/closed/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/closed/engset.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/fifo/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/fifo/ek_d_n.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/fifo/gi_m_1.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/fifo/gi_m_n.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/fifo/m_d_n.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/fifo/mg1.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/fifo/mmnr.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/fork_join/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/fork_join/m_m_n.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/fork_join/split_join.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/impatience/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/impatience/mm1.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/negative/mg1_disasters.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/negative/mg1_rcs.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/negative/structs.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/networks/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/networks/network_viewer.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/networks/open_network.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/priority/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/priority/mgn_invar_approx.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/priority/non_preemptive/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/priority/non_preemptive/mg1.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/priority/preemptive/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/priority/preemptive/m_ph_n_busy_approx.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/priority/preemptive/mg1.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/priority/preemptive/mmn_2cls_pr_busy_approx.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/priority/preemptive/mmn_3cls_busy_approx.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/r_example.gexf +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/binom_probs.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/busy_periods.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/conditional.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/conv.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/diff5dots.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/flow_sum.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/passage_time.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/q_poisson_arrival_calc.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/student_stat.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/transforms.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/utils/weibull.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/vacations/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/vacations/m_h2_h2warm.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/vacations/mg1_warm_calc.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/most_queue/theory/vacations/mmn_with_h2_cold_and_h2_warmup.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_base_qs_sim.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_batch.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_ek_d_n.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_engset.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_fj_delta.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_fj_im.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_gi_m_1_calc.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_gi_m_n_calc.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_impatience.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_m_d_n_calc.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_m_h2_h2warm.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_m_ph_n_prty.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_mg1_calc.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_mg1_disaster.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_mg1_rcs.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_mg1_warmup.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_mgn_disaster.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_mgn_tt.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_mgn_with_h2_delay_cold_warm.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_mmn3_pnz_cox_approx.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_mmn_h2cold_h2warm.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_mmn_prty_pnz_approx.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_network_im_prty.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_qs_sim.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/test_qs_sim_prty.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/units/h2_params_cv_greater_than_exp.png +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/units/h2_params_cv_less_than_exp.png +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/units/test_busy_moments_calc.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/units/test_conditionals.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/units/test_h2_params_cv.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tests/units/test_queue_types.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/tutorials/m_h2_h2warm.ipynb +0 -0
- {most_queue-1.58 → most_queue-1.60}/tutorials/mgn_takahasi_takami.ipynb +0 -0
- {most_queue-1.58 → most_queue-1.60}/tutorials/network_with_priorities.ipynb +0 -0
- {most_queue-1.58 → most_queue-1.60}/tutorials/priority_queue.ipynb +0 -0
- {most_queue-1.58 → most_queue-1.60}/tutorials/queue_sim.ipynb +0 -0
- {most_queue-1.58 → most_queue-1.60}/works/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/works/negative_queues/__init__.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/works/negative_queues/work_mgn_disasters.py +0 -0
- {most_queue-1.58 → most_queue-1.60}/works/negative_queues/work_mgn_rcs.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: most_queue
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.60
|
|
4
4
|
Summary: Software package for calculation and simulation of queuing systems
|
|
5
5
|
Project-URL: Homepage, https://github.com/xabarov/most-queue
|
|
6
6
|
Author-email: Xabarov Roman <xabarov1985@gmail.com>
|
|
@@ -34,6 +34,7 @@ Requires-Dist: matplotlib
|
|
|
34
34
|
Requires-Dist: networkx
|
|
35
35
|
Requires-Dist: numpy
|
|
36
36
|
Requires-Dist: pandas
|
|
37
|
+
Requires-Dist: pyyaml
|
|
37
38
|
Requires-Dist: scipy==1.13.0
|
|
38
39
|
Requires-Dist: tqdm
|
|
39
40
|
Description-Content-Type: text/markdown
|
|
@@ -42,11 +42,11 @@ def plot_sim_vs_calc_moments(xs: list[float], sim_results: list[float],
|
|
|
42
42
|
errors = [100 * (w_sim - w_tt) / w_tt for w_sim,
|
|
43
43
|
w_tt in zip(sim_results, calc_results)]
|
|
44
44
|
|
|
45
|
-
ax.plot(xs, errors)
|
|
45
|
+
ax.plot(xs, errors, color='black')
|
|
46
46
|
ax.set_ylabel(r"$\varepsilon$, %")
|
|
47
47
|
else:
|
|
48
|
-
ax.plot(xs, sim_results, label="Sim")
|
|
49
|
-
ax.plot(xs, calc_results, label="Calc")
|
|
48
|
+
ax.plot(xs, sim_results, label="Sim", color='black', linestyle='--')
|
|
49
|
+
ax.plot(xs, calc_results, label="Calc", color='black')
|
|
50
50
|
if is_waiting_time:
|
|
51
51
|
ax.set_ylabel(r"$\omega_{1}$")
|
|
52
52
|
else:
|
|
@@ -68,6 +68,10 @@ class MGnCalc:
|
|
|
68
68
|
self.D = []
|
|
69
69
|
self.Y = []
|
|
70
70
|
|
|
71
|
+
self.big_g = []
|
|
72
|
+
self.big_ag = []
|
|
73
|
+
self.big_bg = []
|
|
74
|
+
|
|
71
75
|
self.w = None
|
|
72
76
|
|
|
73
77
|
def _fill_cols(self):
|
|
@@ -109,13 +113,13 @@ class MGnCalc:
|
|
|
109
113
|
for j in range(1, self.N): # for all levels except the first.
|
|
110
114
|
|
|
111
115
|
# b':
|
|
112
|
-
self.b1[j] = np.dot(self.t[j - 1], self.
|
|
116
|
+
self.b1[j] = np.dot(self.t[j - 1], self.big_ag[j])
|
|
113
117
|
|
|
114
118
|
# b":
|
|
115
119
|
if j != (self.N - 1):
|
|
116
|
-
self.b2[j] = np.dot(self.t[j + 1], self.
|
|
120
|
+
self.b2[j] = np.dot(self.t[j + 1], self.big_bg[j])
|
|
117
121
|
else:
|
|
118
|
-
self.b2[j] = np.dot(self.t[j - 1], self.
|
|
122
|
+
self.b2[j] = np.dot(self.t[j - 1], self.big_bg[j])
|
|
119
123
|
|
|
120
124
|
c = self._calculate_c(j)
|
|
121
125
|
|
|
@@ -128,7 +132,7 @@ class MGnCalc:
|
|
|
128
132
|
|
|
129
133
|
if self.R and j == (self.N - 1):
|
|
130
134
|
tA = np.dot(self.t[j - 1], self.A[j - 1])
|
|
131
|
-
tag = np.dot(tA, self.
|
|
135
|
+
tag = np.dot(tA, self.big_g[j])
|
|
132
136
|
tag_sum = 0
|
|
133
137
|
for t_i in range(tag.shape[1]):
|
|
134
138
|
tag_sum += tag[0, t_i]
|
|
@@ -142,7 +146,8 @@ class MGnCalc:
|
|
|
142
146
|
|
|
143
147
|
self.x[0] = (1.0 + 0.0j) / self.z[1]
|
|
144
148
|
|
|
145
|
-
self.t[0] = self.x[0]*
|
|
149
|
+
self.t[0] = self.x[0] * \
|
|
150
|
+
(np.dot(self.t[1], self.B[1]).dot(self.big_g[0]))
|
|
146
151
|
|
|
147
152
|
x_max1 = np.max(self.x)
|
|
148
153
|
|
|
@@ -268,22 +273,22 @@ class MGnCalc:
|
|
|
268
273
|
self.D.append(self._build_big_d_matrix(i))
|
|
269
274
|
|
|
270
275
|
def _calc_g_matrices(self):
|
|
271
|
-
self.
|
|
276
|
+
self.big_g = []
|
|
272
277
|
for j in range(0, self.N):
|
|
273
|
-
self.
|
|
278
|
+
self.big_g.append(np.linalg.inv(self.D[j] - self.C[j]))
|
|
274
279
|
|
|
275
280
|
def _calc_ag_matrices(self):
|
|
276
|
-
self.
|
|
281
|
+
self.big_ag = [0]
|
|
277
282
|
for j in range(1, self.N):
|
|
278
|
-
self.
|
|
283
|
+
self.big_ag.append(np.dot(self.A[j - 1], self.big_g[j]))
|
|
279
284
|
|
|
280
285
|
def _calc_bg_matrices(self):
|
|
281
|
-
self.
|
|
286
|
+
self.big_bg = [0]
|
|
282
287
|
for j in range(1, self.N):
|
|
283
288
|
if j != (self.N - 1):
|
|
284
|
-
self.
|
|
289
|
+
self.big_bg.append(np.dot(self.B[j + 1], self.big_g[j]))
|
|
285
290
|
else:
|
|
286
|
-
self.
|
|
291
|
+
self.big_bg.append(np.dot(self.B[j], self.big_g[j]))
|
|
287
292
|
|
|
288
293
|
def _calc_support_matrices(self):
|
|
289
294
|
self._calc_g_matrices()
|
|
@@ -340,3 +340,74 @@ class MGnNegativeDisasterCalc(MGnCalc):
|
|
|
340
340
|
v_broken = self.get_v_broken()
|
|
341
341
|
w = self.get_w()
|
|
342
342
|
return NegativeArrivalsResults(p=p, v=v, v_served=v_served, v_broken=v_broken, w=w)
|
|
343
|
+
|
|
344
|
+
def run(self):
|
|
345
|
+
"""
|
|
346
|
+
Run the algorithm.
|
|
347
|
+
"""
|
|
348
|
+
|
|
349
|
+
self._fill_cols()
|
|
350
|
+
self._fill_t_b()
|
|
351
|
+
self._build_matrices()
|
|
352
|
+
self._initial_probabilities()
|
|
353
|
+
|
|
354
|
+
self.b1[0][0, 0] = 0.0 + 0.0j
|
|
355
|
+
self.b2[0][0, 0] = 0.0 + 0.0j
|
|
356
|
+
x_max1 = np.max(self.x)
|
|
357
|
+
x_max2 = 0.0 + 0.0j
|
|
358
|
+
|
|
359
|
+
self._calc_support_matrices()
|
|
360
|
+
|
|
361
|
+
self.num_of_iter_ = 0 # number of iterations
|
|
362
|
+
|
|
363
|
+
while np.fabs(x_max2.real - x_max1.real) >= self.e1:
|
|
364
|
+
x_max2 = x_max1
|
|
365
|
+
self.num_of_iter_ += 1
|
|
366
|
+
|
|
367
|
+
for j in range(1, self.N): # for all levels except the first.
|
|
368
|
+
|
|
369
|
+
# b':
|
|
370
|
+
self.b1[j] = np.dot(self.t[j - 1], self.big_ag[j])
|
|
371
|
+
|
|
372
|
+
# b":
|
|
373
|
+
if j != (self.N - 1):
|
|
374
|
+
self.b2[j] = np.dot(self.t[j + 1], self.big_bg[j])
|
|
375
|
+
else:
|
|
376
|
+
self.b2[j] = np.dot(self.t[j - 1], self.big_bg[j])
|
|
377
|
+
|
|
378
|
+
c = self._calculate_c(j)
|
|
379
|
+
|
|
380
|
+
x_znam = np.dot(c, self.b1[j]) + self.b2[j]
|
|
381
|
+
self.x[j] = 0.0 + 0.0j
|
|
382
|
+
for k in range(x_znam.shape[1]):
|
|
383
|
+
self.x[j] += x_znam[0, k]
|
|
384
|
+
|
|
385
|
+
self.x[j] = (1.0 + 0.0j) / self.x[j]
|
|
386
|
+
|
|
387
|
+
if self.R and j == (self.N - 1):
|
|
388
|
+
tA = np.dot(self.t[j - 1], self.A[j - 1])
|
|
389
|
+
tag = np.dot(tA, self.big_g[j])
|
|
390
|
+
tag_sum = 0
|
|
391
|
+
for t_i in range(tag.shape[1]):
|
|
392
|
+
tag_sum += tag[0, t_i]
|
|
393
|
+
self.z[j] = 1.0 / tag_sum
|
|
394
|
+
self.t[j] = self.z[j] * tag
|
|
395
|
+
|
|
396
|
+
else:
|
|
397
|
+
self.z[j] = np.dot(c, self.x[j])
|
|
398
|
+
self.t[j] = np.dot(self.z[j], self.b1[j]) + \
|
|
399
|
+
np.dot(self.x[j], self.b2[j])
|
|
400
|
+
|
|
401
|
+
self.x[0] = (1.0 + 0.0j) / self.z[1]
|
|
402
|
+
|
|
403
|
+
# Why ????
|
|
404
|
+
self.t[0] = self.x[0] * \
|
|
405
|
+
(np.dot(self.t[1], self.B[1]).dot(self.big_g[0]))
|
|
406
|
+
|
|
407
|
+
x_max1 = np.max(self.x)
|
|
408
|
+
|
|
409
|
+
if self.verbose:
|
|
410
|
+
print(f"End iter # {self.num_of_iter_}")
|
|
411
|
+
|
|
412
|
+
self._calculate_p()
|
|
413
|
+
self._calculate_y()
|
|
@@ -4,6 +4,7 @@ Calculate M/H2/n queue with negative jobs with RCS discipline,
|
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
import numpy as np
|
|
7
|
+
import math
|
|
7
8
|
|
|
8
9
|
from most_queue.rand_distribution import H2Distribution, H2Params
|
|
9
10
|
from most_queue.theory.fifo.mgn_takahasi import MGnCalc
|
|
@@ -206,3 +207,74 @@ class MGnNegativeRCSCalc(MGnCalc):
|
|
|
206
207
|
(num - i) * self.mu[0] + i * self.mu[1]
|
|
207
208
|
|
|
208
209
|
return output
|
|
210
|
+
|
|
211
|
+
def run(self):
|
|
212
|
+
"""
|
|
213
|
+
Run the algorithm.
|
|
214
|
+
"""
|
|
215
|
+
|
|
216
|
+
self._fill_cols()
|
|
217
|
+
self._fill_t_b()
|
|
218
|
+
self._build_matrices()
|
|
219
|
+
self._initial_probabilities()
|
|
220
|
+
|
|
221
|
+
self.b1[0][0, 0] = 0.0 + 0.0j
|
|
222
|
+
self.b2[0][0, 0] = 0.0 + 0.0j
|
|
223
|
+
x_max1 = np.max(self.x)
|
|
224
|
+
x_max2 = 0.0 + 0.0j
|
|
225
|
+
|
|
226
|
+
self._calc_support_matrices()
|
|
227
|
+
|
|
228
|
+
self.num_of_iter_ = 0 # number of iterations
|
|
229
|
+
|
|
230
|
+
while math.fabs(x_max2.real - x_max1.real) >= self.e1:
|
|
231
|
+
x_max2 = x_max1
|
|
232
|
+
self.num_of_iter_ += 1
|
|
233
|
+
|
|
234
|
+
for j in range(1, self.N): # for all levels except the first.
|
|
235
|
+
|
|
236
|
+
# b':
|
|
237
|
+
self.b1[j] = np.dot(self.t[j - 1], self.big_ag[j])
|
|
238
|
+
|
|
239
|
+
# b":
|
|
240
|
+
if j != (self.N - 1):
|
|
241
|
+
self.b2[j] = np.dot(self.t[j + 1], self.big_bg[j])
|
|
242
|
+
else:
|
|
243
|
+
self.b2[j] = np.dot(self.t[j - 1], self.big_bg[j])
|
|
244
|
+
|
|
245
|
+
c = self._calculate_c(j)
|
|
246
|
+
|
|
247
|
+
x_znam = np.dot(c, self.b1[j]) + self.b2[j]
|
|
248
|
+
self.x[j] = 0.0 + 0.0j
|
|
249
|
+
for k in range(x_znam.shape[1]):
|
|
250
|
+
self.x[j] += x_znam[0, k]
|
|
251
|
+
|
|
252
|
+
self.x[j] = (1.0 + 0.0j) / self.x[j]
|
|
253
|
+
|
|
254
|
+
if self.R and j == (self.N - 1):
|
|
255
|
+
tA = np.dot(self.t[j - 1], self.A[j - 1])
|
|
256
|
+
tag = np.dot(tA, self.big_g[j])
|
|
257
|
+
tag_sum = 0
|
|
258
|
+
for t_i in range(tag.shape[1]):
|
|
259
|
+
tag_sum += tag[0, t_i]
|
|
260
|
+
self.z[j] = 1.0 / tag_sum
|
|
261
|
+
self.t[j] = self.z[j] * tag
|
|
262
|
+
|
|
263
|
+
else:
|
|
264
|
+
self.z[j] = np.dot(c, self.x[j])
|
|
265
|
+
self.t[j] = np.dot(self.z[j], self.b1[j]) + \
|
|
266
|
+
np.dot(self.x[j], self.b2[j])
|
|
267
|
+
|
|
268
|
+
self.x[0] = (1.0 + 0.0j) / self.z[1]
|
|
269
|
+
|
|
270
|
+
# Why?, because t[0] = [1.0] always
|
|
271
|
+
# self.t[0] = self.x[0] * \
|
|
272
|
+
# (np.dot(self.t[1], self.B[1]).dot(self.big_g[0]))
|
|
273
|
+
|
|
274
|
+
x_max1 = np.max(self.x)
|
|
275
|
+
|
|
276
|
+
if self.verbose:
|
|
277
|
+
print(f"End iter # {self.num_of_iter_}")
|
|
278
|
+
|
|
279
|
+
self._calculate_p()
|
|
280
|
+
self._calculate_y()
|
{most_queue-1.58 → most_queue-1.60}/most_queue/theory/vacations/mgn_with_h2_delay_cold_warm.py
RENAMED
|
@@ -21,7 +21,7 @@ class MGnH2ServingColdWarmDelay:
|
|
|
21
21
|
with arbitrary coefficients of variation (>1, <=1).
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
|
-
def __init__(self, l, b, b_warm, b_cold, b_cold_delay, n, buffer=None,
|
|
24
|
+
def __init__(self, l, b, b_warm, b_cold, b_cold_delay, n, buffer=None,
|
|
25
25
|
N=150, accuracy=1e-6, dtype="c16",
|
|
26
26
|
verbose=False, stable_w_pls=False, w_pls_dt=1e-3):
|
|
27
27
|
"""
|
|
@@ -136,6 +136,38 @@ class MGnH2ServingColdWarmDelay:
|
|
|
136
136
|
self._build_matrices()
|
|
137
137
|
self._initial_probabilities()
|
|
138
138
|
|
|
139
|
+
def get_probs_of_servers_busy(self):
|
|
140
|
+
"""
|
|
141
|
+
Return probabilities of servers being busy.
|
|
142
|
+
prob[i] - probability that i number of servers is busy.
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
probs = np.zeros((self.n + 1), dtype=self.dt)
|
|
146
|
+
|
|
147
|
+
# servers are not busy, when system in [0,0] state, in cooling, and warming up states.
|
|
148
|
+
|
|
149
|
+
probs[0] += self.Y[0][0, 0] + self.Y[0][0, 3] + self.Y[0][0, 4]
|
|
150
|
+
|
|
151
|
+
# when cooling delay, 1 server is running
|
|
152
|
+
|
|
153
|
+
probs[1] += self.Y[0][0, 1] + self.Y[0][0, 2]
|
|
154
|
+
|
|
155
|
+
for k in range(1, self.n):
|
|
156
|
+
probs[k] += np.sum(self.Y[k][0, 2:k+3])
|
|
157
|
+
|
|
158
|
+
for k in range(1, self.N):
|
|
159
|
+
# warm-ups
|
|
160
|
+
for i in range(2):
|
|
161
|
+
probs[0] += self.Y[k][0, i]
|
|
162
|
+
|
|
163
|
+
# coolings
|
|
164
|
+
probs[0] += self.Y[k][0, -1] + self.Y[k][0, -2]
|
|
165
|
+
|
|
166
|
+
probs[-1] = 1.0 - np.sum(probs)
|
|
167
|
+
probs = probs.tolist()
|
|
168
|
+
return [prob.real for prob in probs]
|
|
169
|
+
|
|
170
|
+
|
|
139
171
|
def run(self):
|
|
140
172
|
"""
|
|
141
173
|
Запускает расчет
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "most_queue"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.60"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Xabarov Roman", email="xabarov1985@gmail.com" },
|
|
10
10
|
]
|
|
@@ -25,7 +25,8 @@ dependencies = [
|
|
|
25
25
|
"scipy==1.13.0",
|
|
26
26
|
"tqdm",
|
|
27
27
|
"graphviz",
|
|
28
|
-
"networkx"
|
|
28
|
+
"networkx",
|
|
29
|
+
"pyyaml",
|
|
29
30
|
]
|
|
30
31
|
[project.urls]
|
|
31
32
|
"Homepage" = "https://github.com/xabarov/most-queue"
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
accessible-pygments==0.0.5
|
|
2
|
+
alabaster==1.0.0
|
|
3
|
+
anyio==4.9.0
|
|
4
|
+
argon2-cffi==23.1.0
|
|
5
|
+
argon2-cffi-bindings==21.2.0
|
|
6
|
+
arrow==1.3.0
|
|
7
|
+
asttokens==3.0.0
|
|
8
|
+
async-lru==2.0.5
|
|
9
|
+
attrs==25.3.0
|
|
10
|
+
autodocsumm==0.2.14
|
|
11
|
+
babel==2.17.0
|
|
12
|
+
beautifulsoup4==4.13.4
|
|
13
|
+
bleach==6.2.0
|
|
14
|
+
build==1.2.2.post1
|
|
15
|
+
certifi==2025.1.31
|
|
16
|
+
cffi==1.17.1
|
|
17
|
+
charset-normalizer==3.4.1
|
|
18
|
+
click==8.1.8
|
|
19
|
+
colorama==0.4.6
|
|
20
|
+
comm==0.2.2
|
|
21
|
+
contourpy==1.3.2
|
|
22
|
+
cryptography==44.0.2
|
|
23
|
+
cycler==0.12.1
|
|
24
|
+
debugpy==1.8.14
|
|
25
|
+
decorator==5.2.1
|
|
26
|
+
defusedxml==0.7.1
|
|
27
|
+
distlib==0.3.9
|
|
28
|
+
docutils==0.21.2
|
|
29
|
+
executing==2.2.0
|
|
30
|
+
fastjsonschema==2.21.1
|
|
31
|
+
filelock==3.18.0
|
|
32
|
+
fonttools==4.57.0
|
|
33
|
+
fqdn==1.5.1
|
|
34
|
+
graphviz==0.20.3
|
|
35
|
+
h11==0.14.0
|
|
36
|
+
hatch==1.14.1
|
|
37
|
+
hatchling==1.27.0
|
|
38
|
+
httpcore==1.0.8
|
|
39
|
+
httpx==0.28.1
|
|
40
|
+
hyperlink==21.0.0
|
|
41
|
+
id==1.5.0
|
|
42
|
+
idna==3.10
|
|
43
|
+
imagesize==1.4.1
|
|
44
|
+
iniconfig==2.1.0
|
|
45
|
+
ipykernel==6.29.5
|
|
46
|
+
ipython==9.1.0
|
|
47
|
+
ipython_pygments_lexers==1.1.1
|
|
48
|
+
ipywidgets==8.1.6
|
|
49
|
+
isoduration==20.11.0
|
|
50
|
+
jaraco.classes==3.4.0
|
|
51
|
+
jaraco.context==6.0.1
|
|
52
|
+
jaraco.functools==4.1.0
|
|
53
|
+
jedi==0.19.2
|
|
54
|
+
jeepney==0.9.0
|
|
55
|
+
Jinja2==3.1.6
|
|
56
|
+
json5==0.12.0
|
|
57
|
+
jsonpointer==3.0.0
|
|
58
|
+
jsonschema==4.23.0
|
|
59
|
+
jsonschema-specifications==2024.10.1
|
|
60
|
+
jupyter==1.1.1
|
|
61
|
+
jupyter-console==6.6.3
|
|
62
|
+
jupyter-events==0.12.0
|
|
63
|
+
jupyter-lsp==2.2.5
|
|
64
|
+
jupyter_client==8.6.3
|
|
65
|
+
jupyter_core==5.7.2
|
|
66
|
+
jupyter_server==2.15.0
|
|
67
|
+
jupyter_server_terminals==0.5.3
|
|
68
|
+
jupyterlab==4.4.0
|
|
69
|
+
jupyterlab_pygments==0.3.0
|
|
70
|
+
jupyterlab_server==2.27.3
|
|
71
|
+
jupyterlab_widgets==3.0.14
|
|
72
|
+
keyring==25.6.0
|
|
73
|
+
kiwisolver==1.4.8
|
|
74
|
+
markdown-it-py==3.0.0
|
|
75
|
+
MarkupSafe==3.0.2
|
|
76
|
+
matplotlib==3.10.1
|
|
77
|
+
matplotlib-inline==0.1.7
|
|
78
|
+
mdurl==0.1.2
|
|
79
|
+
mistune==3.1.3
|
|
80
|
+
more-itertools==10.6.0
|
|
81
|
+
-e git+https://github.com/xabarov/most-queue@1f4278b54c746b025a324422455e129885e943e4#egg=most_queue
|
|
82
|
+
nbclient==0.10.2
|
|
83
|
+
nbconvert==7.16.6
|
|
84
|
+
nbformat==5.10.4
|
|
85
|
+
nest-asyncio==1.6.0
|
|
86
|
+
networkx==3.4.2
|
|
87
|
+
nh3==0.2.21
|
|
88
|
+
notebook==7.4.0
|
|
89
|
+
notebook_shim==0.2.4
|
|
90
|
+
numpy==2.2.5
|
|
91
|
+
overrides==7.7.0
|
|
92
|
+
packaging==25.0
|
|
93
|
+
pandas==2.2.3
|
|
94
|
+
pandocfilters==1.5.1
|
|
95
|
+
parso==0.8.4
|
|
96
|
+
pathspec==0.12.1
|
|
97
|
+
pexpect==4.9.0
|
|
98
|
+
pillow==11.2.1
|
|
99
|
+
platformdirs==4.3.7
|
|
100
|
+
pluggy==1.5.0
|
|
101
|
+
prometheus_client==0.21.1
|
|
102
|
+
prompt_toolkit==3.0.51
|
|
103
|
+
psutil==7.0.0
|
|
104
|
+
ptyprocess==0.7.0
|
|
105
|
+
pure_eval==0.2.3
|
|
106
|
+
pycparser==2.22
|
|
107
|
+
pydata-sphinx-theme==0.15.4
|
|
108
|
+
Pygments==2.19.1
|
|
109
|
+
pyparsing==3.2.3
|
|
110
|
+
pyproject_hooks==1.2.0
|
|
111
|
+
pytest==8.3.5
|
|
112
|
+
python-dateutil==2.9.0.post0
|
|
113
|
+
python-json-logger==3.3.0
|
|
114
|
+
pytz==2025.2
|
|
115
|
+
PyYAML==6.0.2
|
|
116
|
+
pyzmq==26.4.0
|
|
117
|
+
readme_renderer==44.0
|
|
118
|
+
referencing==0.36.2
|
|
119
|
+
requests==2.32.3
|
|
120
|
+
requests-toolbelt==1.0.0
|
|
121
|
+
rfc3339-validator==0.1.4
|
|
122
|
+
rfc3986==2.0.0
|
|
123
|
+
rfc3986-validator==0.1.1
|
|
124
|
+
rich==14.0.0
|
|
125
|
+
roman-numerals-py==3.1.0
|
|
126
|
+
rpds-py==0.24.0
|
|
127
|
+
scipy==1.13.0
|
|
128
|
+
SecretStorage==3.3.3
|
|
129
|
+
Send2Trash==1.8.3
|
|
130
|
+
setuptools==79.0.0
|
|
131
|
+
shellingham==1.5.4
|
|
132
|
+
six==1.17.0
|
|
133
|
+
sniffio==1.3.1
|
|
134
|
+
snowballstemmer==2.2.0
|
|
135
|
+
soupsieve==2.7
|
|
136
|
+
Sphinx==8.2.3
|
|
137
|
+
sphinx-book-theme==1.1.4
|
|
138
|
+
sphinx-rtd-theme==3.0.2
|
|
139
|
+
sphinxcontrib-applehelp==2.0.0
|
|
140
|
+
sphinxcontrib-devhelp==2.0.0
|
|
141
|
+
sphinxcontrib-htmlhelp==2.1.0
|
|
142
|
+
sphinxcontrib-jquery==4.1
|
|
143
|
+
sphinxcontrib-jsmath==1.0.1
|
|
144
|
+
sphinxcontrib-qthelp==2.0.0
|
|
145
|
+
sphinxcontrib-serializinghtml==2.0.0
|
|
146
|
+
stack-data==0.6.3
|
|
147
|
+
terminado==0.18.1
|
|
148
|
+
tinycss2==1.4.0
|
|
149
|
+
tomli_w==1.2.0
|
|
150
|
+
tomlkit==0.13.2
|
|
151
|
+
tornado==6.4.2
|
|
152
|
+
tqdm==4.67.1
|
|
153
|
+
traitlets==5.14.3
|
|
154
|
+
trove-classifiers==2025.4.11.15
|
|
155
|
+
twine==6.1.0
|
|
156
|
+
types-python-dateutil==2.9.0.20241206
|
|
157
|
+
typing_extensions==4.13.2
|
|
158
|
+
tzdata==2025.2
|
|
159
|
+
uri-template==1.3.0
|
|
160
|
+
urllib3==2.4.0
|
|
161
|
+
userpath==1.9.2
|
|
162
|
+
uv==0.6.14
|
|
163
|
+
virtualenv==20.30.0
|
|
164
|
+
wcwidth==0.2.13
|
|
165
|
+
webcolors==24.11.1
|
|
166
|
+
webencodings==0.5.1
|
|
167
|
+
websocket-client==1.8.0
|
|
168
|
+
widgetsnbextension==4.0.14
|
|
169
|
+
zstandard==0.23.0
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from setuptools import find_packages, setup
|
|
2
2
|
|
|
3
3
|
setup(name='most-queue',
|
|
4
|
-
version='1.
|
|
4
|
+
version='1.60',
|
|
5
5
|
description='Software package for calculation and simulation of queuing systems',
|
|
6
6
|
author='Xabarov Roman',
|
|
7
7
|
author_email='xabarov1985@gmail.com',
|
|
@@ -23,6 +23,7 @@ setup(name='most-queue',
|
|
|
23
23
|
"tqdm",
|
|
24
24
|
"graphviz",
|
|
25
25
|
"networkx",
|
|
26
|
+
'pyyaml',
|
|
26
27
|
],
|
|
27
28
|
include_package_data=True,
|
|
28
29
|
zip_safe=False)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
arrival_rate: 1.0
|
|
2
|
+
jobs_per_sim: 300000
|
|
3
|
+
sim_to_average: 1
|
|
4
|
+
service:
|
|
5
|
+
cv:
|
|
6
|
+
base: 1.2
|
|
7
|
+
min: 0.3
|
|
8
|
+
max: 3
|
|
9
|
+
num_points: 20
|
|
10
|
+
channels:
|
|
11
|
+
base: 3
|
|
12
|
+
min: 1
|
|
13
|
+
max: 10
|
|
14
|
+
utilization:
|
|
15
|
+
base: 0.7
|
|
16
|
+
min: 0.1
|
|
17
|
+
max: 0.9
|
|
18
|
+
num_points: 20
|
|
19
|
+
cooling:
|
|
20
|
+
cv:
|
|
21
|
+
base: 1.2
|
|
22
|
+
min: 0.3
|
|
23
|
+
max: 3
|
|
24
|
+
num_points: 20
|
|
25
|
+
mean:
|
|
26
|
+
base: 3.0
|
|
27
|
+
min: 0.1
|
|
28
|
+
max: 5
|
|
29
|
+
num_points: 20
|
|
30
|
+
delay:
|
|
31
|
+
cv:
|
|
32
|
+
base: 1.2
|
|
33
|
+
min: 0.3
|
|
34
|
+
max: 3
|
|
35
|
+
num_points: 20
|
|
36
|
+
mean:
|
|
37
|
+
base: 3.0
|
|
38
|
+
min: 0.1
|
|
39
|
+
max: 5
|
|
40
|
+
num_points: 20
|
|
41
|
+
|
|
42
|
+
warmup:
|
|
43
|
+
cv:
|
|
44
|
+
base: 1.2
|
|
45
|
+
min: 0.3
|
|
46
|
+
max: 3
|
|
47
|
+
num_points: 20
|
|
48
|
+
mean:
|
|
49
|
+
base: 3.0
|
|
50
|
+
min: 0.1
|
|
51
|
+
max: 5
|
|
52
|
+
num_points: 20
|
|
@@ -8,10 +8,10 @@ from most_queue.rand_distribution import GammaDistribution
|
|
|
8
8
|
from most_queue.sim.negative import NegativeServiceType, QsSimNegatives
|
|
9
9
|
from most_queue.theory.negative.mgn_rcs import MGnNegativeRCSCalc
|
|
10
10
|
|
|
11
|
-
ARRIVAL_RATE_NEGATIVE = 0.
|
|
11
|
+
ARRIVAL_RATE_NEGATIVE = 0.9
|
|
12
12
|
ARRIVAL_RATE_POSITIVE = 1.0
|
|
13
13
|
NUM_OF_JOBS = 300000
|
|
14
|
-
NUM_OF_CHANNELS =
|
|
14
|
+
NUM_OF_CHANNELS = 5
|
|
15
15
|
UTILIZATION = 0.7
|
|
16
16
|
SERVICE_TIME_CV = 2.1
|
|
17
17
|
|
|
@@ -29,8 +29,6 @@ def test_mgn():
|
|
|
29
29
|
b[1] = math.pow(b[0], 2) * (math.pow(SERVICE_TIME_CV, 2) + 1)
|
|
30
30
|
b[2] = b[1] * b[0] * (1.0 + 2 / alpha)
|
|
31
31
|
|
|
32
|
-
print(f'Service time moments: {b}')
|
|
33
|
-
|
|
34
32
|
# Run simulation
|
|
35
33
|
queue_sim = QsSimNegatives(
|
|
36
34
|
NUM_OF_CHANNELS, NegativeServiceType.RCS)
|
|
@@ -71,7 +69,7 @@ def test_mgn():
|
|
|
71
69
|
times_print(v_sim_broken, v_calc_broken, is_w=False,
|
|
72
70
|
header='Broken sojourn time')
|
|
73
71
|
times_print(w_sim, w_calc)
|
|
74
|
-
|
|
72
|
+
|
|
75
73
|
|
|
76
74
|
if __name__ == "__main__":
|
|
77
75
|
test_mgn()
|