most-queue 2.6__tar.gz → 2.7__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.
Files changed (211) hide show
  1. most_queue-2.7/.cursorrules +3 -0
  2. {most_queue-2.6 → most_queue-2.7}/.gitignore +4 -0
  3. {most_queue-2.6 → most_queue-2.7}/PKG-INFO +30 -3
  4. {most_queue-2.6 → most_queue-2.7}/README.md +29 -2
  5. {most_queue-2.6 → most_queue-2.7}/docs/calculation.md +117 -10
  6. most_queue-2.7/docs/custom_simulators.md +430 -0
  7. {most_queue-2.6 → most_queue-2.7}/docs/models.md +56 -3
  8. most_queue-2.7/docs/negative_networks_calculation.md +300 -0
  9. {most_queue-2.6 → most_queue-2.7}/docs/networks.md +274 -0
  10. most_queue-2.7/examples/custom_network_example.py +161 -0
  11. most_queue-2.7/examples/custom_simulator_example.py +143 -0
  12. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/base.py +177 -45
  13. most_queue-2.7/most_queue/sim/base_core.py +89 -0
  14. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/batch.py +3 -7
  15. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/finite_source.py +2 -1
  16. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/fork_join.py +6 -12
  17. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/fork_join_delta.py +7 -0
  18. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/impatient.py +39 -42
  19. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/negative.py +59 -41
  20. most_queue-2.7/most_queue/sim/networks/base_network_sim.py +311 -0
  21. most_queue-2.7/most_queue/sim/networks/negative_network.py +623 -0
  22. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/networks/network.py +28 -27
  23. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/networks/priority_network.py +33 -35
  24. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/priority.py +70 -52
  25. most_queue-2.7/most_queue/sim/utils/events.py +123 -0
  26. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/vacations.py +40 -63
  27. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/__init__.py +11 -7
  28. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/fifo/__init__.py +4 -0
  29. most_queue-2.7/most_queue/theory/fifo/gmc_takahasi.py +332 -0
  30. most_queue-2.7/most_queue/theory/fifo/hkhk_takahasi.py +486 -0
  31. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/fifo/mgn_takahasi.py +249 -60
  32. most_queue-2.7/most_queue/theory/fifo/takahasi_base.py +211 -0
  33. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/negative/mgn_disaster.py +10 -75
  34. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/negative/mgn_rcs.py +10 -77
  35. most_queue-2.7/most_queue/theory/networks/__init__.py +8 -0
  36. most_queue-2.7/most_queue/theory/networks/negative_network.py +247 -0
  37. {most_queue-2.6 → most_queue-2.7}/pyproject.toml +6 -1
  38. most_queue-2.7/tests/test_h2_h2_n_calc.py +129 -0
  39. most_queue-2.7/tests/test_h2_m_n_calc.py +105 -0
  40. most_queue-2.7/tests/test_negative_network.py +504 -0
  41. most_queue-2.7/tests/test_network_negative_calc.py +182 -0
  42. most_queue-2.7/tests/test_tt_vs_sim_cv105.py +149 -0
  43. most_queue-2.7/tests/test_tt_vs_sim_gamma_cvl1.py +128 -0
  44. most_queue-2.6/most_queue/sim/networks/base_network_sim.py +0 -111
  45. most_queue-2.6/works/vacations/__init__.py +0 -0
  46. {most_queue-2.6 → most_queue-2.7}/.pre-commit-config.yaml +0 -0
  47. {most_queue-2.6 → most_queue-2.7}/LICENSE +0 -0
  48. {most_queue-2.6 → most_queue-2.7}/assets/3.gif +0 -0
  49. {most_queue-2.6 → most_queue-2.7}/deploy.txt +0 -0
  50. {most_queue-2.6 → most_queue-2.7}/docs/README.md +0 -0
  51. {most_queue-2.6 → most_queue-2.7}/docs/concepts.md +0 -0
  52. {most_queue-2.6 → most_queue-2.7}/docs/distributions.md +0 -0
  53. {most_queue-2.6 → most_queue-2.7}/docs/examples.md +0 -0
  54. {most_queue-2.6 → most_queue-2.7}/docs/getting_started.md +0 -0
  55. {most_queue-2.6 → most_queue-2.7}/docs/priorities.md +0 -0
  56. {most_queue-2.6 → most_queue-2.7}/docs/simulation.md +0 -0
  57. {most_queue-2.6 → most_queue-2.7}/docs/tesaurus.md +0 -0
  58. {most_queue-2.6 → most_queue-2.7}/googleb31d3dccb40f969f.html +0 -0
  59. {most_queue-2.6 → most_queue-2.7}/most_queue/__init__.py +0 -0
  60. {most_queue-2.6 → most_queue-2.7}/most_queue/constants.py +0 -0
  61. {most_queue-2.6 → most_queue-2.7}/most_queue/io/__init__.py +0 -0
  62. {most_queue-2.6 → most_queue-2.7}/most_queue/io/plots.py +0 -0
  63. {most_queue-2.6 → most_queue-2.7}/most_queue/io/tables.py +0 -0
  64. {most_queue-2.6 → most_queue-2.7}/most_queue/misc/approx_cdf_make.py +0 -0
  65. {most_queue-2.6 → most_queue-2.7}/most_queue/misc/calc_v_pls.py +0 -0
  66. {most_queue-2.6 → most_queue-2.7}/most_queue/misc/compare_fj_calc.py +0 -0
  67. {most_queue-2.6 → most_queue-2.7}/most_queue/misc/flow_sum.py +0 -0
  68. {most_queue-2.6 → most_queue-2.7}/most_queue/misc/run_mgn_with_h2_delay_cold_warm.py +0 -0
  69. {most_queue-2.6 → most_queue-2.7}/most_queue/misc/tests/test_fj_delta.py +0 -0
  70. {most_queue-2.6 → most_queue-2.7}/most_queue/misc/tests/test_network_opt_approx.py +0 -0
  71. {most_queue-2.6 → most_queue-2.7}/most_queue/misc/tests/test_network_opt_plus.py +0 -0
  72. {most_queue-2.6 → most_queue-2.7}/most_queue/misc/vacations_paper_utils.py +0 -0
  73. {most_queue-2.6 → most_queue-2.7}/most_queue/random/__init__.py +0 -0
  74. {most_queue-2.6 → most_queue-2.7}/most_queue/random/distributions.py +0 -0
  75. {most_queue-2.6 → most_queue-2.7}/most_queue/random/distributions.yaml +0 -0
  76. {most_queue-2.6 → most_queue-2.7}/most_queue/random/utils/base.py +0 -0
  77. {most_queue-2.6 → most_queue-2.7}/most_queue/random/utils/create.py +0 -0
  78. {most_queue-2.6 → most_queue-2.7}/most_queue/random/utils/fit.py +0 -0
  79. {most_queue-2.6 → most_queue-2.7}/most_queue/random/utils/load.py +0 -0
  80. {most_queue-2.6 → most_queue-2.7}/most_queue/random/utils/params.py +0 -0
  81. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/__init__.py +0 -0
  82. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/flow_sum.py +0 -0
  83. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/networks/__init__.py +0 -0
  84. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/utils/__init__.py +0 -0
  85. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/utils/phase.py +0 -0
  86. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/utils/qs_queue.py +0 -0
  87. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/utils/servers.py +0 -0
  88. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/utils/stats_update.py +0 -0
  89. {most_queue-2.6 → most_queue-2.7}/most_queue/sim/utils/tasks.py +0 -0
  90. {most_queue-2.6 → most_queue-2.7}/most_queue/structs.py +0 -0
  91. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/base_queue.py +0 -0
  92. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/batch/__init__.py +0 -0
  93. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/batch/mm1.py +0 -0
  94. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/calc_params.py +0 -0
  95. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/closed/__init__.py +0 -0
  96. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/closed/engset.py +0 -0
  97. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/fifo/ek_d_n.py +0 -0
  98. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/fifo/gi_m_1.py +0 -0
  99. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/fifo/gi_m_n.py +0 -0
  100. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/fifo/m_d_n.py +0 -0
  101. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/fifo/mg1.py +0 -0
  102. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/fifo/mmnr.py +0 -0
  103. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/fork_join/__init__.py +0 -0
  104. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/fork_join/m_m_n.py +0 -0
  105. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/fork_join/split_join.py +0 -0
  106. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/impatience/__init__.py +0 -0
  107. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/impatience/mm1.py +0 -0
  108. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/negative/mg1_disasters.py +0 -0
  109. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/negative/mg1_rcs.py +0 -0
  110. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/negative/structs.py +0 -0
  111. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/networks/base_network_calc.py +0 -0
  112. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/networks/network_viewer.py +0 -0
  113. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/networks/open_network.py +0 -0
  114. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/networks/open_network_prty.py +0 -0
  115. {most_queue-2.6/most_queue/theory/networks → most_queue-2.7/most_queue/theory/networks/opt}/__init__.py +0 -0
  116. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/networks/opt/transition.py +0 -0
  117. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/networks/opt/transition_approx.py +0 -0
  118. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/networks/opt/transition_plus.py +0 -0
  119. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/priority/__init__.py +0 -0
  120. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/priority/mgn_invar_approx.py +0 -0
  121. {most_queue-2.6/most_queue/theory/networks/opt → most_queue-2.7/most_queue/theory/priority/non_preemptive}/__init__.py +0 -0
  122. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/priority/non_preemptive/mg1.py +0 -0
  123. {most_queue-2.6/most_queue/theory/priority/non_preemptive → most_queue-2.7/most_queue/theory/priority/preemptive}/__init__.py +0 -0
  124. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/priority/preemptive/m_ph_n_busy_approx.py +0 -0
  125. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/priority/preemptive/mg1.py +0 -0
  126. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/priority/preemptive/mm2_3cls_busy_approx.py +0 -0
  127. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/priority/preemptive/mmn_2cls_pr_busy_approx.py +0 -0
  128. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/r_example.gexf +0 -0
  129. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/__init__.py +0 -0
  130. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/binom_probs.py +0 -0
  131. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/busy_periods.py +0 -0
  132. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/conditional.py +0 -0
  133. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/conv.py +0 -0
  134. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/diff5dots.py +0 -0
  135. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/flow_sum.py +0 -0
  136. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/max_dist.py +0 -0
  137. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/moments.py +0 -0
  138. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/passage_time.py +0 -0
  139. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/q_poisson_arrival_calc.py +0 -0
  140. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/residual.py +0 -0
  141. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/student_stat.py +0 -0
  142. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/timing.py +0 -0
  143. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/transforms.py +0 -0
  144. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/utilization_approx.py +0 -0
  145. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/utils/validation.py +0 -0
  146. {most_queue-2.6/most_queue/theory/priority/preemptive → most_queue-2.7/most_queue/theory/vacations}/__init__.py +0 -0
  147. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/vacations/m_h2_h2warm.py +0 -0
  148. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/vacations/mg1_warm_calc.py +0 -0
  149. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/vacations/mgn_with_h2_delay_cold_warm.py +0 -0
  150. {most_queue-2.6 → most_queue-2.7}/most_queue/theory/vacations/mmn_with_h2_cold_and_h2_warmup.py +0 -0
  151. {most_queue-2.6 → most_queue-2.7}/requirements.txt +0 -0
  152. {most_queue-2.6 → most_queue-2.7}/tests/Dockerfile +0 -0
  153. {most_queue-2.6/most_queue/theory/vacations → most_queue-2.7/tests}/__init__.py +0 -0
  154. {most_queue-2.6 → most_queue-2.7}/tests/default_params.yaml +0 -0
  155. {most_queue-2.6 → most_queue-2.7}/tests/run.sh +0 -0
  156. {most_queue-2.6 → most_queue-2.7}/tests/test_base_qs_sim.py +0 -0
  157. {most_queue-2.6 → most_queue-2.7}/tests/test_batch.py +0 -0
  158. {most_queue-2.6 → most_queue-2.7}/tests/test_ek_d_n.py +0 -0
  159. {most_queue-2.6 → most_queue-2.7}/tests/test_engset.py +0 -0
  160. {most_queue-2.6 → most_queue-2.7}/tests/test_fj_sim.py +0 -0
  161. {most_queue-2.6 → most_queue-2.7}/tests/test_gi_m_1_calc.py +0 -0
  162. {most_queue-2.6 → most_queue-2.7}/tests/test_gi_m_n_calc.py +0 -0
  163. {most_queue-2.6 → most_queue-2.7}/tests/test_impatience.py +0 -0
  164. {most_queue-2.6 → most_queue-2.7}/tests/test_m_d_n_calc.py +0 -0
  165. {most_queue-2.6 → most_queue-2.7}/tests/test_m_h2_h2warm.py +0 -0
  166. {most_queue-2.6 → most_queue-2.7}/tests/test_m_ph_n_prty.py +0 -0
  167. {most_queue-2.6 → most_queue-2.7}/tests/test_mg1_calc.py +0 -0
  168. {most_queue-2.6 → most_queue-2.7}/tests/test_mg1_disaster.py +0 -0
  169. {most_queue-2.6 → most_queue-2.7}/tests/test_mg1_rcs.py +0 -0
  170. {most_queue-2.6 → most_queue-2.7}/tests/test_mg1_warmup.py +0 -0
  171. {most_queue-2.6 → most_queue-2.7}/tests/test_mgn_disaster.py +0 -0
  172. {most_queue-2.6 → most_queue-2.7}/tests/test_mgn_rcs.py +0 -0
  173. {most_queue-2.6 → most_queue-2.7}/tests/test_mgn_tt.py +0 -0
  174. {most_queue-2.6 → most_queue-2.7}/tests/test_mgn_with_h2_delay_cold_warm.py +0 -0
  175. {most_queue-2.6 → most_queue-2.7}/tests/test_mm2_3cls_prty_busy.py +0 -0
  176. {most_queue-2.6 → most_queue-2.7}/tests/test_mmn_h2cold_h2warm.py +0 -0
  177. {most_queue-2.6 → most_queue-2.7}/tests/test_mmn_prty_busy_approx.py +0 -0
  178. {most_queue-2.6 → most_queue-2.7}/tests/test_network_im_prty.py +0 -0
  179. {most_queue-2.6 → most_queue-2.7}/tests/test_network_no_prty.py +0 -0
  180. {most_queue-2.6 → most_queue-2.7}/tests/test_network_opt.py +0 -0
  181. {most_queue-2.6 → most_queue-2.7}/tests/test_qs_sim.py +0 -0
  182. {most_queue-2.6 → most_queue-2.7}/tests/test_qs_sim_prty.py +0 -0
  183. {most_queue-2.6 → most_queue-2.7}/tests/units/test_busy_moments_calc.py +0 -0
  184. {most_queue-2.6 → most_queue-2.7}/tests/units/test_central_moments.py +0 -0
  185. {most_queue-2.6 → most_queue-2.7}/tests/units/test_conditionals.py +0 -0
  186. {most_queue-2.6 → most_queue-2.7}/tests/units/test_h2_params_cv.py +0 -0
  187. {most_queue-2.6 → most_queue-2.7}/tests/units/test_queue_types.py +0 -0
  188. {most_queue-2.6 → most_queue-2.7}/tests/units/test_tt_up_probs.py +0 -0
  189. {most_queue-2.6 → most_queue-2.7}/tests/units/test_v1_on_channels.py +0 -0
  190. {most_queue-2.6 → most_queue-2.7}/tests/units/test_v1_utlization_approx.py +0 -0
  191. {most_queue-2.6 → most_queue-2.7}/tests/units/test_weibull.py +0 -0
  192. {most_queue-2.6 → most_queue-2.7}/tutorials/m_h2_h2warm.ipynb +0 -0
  193. {most_queue-2.6 → most_queue-2.7}/tutorials/mgn_takahasi_takami.ipynb +0 -0
  194. {most_queue-2.6 → most_queue-2.7}/tutorials/network_with_priorities.ipynb +0 -0
  195. {most_queue-2.6 → most_queue-2.7}/tutorials/priority_queue.ipynb +0 -0
  196. {most_queue-2.6 → most_queue-2.7}/tutorials/queue_sim.ipynb +0 -0
  197. {most_queue-2.6/tests → most_queue-2.7/works}/__init__.py +0 -0
  198. {most_queue-2.6/works → most_queue-2.7/works/negative_queues}/__init__.py +0 -0
  199. {most_queue-2.6 → most_queue-2.7}/works/negative_queues/base_parameters.yaml +0 -0
  200. {most_queue-2.6 → most_queue-2.7}/works/negative_queues/work_mgn_negatives.py +0 -0
  201. {most_queue-2.6/works/negative_queues → most_queue-2.7/works/vacations}/__init__.py +0 -0
  202. {most_queue-2.6 → most_queue-2.7}/works/vacations/base_parameters.yaml +0 -0
  203. {most_queue-2.6 → most_queue-2.7}/works/vacations/channels.py +0 -0
  204. {most_queue-2.6 → most_queue-2.7}/works/vacations/cooling.py +0 -0
  205. {most_queue-2.6 → most_queue-2.7}/works/vacations/cooling_delay.py +0 -0
  206. {most_queue-2.6 → most_queue-2.7}/works/vacations/main.py +0 -0
  207. {most_queue-2.6 → most_queue-2.7}/works/vacations/run_one_calc_vs_sim.py +0 -0
  208. {most_queue-2.6 → most_queue-2.7}/works/vacations/service.py +0 -0
  209. {most_queue-2.6 → most_queue-2.7}/works/vacations/utilization.py +0 -0
  210. {most_queue-2.6 → most_queue-2.7}/works/vacations/utils.py +0 -0
  211. {most_queue-2.6 → most_queue-2.7}/works/vacations/warmup.py +0 -0
