most-queue 1.55__tar.gz → 1.57__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.55 → most_queue-1.57}/.gitignore +2 -0
- {most_queue-1.55 → most_queue-1.57}/PKG-INFO +53 -49
- {most_queue-1.55 → most_queue-1.57}/README.md +52 -48
- {most_queue-1.55 → most_queue-1.57}/most_queue/general/distribution_params.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/general/interfaces.py +0 -0
- most_queue-1.57/most_queue/general/plots.py +69 -0
- most_queue-1.57/most_queue/general/tables.py +322 -0
- {most_queue-1.55/most_queue/sim → most_queue-1.57/most_queue/misc}/__init__.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/misc/calc_v_pls.py +13 -15
- {most_queue-1.55 → most_queue-1.57}/most_queue/misc/compare_fj_calc.py +39 -35
- {most_queue-1.55/most_queue/general → most_queue-1.57/most_queue/misc}/vacations_paper_utils.py +45 -39
- {most_queue-1.55 → most_queue-1.57}/most_queue/rand_distribution.py +5 -7
- most_queue-1.55/most_queue/sim/queueing_systems/fifo.py → most_queue-1.57/most_queue/sim/base.py +379 -538
- {most_queue-1.55/most_queue/sim/queueing_systems → most_queue-1.57/most_queue/sim}/batch.py +6 -10
- {most_queue-1.55/most_queue/sim/queueing_systems → most_queue-1.57/most_queue/sim}/finite_source.py +34 -88
- {most_queue-1.55/most_queue/sim/queueing_systems → most_queue-1.57/most_queue/sim}/fork_join.py +31 -94
- {most_queue-1.55/most_queue/sim/queueing_systems → most_queue-1.57/most_queue/sim}/fork_join_delta.py +17 -14
- {most_queue-1.55/most_queue/sim/queueing_systems → most_queue-1.57/most_queue/sim}/impatient.py +23 -19
- {most_queue-1.55/most_queue/sim/queueing_systems → most_queue-1.57/most_queue/sim}/negative.py +64 -223
- {most_queue-1.55/most_queue/sim/queueing_systems → most_queue-1.57/most_queue/sim/networks}/__init__.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/sim/networks/priority_network.py +16 -11
- {most_queue-1.55/most_queue/sim/queueing_systems → most_queue-1.57/most_queue/sim}/priority.py +6 -7
- {most_queue-1.55 → most_queue-1.57}/most_queue/sim/utils/__init__.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/sim/utils/distribution_utils.py +20 -20
- {most_queue-1.55 → most_queue-1.57}/most_queue/sim/utils/exceptions.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/sim/utils/phase.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/sim/utils/qs_queue.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/sim/utils/servers.py +7 -7
- {most_queue-1.55 → most_queue-1.57}/most_queue/sim/utils/stats_update.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/sim/utils/tasks.py +34 -6
- most_queue-1.57/most_queue/sim/vacations.py +289 -0
- {most_queue-1.55/most_queue/theory/networks → most_queue-1.57/most_queue/theory/batch}/__init__.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/batch/mm1.py +2 -2
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory/closed}/__init__.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/closed/engset.py +10 -11
- {most_queue-1.55/most_queue/theory/queueing_systems/batch → most_queue-1.57/most_queue/theory/fifo}/__init__.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/fifo/gi_m_1.py +4 -4
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/fifo/gi_m_n.py +2 -2
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/fifo/mg1.py +5 -5
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/fifo/mmnr.py +2 -2
- {most_queue-1.55/most_queue/theory/queueing_systems/closed → most_queue-1.57/most_queue/theory/fork_join}/__init__.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/fork_join/m_m_n.py +12 -12
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/fork_join/split_join.py +85 -66
- {most_queue-1.55/most_queue/theory/queueing_systems/fifo → most_queue-1.57/most_queue/theory/impatience}/__init__.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/impatience/mm1.py +3 -3
- most_queue-1.57/most_queue/theory/negative/mg1_disasters.py +78 -0
- most_queue-1.57/most_queue/theory/negative/mg1_rcs.py +84 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/negative/mgn_disaster.py +60 -47
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/negative/mgn_rcs.py +29 -13
- most_queue-1.57/most_queue/theory/negative/structs.py +81 -0
- {most_queue-1.55/most_queue/theory/queueing_systems/fork_join → most_queue-1.57/most_queue/theory/networks}/__init__.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/theory/networks/open_network.py +7 -5
- {most_queue-1.55/most_queue/theory/queueing_systems/impatience → most_queue-1.57/most_queue/theory/priority}/__init__.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/priority/mgn_invar_approx.py +10 -10
- {most_queue-1.55/most_queue/theory/queueing_systems/priority → most_queue-1.57/most_queue/theory/priority/non_preemptive}/__init__.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/priority/non_preemptive/mg1.py +7 -6
- {most_queue-1.55/most_queue/theory/queueing_systems/priority/non_preemptive → most_queue-1.57/most_queue/theory/priority/preemptive}/__init__.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/priority/preemptive/m_ph_n_busy_approx.py +1 -1
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/priority/preemptive/mg1.py +4 -4
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/priority/preemptive/mmn_2cls_pr_busy_approx.py +5 -89
- {most_queue-1.55/most_queue/theory/queueing_systems/priority/preemptive → most_queue-1.57/most_queue/theory/utils}/__init__.py +0 -0
- most_queue-1.57/most_queue/theory/utils/busy_periods.py +150 -0
- {most_queue-1.55/most_queue/general → most_queue-1.57/most_queue/theory/utils}/conditional.py +29 -17
- {most_queue-1.55/most_queue/general → most_queue-1.57/most_queue/theory/utils}/conv.py +6 -1
- most_queue-1.57/most_queue/theory/utils/q_poisson_arrival_calc.py +69 -0
- most_queue-1.57/most_queue/theory/utils/transforms.py +27 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/vacations/__init__.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/vacations/m_h2_h2warm.py +2 -4
- most_queue-1.57/most_queue/theory/vacations/mg1_warm_calc.py +68 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/vacations/mgn_with_h2_delay_cold_warm.py +3 -2
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/vacations/mmn_with_h2_cold_and_h2_warmup.py +50 -62
- {most_queue-1.55 → most_queue-1.57}/pyproject.toml +1 -1
- {most_queue-1.55 → most_queue-1.57}/setup.py +1 -1
- {most_queue-1.55/most_queue/theory/utils → most_queue-1.57/tests}/__init__.py +0 -0
- most_queue-1.57/tests/test_base_qs_sim.py +75 -0
- {most_queue-1.55 → most_queue-1.57}/tests/test_batch.py +21 -14
- most_queue-1.57/tests/test_ek_d_n.py +79 -0
- most_queue-1.57/tests/test_engset.py +70 -0
- most_queue-1.57/tests/test_fj_delta.py +66 -0
- most_queue-1.57/tests/test_fj_im.py +163 -0
- {most_queue-1.55 → most_queue-1.57}/tests/test_gi_m_1_calc.py +35 -30
- {most_queue-1.55 → most_queue-1.57}/tests/test_gi_m_n_calc.py +35 -34
- most_queue-1.57/tests/test_impatience.py +47 -0
- {most_queue-1.55 → most_queue-1.57}/tests/test_m_d_n_calc.py +15 -14
- most_queue-1.57/tests/test_m_h2_h2warm.py +85 -0
- most_queue-1.57/tests/test_m_ph_n_prty.py +140 -0
- most_queue-1.57/tests/test_mg1_calc.py +104 -0
- most_queue-1.57/tests/test_mg1_disaster.py +74 -0
- most_queue-1.57/tests/test_mg1_rcs.py +71 -0
- most_queue-1.57/tests/test_mg1_warmup.py +74 -0
- most_queue-1.57/tests/test_mgn_disaster.py +72 -0
- most_queue-1.57/tests/test_mgn_rcs.py +77 -0
- {most_queue-1.55 → most_queue-1.57}/tests/test_mgn_tt.py +21 -19
- {most_queue-1.55 → most_queue-1.57}/tests/test_mgn_with_h2_delay_cold_warm.py +25 -14
- most_queue-1.57/tests/test_mmn3_pnz_cox_approx.py +104 -0
- most_queue-1.57/tests/test_mmn_h2cold_h2warm.py +110 -0
- most_queue-1.57/tests/test_mmn_prty_pnz_approx.py +84 -0
- most_queue-1.57/tests/test_network_im_prty.py +139 -0
- most_queue-1.57/tests/test_qs_sim.py +75 -0
- {most_queue-1.55 → most_queue-1.57}/tests/test_qs_sim_prty.py +35 -34
- most_queue-1.57/tests/units/h2_params_cv_greater_than_exp.png +0 -0
- most_queue-1.57/tests/units/h2_params_cv_less_than_exp.png +0 -0
- most_queue-1.57/tests/units/test_busy_moments_calc.py +42 -0
- most_queue-1.57/tests/units/test_conditionals.py +151 -0
- most_queue-1.57/tests/units/test_h2_params_cv.py +102 -0
- most_queue-1.57/tests/units/test_queue_types.py +62 -0
- most_queue-1.57/tutorials/m_h2_h2warm.ipynb +338 -0
- most_queue-1.57/tutorials/mgn_takahasi_takami.ipynb +302 -0
- most_queue-1.57/tutorials/network_with_priorities.ipynb +371 -0
- {most_queue-1.55 → most_queue-1.57}/tutorials/priority_queue.ipynb +16 -16
- most_queue-1.57/tutorials/queue_sim.ipynb +378 -0
- {most_queue-1.55/tests → most_queue-1.57/works}/__init__.py +0 -0
- most_queue-1.55/most_queue/sim/utils/qs.py → most_queue-1.57/works/negative_queues/__init__.py +0 -0
- most_queue-1.57/works/negative_queues/work_mgn_disasters.py +358 -0
- most_queue-1.57/works/negative_queues/work_mgn_rcs.py +358 -0
- most_queue-1.55/most_queue/general/tables.py +0 -237
- most_queue-1.55/most_queue/theory/queueing_systems/vacations/mg1_warm_calc.py +0 -53
- most_queue-1.55/most_queue/theory/utils/busy_periods.py +0 -64
- most_queue-1.55/most_queue/theory/utils/q_poisson_arrival_calc.py +0 -60
- most_queue-1.55/most_queue/theory/utils/transforms.py +0 -8
- most_queue-1.55/tests/n_test/ro_0.700.json +0 -1
- most_queue-1.55/tests/ro_test/n_3.json +0 -1
- most_queue-1.55/tests/test_ek_d_n.py +0 -78
- most_queue-1.55/tests/test_engset.py +0 -63
- most_queue-1.55/tests/test_fj_delta.py +0 -90
- most_queue-1.55/tests/test_fj_im.py +0 -192
- most_queue-1.55/tests/test_impatience.py +0 -46
- most_queue-1.55/tests/test_m_h2_h2warm.py +0 -85
- most_queue-1.55/tests/test_m_ph_n_prty.py +0 -138
- most_queue-1.55/tests/test_mg1_calc.py +0 -97
- most_queue-1.55/tests/test_mgn_disaster.py +0 -76
- most_queue-1.55/tests/test_mgn_rcs.py +0 -77
- most_queue-1.55/tests/test_mmn3_pnz_cox_approx.py +0 -85
- most_queue-1.55/tests/test_mmn_h2cold_h2warm.py +0 -103
- most_queue-1.55/tests/test_mmn_prty_pnz_approx.py +0 -73
- most_queue-1.55/tests/test_network_im_prty.py +0 -118
- most_queue-1.55/tests/test_qs_sim_test.py +0 -65
- most_queue-1.55/tests/test_queue_types.py +0 -55
- most_queue-1.55/tutorials/m_h2_h2warm.ipynb +0 -336
- most_queue-1.55/tutorials/mgn_takahasi_takami.ipynb +0 -298
- most_queue-1.55/tutorials/queue_sim.ipynb +0 -335
- {most_queue-1.55 → most_queue-1.57}/LICENSE +0 -0
- {most_queue-1.55 → most_queue-1.57}/assets/queue_long.png +0 -0
- {most_queue-1.55 → most_queue-1.57}/deploy.txt +0 -0
- {most_queue-1.55 → most_queue-1.57}/docs/Makefile +0 -0
- {most_queue-1.55 → most_queue-1.57}/docs/make.bat +0 -0
- {most_queue-1.55 → most_queue-1.57}/docs/source/conf.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/docs/source/index.rst +0 -0
- {most_queue-1.55 → most_queue-1.57}/docs/source/modules.rst +0 -0
- {most_queue-1.55 → most_queue-1.57}/docs/source/most_queue.rst +0 -0
- {most_queue-1.55 → most_queue-1.57}/docs/source/most_queue.sim.rst +0 -0
- {most_queue-1.55 → most_queue-1.57}/docs/source/most_queue.theory.rst +0 -0
- {most_queue-1.55 → most_queue-1.57}/googleb31d3dccb40f969f.html +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/__init__.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/general/__init__.py +0 -0
- {most_queue-1.55/most_queue/general → most_queue-1.57/most_queue/misc}/approx_cdf_make.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/misc/flow_sum.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/misc/test_weibull.py +0 -0
- {most_queue-1.55/most_queue/sim/networks → most_queue-1.57/most_queue/sim}/__init__.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/sim/flow_sum.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/theory/__init__.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/fifo/ek_d_n.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/fifo/m_d_n.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/fifo/mgn_takahasi.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/theory/networks/network_viewer.py +0 -0
- {most_queue-1.55/most_queue/theory/queueing_systems → most_queue-1.57/most_queue/theory}/priority/preemptive/mmn_3cls_busy_approx.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/theory/r_example.gexf +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/theory/utils/binom_probs.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/theory/utils/diff5dots.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/theory/utils/flow_sum.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/theory/utils/passage_time.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/theory/utils/student_stat.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/most_queue/theory/utils/weibull.py +0 -0
- {most_queue-1.55 → most_queue-1.57}/requirements.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: most_queue
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.57
|
|
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>
|
|
@@ -38,7 +38,7 @@ Requires-Dist: scipy==1.13.0
|
|
|
38
38
|
Requires-Dist: tqdm
|
|
39
39
|
Description-Content-Type: text/markdown
|
|
40
40
|
|
|
41
|
-
# Queueing Systems: Simulation & Numerical Methods
|
|
41
|
+
# Queueing Systems: Simulation & Numerical Methods 🔄
|
|
42
42
|
|
|
43
43
|