@@ -0,0 +1,3 @@
1
+ # Python Virtual Environment
2
+ Use `./.venv` for Python interpreter and package management.
3
+
@@ -170,3 +170,7 @@ tests/units/*.png
170
170
  # ignore all files in works/vacations/results
171
171
  works/vacations/results/*
172
172
 
173
+ # ignore article about negative queues
174
+ docs/negative_queues_takahasi_takami.md
175
+ docs/negative_queues_figures/
176
+ docs/books/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: most_queue
3
- Version: 2.6
3
+ Version: 2.7
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>
@@ -45,6 +45,7 @@ Description-Content-Type: text/markdown
45
45
 
46
46
  Python-библиотека для симуляции и анализа систем массового обслуживания (СМО) и сетей очередей.
47
47
 
48
+ ![PyPI version](https://img.shields.io/pypi/v/most-queue)
48
49
  ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/xabarov/most-queue)
49
50
 
50
51
  ---
@@ -70,7 +71,7 @@ Python-библиотека для симуляции и анализа сист
70
71
  - **Симуляция**: Моделирование различных типов систем массового обслуживания и сетей
71
72
  - **Численные методы**: Решение стационарных задач теории массового обслуживания
72
73
  - **Метрики производительности**: Анализ времени ожидания, времени пребывания, коэффициентов загрузки и многое другое
73
- - **Широкая поддержка моделей**: FIFO, приоритеты, отпуска, отрицательные заявки, fork-join, сети и многое другое
74
+ - **Широкая поддержка моделей**: FIFO, приоритеты, прогулки, отрицательные заявки, fork-join, сети и многое другое
74
75
 
75
76
  ---
76
77
 
@@ -92,6 +93,28 @@ pip install -e .
92
93
 
93
94
  ---
94
95
 
96
+ ## 📰 Новости
97
+
98
+ - **Февраль 2026** — Добавлены расчеты по методу **Такахаси–Таками** для FIFO-моделей **H₂/M/c** и **H₂/H₂/c**:
99
+ - `most_queue/theory/fifo/gmc_takahasi.py` — **H₂/M/c**
100
+ - `most_queue/theory/fifo/hkhk_takahasi.py` — **H₂/H₂/c**
101
+ - Улучшено API: `H2MnCalc.set_sources()` и `MGnCalc.set_servers()` теперь принимают `H2Params` напрямую (без повторного фиттинга), а `HkHkNCalc` корректно работает с complex-fit для \(CV<1\).
102
+ - **2025** — Для метода расчета многоканальной СМО с **разогревом**, **охлаждением** и **задержкой начала охлаждения** опубликована статья (реализация: `most_queue/theory/vacations/mgn_with_h2_delay_cold_warm.py`):
103
+ - Лохвицкий, В. А. Численный расчет многоканальной системы массового обслуживания с разогревом, охлаждением и задержкой начала охлаждения / В. А. Лохвицкий, Р. С. Хабаров, Е. Л. Яковлев // Авиакосмическое приборостроение. – 2025. – № 1. – С. 44–57. – DOI [10.25791/aviakosmos.1.2025.1456](https://doi.org/10.25791/aviakosmos.1.2025.1456). – EDN OVJXK
104
+
105
+ ---
106
+
107
+ ## 🎉 Версия 2.6
108
+
109
+ **Основные изменения:**
110
+
111
+ - **Рефакторинг модулей `sim` и `theory`**: Улучшена архитектура и структура кода для лучшей поддерживаемости и расширяемости
112
+ - **Полная документация**: Добавлена подробная документация на русском языке с руководствами по симуляции, расчетам, моделям и сетям очередей
113
+ - **Единый API**: Унифицированный интерфейс для работы с симуляцией и численными методами
114
+ - **Улучшенная терминология**: Обновлена терминология (СМО с прогулками вместо отпусков)
115
+
116
+ ---
117
+
95
118
  ## 🚀 Быстрый старт
96
119
 
97
120
  ### Базовый пример: M/M/1 система
@@ -151,8 +174,12 @@ Most-Queue состоит из двух основных модулей:
151
174
  - **M/M/c**, **M/M/c/r** — Многоканальные системы с пуассоновским потоком
152
175
  - **M/G/1**, **M/G/c** — Системы с произвольным распределением времени обслуживания
153
176
  - **GI/M/1**, **GI/M/c** — Системы с общим потоком поступления
177
+ - **H₂/M/c** — Гиперэкспоненциальный поток поступления, метод Такахаси-Таками (§7.6.1)
154
178
  - **M/D/c**, **E_k/D/c** — Системы с детерминированным обслуживанием
155
179
  - **M/H₂/c** — Метод Такахаси-Таками с гиперэкспоненциальным обслуживанием
180
+ - **H₂/H₂/c** — Метод Такахаси-Таками для гиперэкспоненциального потока и обслуживания
181
+
182
+ Примечание про H₂ и \(CV<1\): реальное H₂-распределение имеет \(CV\\ge 1\), но для численных методов допускается **complex-fit** (комплексные параметры аппроксимации). Симулятор `QsSim` не генерирует H₂ с комплексными параметрами, поэтому сравнение “теория vs симуляция” возможно только когда параметры вещественные.
156
183
 
157
184
  ### Системы с приоритетами
158
185
  - **M/G/1/PR**, **M/G/1/NP** — Одноканальные с прерываемым/непрерываемым приоритетом
@@ -160,7 +187,7 @@ Most-Queue состоит из двух основных модулей:
160
187
  - **M/Ph/c/PR** — Фазовое распределение обслуживания с приоритетами
161
188
 
162
189
  ### Специализированные системы
163
- - **Отпуска** — Системы с отпусками серверов и прогревом
190
+ - **Прогулки** — Системы с прогулками серверов и прогревом
164
191
  - **Отрицательные заявки** — Модели RCS и disaster
165
192
  - **Fork-Join** — Системы параллельной обработки
166
193
  - **Пакетное поступление** — Системы M^x/M/1
@@ -4,6 +4,7 @@
4
4
 
5
5
  Python-библиотека для симуляции и анализа систем массового обслуживания (СМО) и сетей очередей.
6
6
 
7
+ ![PyPI version](https://img.shields.io/pypi/v/most-queue)
7
8
  ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/xabarov/most-queue)
8
9
 
9
10
  ---
@@ -29,7 +30,7 @@ Python-библиотека для симуляции и анализа сист
29
30
  - **Симуляция**: Моделирование различных типов систем массового обслуживания и сетей
30
31
  - **Численные методы**: Решение стационарных задач теории массового обслуживания
31
32
  - **Метрики производительности**: Анализ времени ожидания, времени пребывания, коэффициентов загрузки и многое другое
32
- - **Широкая поддержка моделей**: FIFO, приоритеты, отпуска, отрицательные заявки, fork-join, сети и многое другое
33
+ - **Широкая поддержка моделей**: FIFO, приоритеты, прогулки, отрицательные заявки, fork-join, сети и многое другое
33
34
 
34
35
  ---
35
36
 
@@ -51,6 +52,28 @@ pip install -e .
51
52
 
52
53
  ---
53
54
 
55
+ ## 📰 Новости
56
+
57
+ - **Февраль 2026** — Добавлены расчеты по методу **Такахаси–Таками** для FIFO-моделей **H₂/M/c** и **H₂/H₂/c**:
58
+ - `most_queue/theory/fifo/gmc_takahasi.py` — **H₂/M/c**
59
+ - `most_queue/theory/fifo/hkhk_takahasi.py` — **H₂/H₂/c**
60
+ - Улучшено API: `H2MnCalc.set_sources()` и `MGnCalc.set_servers()` теперь принимают `H2Params` напрямую (без повторного фиттинга), а `HkHkNCalc` корректно работает с complex-fit для \(CV<1\).
61
+ - **2025** — Для метода расчета многоканальной СМО с **разогревом**, **охлаждением** и **задержкой начала охлаждения** опубликована статья (реализация: `most_queue/theory/vacations/mgn_with_h2_delay_cold_warm.py`):
62
+ - Лохвицкий, В. А. Численный расчет многоканальной системы массового обслуживания с разогревом, охлаждением и задержкой начала охлаждения / В. А. Лохвицкий, Р. С. Хабаров, Е. Л. Яковлев // Авиакосмическое приборостроение. – 2025. – № 1. – С. 44–57. – DOI [10.25791/aviakosmos.1.2025.1456](https://doi.org/10.25791/aviakosmos.1.2025.1456). – EDN OVJXK
63
+
64
+ ---
65
+
66
+ ## 🎉 Версия 2.6
67
+
68
+ **Основные изменения:**
69
+
70
+ - **Рефакторинг модулей `sim` и `theory`**: Улучшена архитектура и структура кода для лучшей поддерживаемости и расширяемости
71
+ - **Полная документация**: Добавлена подробная документация на русском языке с руководствами по симуляции, расчетам, моделям и сетям очередей
72
+ - **Единый API**: Унифицированный интерфейс для работы с симуляцией и численными методами
73
+ - **Улучшенная терминология**: Обновлена терминология (СМО с прогулками вместо отпусков)
74
+
75
+ ---
76
+
54
77
  ## 🚀 Быстрый старт
55
78
 
56
79
  ### Базовый пример: M/M/1 система
@@ -110,8 +133,12 @@ Most-Queue состоит из двух основных модулей:
110
133
  - **M/M/c**, **M/M/c/r** — Многоканальные системы с пуассоновским потоком
111
134
  - **M/G/1**, **M/G/c** — Системы с произвольным распределением времени обслуживания
112
135
  - **GI/M/1**, **GI/M/c** — Системы с общим потоком поступления
136
+ - **H₂/M/c** — Гиперэкспоненциальный поток поступления, метод Такахаси-Таками (§7.6.1)
113
137
  - **M/D/c**, **E_k/D/c** — Системы с детерминированным обслуживанием
114
138
  - **M/H₂/c** — Метод Такахаси-Таками с гиперэкспоненциальным обслуживанием
139
+ - **H₂/H₂/c** — Метод Такахаси-Таками для гиперэкспоненциального потока и обслуживания
140
+
141
+ Примечание про H₂ и \(CV<1\): реальное H₂-распределение имеет \(CV\\ge 1\), но для численных методов допускается **complex-fit** (комплексные параметры аппроксимации). Симулятор `QsSim` не генерирует H₂ с комплексными параметрами, поэтому сравнение “теория vs симуляция” возможно только когда параметры вещественные.
115
142
 
116
143
  ### Системы с приоритетами
117
144
  - **M/G/1/PR**, **M/G/1/NP** — Одноканальные с прерываемым/непрерываемым приоритетом
@@ -119,7 +146,7 @@ Most-Queue состоит из двух основных модулей:
119
146
  - **M/Ph/c/PR** — Фазовое распределение обслуживания с приоритетами
120
147
 
121
148
  ### Специализированные системы
122
- - **Отпуска** — Системы с отпусками серверов и прогревом
149
+ - **Прогулки** — Системы с прогулками серверов и прогревом
123
150
  - **Отрицательные заявки** — Модели RCS и disaster
124
151
  - **Fork-Join** — Системы параллельной обработки
125
152
  - **Пакетное поступление** — Системы M^x/M/1
@@ -42,10 +42,7 @@ mg1.set_sources(l=0.5) # λ = 0.5
42
42
 
43
43
  # Настройка обслуживания через моменты распределения
44
44
  # Сначала создаем параметры H2-распределения
45
- h2_params = H2Distribution.get_params_by_mean_and_cv(
46
- mean=2.0, # среднее время обслуживания
47
- cv=0.8 # коэффициент вариации
48
- )
45
+ h2_params = H2Distribution.get_params_by_mean_and_cv(2.0, 0.8) # mean, cv
49
46
 
50
47
  # Вычисляем моменты распределения
51
48
  b = H2Distribution.calc_theory_moments(h2_params, 5)
@@ -76,10 +73,7 @@ gim1 = GIM1Calc()
76
73
 
77
74
  # Настройка потока поступления через моменты
78
75
  # Создаем параметры гамма-распределения
79
- gamma_params = GammaDistribution.get_params_by_mean_and_cv(
80
- mean=2.0, # среднее межприходное время
81
- cv=0.6
82
- )
76
+ gamma_params = GammaDistribution.get_params_by_mean_and_cv(2.0, 0.6) # mean, cv
83
77
 
84
78
  # Вычисляем моменты межприходных времен
85
79
  a = GammaDistribution.calc_theory_moments(gamma_params)
@@ -121,6 +115,33 @@ print(f" Среднее время ожидания: {results.w[0]:.4f}")
121
115
  print(f" Коэффициент загрузки: {results.utilization:.4f}")
122
116
  ```
123
117
 
118
+ ### H₂/M/c система
119
+
120
+ Класс `H2MnCalc` для системы с гиперэкспоненциальным потоком поступления и экспоненциальным обслуживанием (алгоритм §7.6.1):
121
+
122
+ ```python
123
+ from most_queue.theory.fifo.gmc_takahasi import H2MnCalc
124
+ from most_queue.random.distributions import H2Distribution
125
+
126
+ calc = H2MnCalc(n=3)
127
+
128
+ h2_params = H2Distribution.get_params_by_mean_and_cv(1.0, 1.2, is_clx=True) # mean, cv
129
+ #
130
+ # Для CV<1 используйте complex-fit: is_clx=True.
131
+ # Важно: симулятор `QsSim` не умеет генерировать H2 с комплексными параметрами,
132
+ # поэтому сравнение с симуляцией возможно только для вещественных параметров.
133
+ calc.set_sources(h2_params)
134
+
135
+ calc.set_servers(b=2.0) # среднее время обслуживания
136
+ results = calc.run()
137
+
138
+ print(f"H2/M/3: p0={results.p[0]:.4f}, время ожидания={results.w[0]:.4f}")
139
+ ```
140
+
141
+ **CV<1 и валидация:** при \(CV<1\) для H₂ используется complex-fit (комплексные параметры аппроксимации).
142
+ `QsSim` не поддерживает генерацию H₂ с комплексными параметрами, поэтому сравнение “теория vs симуляция”
143
+ в таких случаях разумно делать через `Gamma`-симуляцию с тем же mean и CV (пример — `tests/test_tt_vs_sim_gamma_cvl1.py`).
144
+
124
145
  ### M/M/c/r система с ограниченной очередью
125
146
 
126
147
  Тот же класс `MMnrCalc` с параметром `r`:
@@ -159,8 +180,8 @@ from most_queue.random.distributions import (
159
180
  ErlangDistribution
160
181
  )
161
182
 
162
- # H2-распределение
163
- h2_params = H2Distribution.get_params_by_mean_and_cv(mean=2.0, cv=0.8)
183
+ # H2-распределение (для CV<1 нужен complex-fit)
184
+ h2_params = H2Distribution.get_params_by_mean_and_cv(2.0, 0.8, is_clx=True) # mean, cv
164
185
  b_h2 = H2Distribution.calc_theory_moments(h2_params, num=5)
165
186
 
166
187
  # Гамма-распределение
@@ -295,6 +316,92 @@ print_sojourn_moments(sim_results.v, calc_results.v)
295
316
  - **`EkDnCalc`** — E_k/D/c система
296
317
  - **`MGnCalc`** — M/G/c система (метод Такахаси-Таками)
297
318
 
319
+ ## Расширение метода Такахаси-Таками
320
+
321
+ Класс `MGnCalc` реализует численный метод Такахаси-Таками для расчета многоканальных систем M/G/c. Этот класс спроектирован для легкого расширения, что позволяет создавать кастомные методы расчета для различных типов систем массового обслуживания.
322
+
323
+ ### Архитектура расширяемости
324
+
325
+ `MGnCalc` использует паттерн Template Method, разделяя алгоритм на переопределяемые хуки:
326
+
327
+ - **Методы построения матриц** — определяют структуру переходных матриц
328
+ - **Хуки итераций** — позволяют кастомизировать логику алгоритма
329
+ - **Методы расчета результатов** — настраивают вычисление характеристик системы
330
+
331
+ ### Базовое использование MGnCalc
332
+
333
+ ```python
334
+ from most_queue.theory.fifo.mgn_takahasi import MGnCalc
335
+ from most_queue.random.distributions import H2Distribution
336
+
337
+ calc = MGnCalc(n=5) # 5 каналов
338
+ calc.set_sources(l=2.0)
339
+
340
+ h2_params = H2Distribution.get_params_by_mean_and_cv(2.0, 1.2, is_clx=True)
341
+ calc.set_servers(h2_params)
342
+
343
+ results = calc.run()
344
+ ```
345
+
346
+ ### Создание кастомного расширения
347
+
348
+ Для создания собственного калькулятора на основе метода Такахаси-Таками:
349
+
350
+ 1. Наследуйтесь от `MGnCalc`
351
+ 2. Переопределите методы построения матриц (при необходимости)
352
+ 3. Переопределите хуки итераций (при необходимости)
353
+ 4. Переопределите методы расчета результатов (при необходимости)
354
+
355
+ **Пример:** Добавление отрицательных заявок
356
+
357
+ ```python
358
+ from most_queue.theory.fifo.mgn_takahasi import MGnCalc
359
+ import numpy as np
360
+
361
+ class CustomNegativeQueueCalc(MGnCalc):
362
+ def __init__(self, n, buffer=None, calc_params=None):
363
+ super().__init__(n, buffer, calc_params)
364
+ self.l_neg = None # интенсивность отрицательных заявок
365
+
366
+ def set_sources(self, l_pos, l_neg):
367
+ self.l_pos = l_pos
368
+ self.l_neg = l_neg
369
+ self.l = l_pos # базовая интенсивность
370
+ self.is_sources_set = True
371
+
372
+ def _build_big_d_matrix(self, num):
373
+ # Переопределяем D-матрицу для учета отрицательных заявок
374
+ base_matrix = super()._build_big_d_matrix(num)
375
+ # Добавляем отрицательные заявки к диагональным элементам
376
+ for i in range(base_matrix.shape[0]):
377
+ base_matrix[i, i] += self.l_neg
378
+ return base_matrix
379
+ ```
380
+
381
+ ### Точки расширения
382
+
383
+ **Обязательные для переопределения (если меняется структура матриц):**
384
+ - `fill_cols()` — определение структуры колонок для каждого уровня
385
+ - `_build_big_a_matrix(num)` — матрица переходов вверх (поступления)
386
+ - `_build_big_b_matrix(num)` — матрица переходов вниз (обслуживание)
387
+ - `_build_big_d_matrix(num)` — диагональные элементы матрицы
388
+
389
+ **Опциональные для переопределения:**
390
+ - `_pre_run_setup()` — подготовка перед основным циклом
391
+ - `_update_level_j(j)` — обновление переменных для уровня j
392
+ - `_update_level_0()` — обновление уровня 0
393
+ - `_calculate_p()` — расчет вероятностей состояний
394
+ - `get_results()` — формирование результатов
395
+
396
+ ### Примеры существующих расширений
397
+
398
+ - **`MGnNegativeRCSCalc`** — система с отрицательными заявками и дисциплиной RCS
399
+ - **`MGnNegativeDisasterCalc`** — система с отрицательными заявками (катастрофы)
400
+ - **`MH2nH2Warm`** — система с периодами разогрева
401
+ - **`MPhNPrty`** — система с приоритетами
402
+
403
+ Подробную документацию и примеры см. в `most_queue/theory/fifo/takahasi_base.py`.
404
+
298
405
  ### Системы с приоритетами
299
406
 
300
407
  - **`MG1Preemptive`** — M/G/1 с прерываемым приоритетом