|
|
44
44
|
|
|
@@ -46,49 +46,46 @@ A Python package for simulating and analyzing queueing systems (QS) and networks
|
|
|
46
46
|
|
|
47
47
|

|
|
48
48
|
|
|
49
|
+
---
|
|
49
50
|
|
|
50
|
-
|
|
51
|
-
This repository focuses on solving steady-state problems in queueing theory.
|
|
51
|
+
### 🔍 Key Features
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
- Analyze system performance metrics such as waiting times, soujourn times, load factor and etc.
|
|
53
|
+
- **Simulation**: Model various types of queueing systems and networks.
|
|
54
|
+
- **Numerical Methods**: Solve steady-state problems in queueing theory.
|
|
55
|
+
- **Performance Metrics**: Analyze waiting times, sojourn times, load factors, and more.
|
|
57
56
|
|
|
57
|
+
---
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
- Modeling cloud computing infrastructure.
|
|
61
|
-
- Designing efficient call centers.
|
|
62
|
-
- Optimizing transportation systems.
|
|
63
|
-
- Network traffic analysis.
|
|
59
|
+
### 📌 Use Cases
|
|
64
60
|
|
|
65
|
-
|
|
66
|
-
|
|
61
|
+
- **Cloud Computing**: Model infrastructure scalability and performance.
|
|
62
|
+
- **Call Centers**: Optimize staffing and customer wait times.
|
|
63
|
+
- **Transportation**: Improve traffic flow and logistics.
|
|
64
|
+
- **Network Traffic**: Analyze and predict data flow patterns.
|
|
67
65
|
|
|
68
66
|
---
|
|
69
67
|
|
|
70
|
-
|
|
71
|
-
- install most-queue with pip
|
|
68
|
+
### 📦 Installation
|
|
72
69
|
```bash
|
|
73
70
|
pip install most-queue
|
|
74
71
|
```
|
|
72
|
+
Or install from the repository:
|
|
75
73
|
|
|
76
|
-
- install most-queue from repository
|
|
77
74
|
```bash
|
|
78
75
|
pip install -e .
|
|
79
76
|
```
|
|
80
77
|
|
|
81
78
|
---
|
|
82
79
|
|
|
83
|
-
##
|
|
80
|
+
## 📚 Project Overview
|
|
84
81
|
|
|
85
82
|
Most_queue consists of two main parts:
|
|
86
83
|
- **most_queue.theory** contains programs that implement methods for calculating queueing theory models.
|
|
87
84
|
- **most_queue.sim** contains simulation programs.
|
|
88
85
|
|
|
89
|
-
##
|
|
86
|
+
## 🧪 Example Use Cases
|
|
90
87
|
|
|
91
|
-
### FIFO
|
|
88
|
+
### FIFO Queueing Systems
|
|
92
89
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
93
90
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
94
91
|
| 1. | Ek/D/c | Numerical calculation of a multi-channel system Ek/D/n | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_ek_d_n.py) | |
|
|
@@ -100,7 +97,7 @@ Most_queue consists of two main parts:
|
|
|
100
97
|
| 7. | M/M/c/r | Solving for QS M/M/c/r | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_qs_sim_test.py) | [link](https://github.com/xabarov/most-queue/blob/main/tutorials/queue_sim.ipynb) |
|
|
101
98
|
|
|
102
99
|
|
|
103
|
-
###
|
|
100
|
+
### Queueing Systems with Priorities
|
|
104
101
|
|
|
105
102
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
106
103
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
@@ -111,21 +108,7 @@ Most_queue consists of two main parts:
|
|
|
111
108
|
| 5. | M/G/1/NP | Calculating QS with non-preemtive priorities (single-channel). | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_qs_sim_prty.py) |[link](https://github.com/xabarov/most-queue/blob/main/tutorials/priority_queue.ipynb) |
|
|
112
109
|
| 6. | M/G/c/Priority | Calculating QS with NP and PR (multi-channel) by method of relation | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_qs_sim_prty.py) |[link](https://github.com/xabarov/most-queue/blob/main/tutorials/priority_queue.ipynb) |
|
|
113
110
|
|
|
114
|
-
|
|
115
|
-
### Fork-Join QS
|
|
116
|
-
|
|
117
|
-
| # | Kendall Notations | Description | Example | Tutorial |
|
|
118
|
-
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
119
|
-
| 1. | M/M/c/Fork-Join | Solving for Fork-Join queueing system | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_fj_im.py) | |
|
|
120
|
-
| 1. | M/G/c/Split-Join | Solving for Split-Join queueing system | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_fj_im.py) | |
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
### QS with Batch Arrival
|
|
124
|
-
| # | Kendall Notations | Description | Example | Tutorial |
|
|
125
|
-
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
126
|
-
| 1. | M<sup>x</sup>/M/1 | Solving for the of M<sup>x</sup>/M/1 QS with batch arrival | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_batch.py) | |
|
|
127
|
-
|
|
128
|
-
### QS with Vacations
|
|
111
|
+
### Queueing Systems with Vacations
|
|
129
112
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
130
113
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
131
114
|
| 1. | M/H<SUB>2</SUB>/c | Numerical calculation of the M/H<SUB>2</SUB>/c system with H<SUB>2</SUB>-warming using the Takahasi-Takagi method. | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_m_h2_h2warm.py) | [link](https://github.com/xabarov/most-queue/blob/main/tutorials/m_h2_h2warm.ipynb)| |
|
|
@@ -133,35 +116,56 @@ Most_queue consists of two main parts:
|
|
|
133
116
|
| 3. | M/Ph/c | Multichannel queuing system with H<SUB>2</SUB>-serving time, H<SUB>2</SUB>-warm-up, H<SUB>2</SUB>-cold delay and H<SUB>2</SUB>-cold (vacations). The system uses complex parameters, which allows you to calculate systems with arbitrary serving, warm-up, cold-delay and cold variation coefficients | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_mgn_with_h2_delay_cold_warm.py) | |
|
|
134
117
|
| 4. | M/M/c | Multichannel queuing system with exp serving time, H<SUB>2</SUB>-warm-up and H<SUB>2</SUB>-cold (vacations). The system uses complex parameters, which allows to calculate systems with arbitrary warm-up and cold variation coefficients | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_mmn_h2cold_h2warm.py) | |
|
|
135
118
|
|
|
136
|
-
###
|
|
119
|
+
### Queueing Systems with Negative arrivals
|
|
137
120
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
138
121
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
139
|
-
| 1. | M/
|
|
122
|
+
| 1. | M/G/1 RCS | Exact calculation of sojourn time for M/G/1 with RCS (remove customer from service) negative arrivals. Service time approximates by H<SUB>2</SUB> or Gamma distribution | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_mg1_rcs.py) | |
|
|
123
|
+
| 2. | M/G/c RCS | Numerical calculation of M/G/c with RCS negative arrivals. Service time approximates by H<SUB>2</SUB> distribution | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_mgn_rcs.py) | |
|
|
124
|
+
| 3. | M/G/c disaster | Numerical calculation of M/G/c with disaster (remove all customer from service and queue by negative arrival). Service time approximates by H<SUB>2</SUB> distribution | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_mgn_disaster.py) | |
|
|
125
|
+
|
|
140
126
|
|
|
127
|
+
### Fork-Join Queueing Systems
|
|
141
128
|
|
|
142
|
-
### QS with Negative arrivals
|
|
143
129
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
144
130
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
145
|
-
| 1.
|
|
146
|
-
| 2.
|
|
131
|
+
| 1. | M/M/c/Fork-Join | Solving for Fork-Join queueing system | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_fj_im.py) | |
|
|
132
|
+
| 2. | M/G/c/Split-Join | Solving for Split-Join queueing system | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_fj_im.py) | |
|
|
147
133
|
|
|
148
134
|
|
|
149
|
-
###
|
|
135
|
+
### Others
|
|
150
136
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
151
137
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
152
|
-
| 1.
|
|
138
|
+
| 1. | M<sup>x</sup>/M/1 | Solving for the of M<sup>x</sup>/M/1 QS with batch arrival | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_batch.py) | |
|
|
139
|
+
| 2. | M/M/1/D | Solving for M/M/1 with exponential impatience | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_impatience.py) | |
|
|
140
|
+
| 3. | M/M/1/N | Solving for the Engset model for M/M/1 with a finite number of sources. | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_engset.py) | |
|
|
141
|
+
| 4. | General Network | Numerical calculation of queuing network with priorities in nodes | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_network_im_prty.py) | [link](https://github.com/xabarov/most-queue/blob/main/tutorials/network_with_priorities.ipynb) |
|
|
153
142
|
|
|
154
|
-
|
|
143
|
+
---
|
|
155
144
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
145
|
+
### 🔍 Search & Indexing Keywords
|
|
146
|
+
- Queueing theory
|
|
147
|
+
- Simulation
|
|
148
|
+
- Numerical methods
|
|
149
|
+
- Queueing networks
|
|
150
|
+
- Performance analysis
|
|
151
|
+
- Cloud computing
|
|
152
|
+
- Call center optimization
|
|
153
|
+
- Transportation systems
|
|
154
|
+
- Network traffic
|
|
155
|
+
- Python package
|
|
159
156
|
|
|
157
|
+
---
|
|
160
158
|
|
|
161
|
-
###
|
|
159
|
+
### 📁 Examples & Tutorials
|
|
162
160
|
- Look [here](https://github.com/xabarov/most-queue/tree/main/tests) for examples
|
|
163
161
|
- Look [here](https://github.com/xabarov/most-queue/tree/main/tutorials) for jupyter tutorials
|
|
164
162
|
|
|
163
|
+
---
|
|
165
164
|
|
|
165
|
+
### 👥 Contributing
|
|
166
166
|
|
|
167
|
+
Contributions are welcome!
|
|
167
168
|
|
|
169
|
+
- Open an [issue](https://github.com/xabarov/most-queue/issues) for bugs or suggestions.
|
|
170
|
+
- Submit a pull request for feature enhancements.
|
|
171
|
+
- Contact me at xabarov1985@gmail.com for questions.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Queueing Systems: Simulation & Numerical Methods
|
|
1
|
+
# Queueing Systems: Simulation & Numerical Methods 🔄
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
@@ -6,49 +6,46 @@ A Python package for simulating and analyzing queueing systems (QS) and networks
|
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
9
|
+
---
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
This repository focuses on solving steady-state problems in queueing theory.
|
|
11
|
+
### 🔍 Key Features
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
- Analyze system performance metrics such as waiting times, soujourn times, load factor and etc.
|
|
13
|
+
- **Simulation**: Model various types of queueing systems and networks.
|
|
14
|
+
- **Numerical Methods**: Solve steady-state problems in queueing theory.
|
|
15
|
+
- **Performance Metrics**: Analyze waiting times, sojourn times, load factors, and more.
|
|
17
16
|
|
|
17
|
+
---
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
- Modeling cloud computing infrastructure.
|
|
21
|
-
- Designing efficient call centers.
|
|
22
|
-
- Optimizing transportation systems.
|
|
23
|
-
- Network traffic analysis.
|
|
19
|
+
### 📌 Use Cases
|
|
24
20
|
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
- **Cloud Computing**: Model infrastructure scalability and performance.
|
|
22
|
+
- **Call Centers**: Optimize staffing and customer wait times.
|
|
23
|
+
- **Transportation**: Improve traffic flow and logistics.
|
|
24
|
+
- **Network Traffic**: Analyze and predict data flow patterns.
|
|
27
25
|
|
|
28
26
|
---
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
- install most-queue with pip
|
|
28
|
+
### 📦 Installation
|
|
32
29
|
```bash
|
|
33
30
|
pip install most-queue
|
|
34
31
|
```
|
|
32
|
+
Or install from the repository:
|
|
35
33
|
|
|
36
|
-
- install most-queue from repository
|
|
37
34
|
```bash
|
|
38
35
|
pip install -e .
|
|
39
36
|
```
|
|
40
37
|
|
|
41
38
|
---
|
|
42
39
|
|
|
43
|
-
##
|
|
40
|
+
## 📚 Project Overview
|
|
44
41
|
|
|
45
42
|
Most_queue consists of two main parts:
|
|
46
43
|
- **most_queue.theory** contains programs that implement methods for calculating queueing theory models.
|
|
47
44
|
- **most_queue.sim** contains simulation programs.
|
|
48
45
|
|
|
49
|
-
##
|
|
46
|
+
## 🧪 Example Use Cases
|
|
50
47
|
|
|
51
|
-
### FIFO
|
|
48
|
+
### FIFO Queueing Systems
|
|
52
49
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
53
50
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
54
51
|
| 1. | Ek/D/c | Numerical calculation of a multi-channel system Ek/D/n | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_ek_d_n.py) | |
|
|
@@ -60,7 +57,7 @@ Most_queue consists of two main parts:
|
|
|
60
57
|
| 7. | M/M/c/r | Solving for QS M/M/c/r | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_qs_sim_test.py) | [link](https://github.com/xabarov/most-queue/blob/main/tutorials/queue_sim.ipynb) |
|
|
61
58
|
|
|
62
59
|
|
|
63
|
-
###
|
|
60
|
+
### Queueing Systems with Priorities
|
|
64
61
|
|
|
65
62
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
66
63
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
@@ -71,21 +68,7 @@ Most_queue consists of two main parts:
|
|
|
71
68
|
| 5. | M/G/1/NP | Calculating QS with non-preemtive priorities (single-channel). | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_qs_sim_prty.py) |[link](https://github.com/xabarov/most-queue/blob/main/tutorials/priority_queue.ipynb) |
|
|
72
69
|
| 6. | M/G/c/Priority | Calculating QS with NP and PR (multi-channel) by method of relation | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_qs_sim_prty.py) |[link](https://github.com/xabarov/most-queue/blob/main/tutorials/priority_queue.ipynb) |
|
|
73
70
|
|
|
74
|
-
|
|
75
|
-
### Fork-Join QS
|
|
76
|
-
|
|
77
|
-
| # | Kendall Notations | Description | Example | Tutorial |
|
|
78
|
-
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
79
|
-
| 1. | M/M/c/Fork-Join | Solving for Fork-Join queueing system | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_fj_im.py) | |
|
|
80
|
-
| 1. | M/G/c/Split-Join | Solving for Split-Join queueing system | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_fj_im.py) | |
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
### QS with Batch Arrival
|
|
84
|
-
| # | Kendall Notations | Description | Example | Tutorial |
|
|
85
|
-
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
86
|
-
| 1. | M<sup>x</sup>/M/1 | Solving for the of M<sup>x</sup>/M/1 QS with batch arrival | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_batch.py) | |
|
|
87
|
-
|
|
88
|
-
### QS with Vacations
|
|
71
|
+
### Queueing Systems with Vacations
|
|
89
72
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
90
73
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
91
74
|
| 1. | M/H<SUB>2</SUB>/c | Numerical calculation of the M/H<SUB>2</SUB>/c system with H<SUB>2</SUB>-warming using the Takahasi-Takagi method. | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_m_h2_h2warm.py) | [link](https://github.com/xabarov/most-queue/blob/main/tutorials/m_h2_h2warm.ipynb)| |
|
|
@@ -93,35 +76,56 @@ Most_queue consists of two main parts:
|
|
|
93
76
|
| 3. | M/Ph/c | Multichannel queuing system with H<SUB>2</SUB>-serving time, H<SUB>2</SUB>-warm-up, H<SUB>2</SUB>-cold delay and H<SUB>2</SUB>-cold (vacations). The system uses complex parameters, which allows you to calculate systems with arbitrary serving, warm-up, cold-delay and cold variation coefficients | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_mgn_with_h2_delay_cold_warm.py) | |
|
|
94
77
|
| 4. | M/M/c | Multichannel queuing system with exp serving time, H<SUB>2</SUB>-warm-up and H<SUB>2</SUB>-cold (vacations). The system uses complex parameters, which allows to calculate systems with arbitrary warm-up and cold variation coefficients | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_mmn_h2cold_h2warm.py) | |
|
|
95
78
|
|
|
96
|
-
###
|
|
79
|
+
### Queueing Systems with Negative arrivals
|
|
97
80
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
98
81
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
99
|
-
| 1. | M/
|
|
82
|
+
| 1. | M/G/1 RCS | Exact calculation of sojourn time for M/G/1 with RCS (remove customer from service) negative arrivals. Service time approximates by H<SUB>2</SUB> or Gamma distribution | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_mg1_rcs.py) | |
|
|
83
|
+
| 2. | M/G/c RCS | Numerical calculation of M/G/c with RCS negative arrivals. Service time approximates by H<SUB>2</SUB> distribution | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_mgn_rcs.py) | |
|
|
84
|
+
| 3. | M/G/c disaster | Numerical calculation of M/G/c with disaster (remove all customer from service and queue by negative arrival). Service time approximates by H<SUB>2</SUB> distribution | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_mgn_disaster.py) | |
|
|
85
|
+
|
|
100
86
|
|
|
87
|
+
### Fork-Join Queueing Systems
|
|
101
88
|
|
|
102
|
-
### QS with Negative arrivals
|
|
103
89
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
104
90
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
105
|
-
| 1.
|
|
106
|
-
| 2.
|
|
91
|
+
| 1. | M/M/c/Fork-Join | Solving for Fork-Join queueing system | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_fj_im.py) | |
|
|
92
|
+
| 2. | M/G/c/Split-Join | Solving for Split-Join queueing system | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_fj_im.py) | |
|
|
107
93
|
|
|
108
94
|
|
|
109
|
-
###
|
|
95
|
+
### Others
|
|
110
96
|
| # | Kendall Notations | Description | Example | Tutorial |
|
|
111
97
|
|-----|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------|-------------------|
|
|
112
|
-
| 1.
|
|
98
|
+
| 1. | M<sup>x</sup>/M/1 | Solving for the of M<sup>x</sup>/M/1 QS with batch arrival | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_batch.py) | |
|
|
99
|
+
| 2. | M/M/1/D | Solving for M/M/1 with exponential impatience | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_impatience.py) | |
|
|
100
|
+
| 3. | M/M/1/N | Solving for the Engset model for M/M/1 with a finite number of sources. | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_engset.py) | |
|
|
101
|
+
| 4. | General Network | Numerical calculation of queuing network with priorities in nodes | [link](https://github.com/xabarov/most-queue/blob/main/tests/test_network_im_prty.py) | [link](https://github.com/xabarov/most-queue/blob/main/tutorials/network_with_priorities.ipynb) |
|
|
113
102
|
|
|
114
|
-
|
|
103
|
+
---
|
|
115
104
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
105
|
+
### 🔍 Search & Indexing Keywords
|
|
106
|
+
- Queueing theory
|
|
107
|
+
- Simulation
|
|
108
|
+
- Numerical methods
|
|
109
|
+
- Queueing networks
|
|
110
|
+
- Performance analysis
|
|
111
|
+
- Cloud computing
|
|
112
|
+
- Call center optimization
|
|
113
|
+
- Transportation systems
|
|
114
|
+
- Network traffic
|
|
115
|
+
- Python package
|
|
119
116
|
|
|
117
|
+
---
|
|
120
118
|
|
|
121
|
-
###
|
|
119
|
+
### 📁 Examples & Tutorials
|
|
122
120
|
- Look [here](https://github.com/xabarov/most-queue/tree/main/tests) for examples
|
|
123
121
|
- Look [here](https://github.com/xabarov/most-queue/tree/main/tutorials) for jupyter tutorials
|
|
124
122
|
|
|
123
|
+
---
|
|
125
124
|
|
|
125
|
+
### 👥 Contributing
|
|
126
126
|
|
|
127
|
+
Contributions are welcome!
|
|
127
128
|
|
|
129
|
+
- Open an [issue](https://github.com/xabarov/most-queue/issues) for bugs or suggestions.
|
|
130
|
+
- Submit a pull request for feature enhancements.
|
|
131
|
+
- Contact me at xabarov1985@gmail.com for questions.
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Plotting utilities for simulation results.
|
|
3
|
+
"""
|
|
4
|
+
from enum import Enum
|
|
5
|
+
|
|
6
|
+
import matplotlib.pyplot as plt
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DependsType(Enum):
|
|
10
|
+
"""
|
|
11
|
+
Enum to specify the type of dependency for plotting.
|
|
12
|
+
"""
|
|
13
|
+
NONE = 0
|
|
14
|
+
UTILIZATION_FACTOR = 1
|
|
15
|
+
CHANNELS_NUMBER = 2
|
|
16
|
+
COEFFICIENT_OF_VARIATION = 3
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def plot_sim_vs_calc_moments(xs: list[float], sim_results: list[float],
|
|
20
|
+
calc_results: list[float],
|
|
21
|
+
depends_on: DependsType = DependsType.CHANNELS_NUMBER,
|
|
22
|
+
is_errors=False, is_waiting_time=True, save_path=None):
|
|
23
|
+
"""
|
|
24
|
+
Plots the simulation and calculated moments for a given list of x values.
|
|
25
|
+
:param xs: A list of x values (e.g., utilization factors or number of channels).
|
|
26
|
+
:type xs: list[float]
|
|
27
|
+
:param sim_results: A list of simulated results.
|
|
28
|
+
:type sim_results: list[float]
|
|
29
|
+
:param calc_results: A list of calculated results using some analytical or numerical method.
|
|
30
|
+
:param depends_on: The type of dependency for plotting (utilization factor, number of channels, etc.).
|
|
31
|
+
:type depends_on: DependsType
|
|
32
|
+
:param is_errors: If True, plots the percentage error between simulation and calculation results.
|
|
33
|
+
:type is_errors: bool
|
|
34
|
+
:param is_waiting_time: If True, labels the y-axis as waiting time; otherwise, as sojourn time.
|
|
35
|
+
:type is_waiting_time: bool
|
|
36
|
+
:param save_path: The path where the plot should be saved. If None, the plot will not be saved.
|
|
37
|
+
:type save_path: str or NoneType
|
|
38
|
+
:return: None
|
|
39
|
+
"""
|
|
40
|
+
_fig, ax = plt.subplots()
|
|
41
|
+
if is_errors:
|
|
42
|
+
errors = [100 * (w_sim - w_tt) / w_tt for w_sim,
|
|
43
|
+
w_tt in zip(sim_results, calc_results)]
|
|
44
|
+
|
|
45
|
+
ax.plot(xs, errors)
|
|
46
|
+
ax.set_ylabel(r"$\varepsilon$, %")
|
|
47
|
+
else:
|
|
48
|
+
ax.plot(xs, sim_results, label="Sim")
|
|
49
|
+
ax.plot(xs, calc_results, label="Calc")
|
|
50
|
+
if is_waiting_time:
|
|
51
|
+
ax.set_ylabel(r"$\omega_{1}$")
|
|
52
|
+
else:
|
|
53
|
+
ax.set_ylabel(r"$\upsilon_{1}$")
|
|
54
|
+
plt.legend()
|
|
55
|
+
|
|
56
|
+
if depends_on == DependsType.UTILIZATION_FACTOR:
|
|
57
|
+
ax.set_xlabel(r"$\rho$")
|
|
58
|
+
elif depends_on == DependsType.COEFFICIENT_OF_VARIATION:
|
|
59
|
+
ax.set_xlabel(r"$\nu$")
|
|
60
|
+
else:
|
|
61
|
+
ax.set_xlabel("n")
|
|
62
|
+
plt.xticks(range(1, len(xs) + 1))
|
|
63
|
+
|
|
64
|
+
if save_path is not None:
|
|
65
|
+
plt.savefig(save_path, dpi=300)
|
|
66
|
+
else:
|
|
67
|
+
plt.show()
|
|
68
|
+
|
|
69
|
+
plt.close(_fig)
|