most-queue 2.2__tar.gz → 2.3__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-2.2 → most_queue-2.3}/PKG-INFO +5 -31
- {most_queue-2.2 → most_queue-2.3}/README.md +4 -30
- {most_queue-2.2/most_queue/distr_utils → most_queue-2.3/most_queue/io}/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/misc/approx_cdf_make.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/misc/calc_v_pls.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/misc/flow_sum.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/misc/run_mgn_with_h2_delay_cold_warm.py +1 -1
- {most_queue-2.2/most_queue/misc → most_queue-2.3/most_queue/misc/tests}/test_fj_delta.py +2 -2
- {most_queue-2.2/most_queue/misc → most_queue-2.3/most_queue/misc/tests}/test_network_opt_approx.py +1 -1
- {most_queue-2.2/most_queue/misc → most_queue-2.3/most_queue/misc/tests}/test_network_opt_plus.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/misc/vacations_paper_utils.py +1 -1
- {most_queue-2.2/most_queue/general → most_queue-2.3/most_queue/random}/__init__.py +0 -0
- {most_queue-2.2/most_queue → most_queue-2.3/most_queue/random}/distributions.py +45 -3
- {most_queue-2.2/most_queue/sim/utils → most_queue-2.3/most_queue/random}/distributions.yaml +7 -4
- most_queue-2.3/most_queue/random/utils/create.py +71 -0
- most_queue-2.2/most_queue/distr_utils/distribution_fitting.py → most_queue-2.3/most_queue/random/utils/fit.py +1 -1
- most_queue-2.3/most_queue/random/utils/load.py +100 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/base.py +4 -4
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/finite_source.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/flow_sum.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/fork_join_delta.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/impatient.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/negative.py +3 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/networks/base_network_sim.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/networks/network.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/networks/priority_network.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/priority.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/utils/servers.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/vacations.py +3 -4
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/batch/mm1.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/closed/engset.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/fifo/ek_d_n.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/fifo/gi_m_1.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/fifo/gi_m_n.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/fifo/m_d_n.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/fifo/mg1.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/fifo/mgn_takahasi.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/fifo/mmnr.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/fork_join/m_m_n.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/fork_join/split_join.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/impatience/mm1.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/negative/mg1_disasters.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/negative/mg1_rcs.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/negative/mgn_disaster.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/negative/mgn_rcs.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/networks/base_network_calc.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/networks/open_network.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/networks/open_network_prty.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/priority/mgn_invar_approx.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/priority/non_preemptive/mg1.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/priority/preemptive/m_ph_n_busy_approx.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/priority/preemptive/mg1.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/priority/preemptive/mm2_3cls_busy_approx.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/priority/preemptive/mmn_2cls_pr_busy_approx.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/busy_periods.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/conditional.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/flow_sum.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/max_dist.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/q_poisson_arrival_calc.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/transforms.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/vacations/m_h2_h2warm.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/vacations/mg1_warm_calc.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/vacations/mgn_with_h2_delay_cold_warm.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/vacations/mmn_with_h2_cold_and_h2_warmup.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/pyproject.toml +1 -1
- {most_queue-2.2 → most_queue-2.3}/setup.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/tests/test_base_qs_sim.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/tests/test_batch.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/tests/test_ek_d_n.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/test_engset.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/tests/test_fj_sim.py +3 -3
- {most_queue-2.2 → most_queue-2.3}/tests/test_gi_m_1_calc.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/test_gi_m_n_calc.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/test_impatience.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/tests/test_m_d_n_calc.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/tests/test_m_h2_h2warm.py +3 -3
- {most_queue-2.2 → most_queue-2.3}/tests/test_m_ph_n_prty.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/test_mg1_calc.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/test_mg1_disaster.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/test_mg1_rcs.py +3 -3
- {most_queue-2.2 → most_queue-2.3}/tests/test_mg1_warmup.py +3 -3
- {most_queue-2.2 → most_queue-2.3}/tests/test_mgn_disaster.py +3 -3
- {most_queue-2.2 → most_queue-2.3}/tests/test_mgn_rcs.py +3 -3
- {most_queue-2.2 → most_queue-2.3}/tests/test_mgn_tt.py +3 -3
- {most_queue-2.2 → most_queue-2.3}/tests/test_mgn_with_h2_delay_cold_warm.py +3 -3
- {most_queue-2.2 → most_queue-2.3}/tests/test_mm2_3cls_prty_busy.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/tests/test_mmn_h2cold_h2warm.py +3 -3
- {most_queue-2.2 → most_queue-2.3}/tests/test_mmn_prty_busy_approx.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/tests/test_network_im_prty.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/test_network_no_prty.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/test_network_opt.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/test_qs_sim.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/tests/test_qs_sim_prty.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/units/test_busy_moments_calc.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/units/test_conditionals.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/units/test_h2_params_cv.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/tests/units/test_queue_types.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/units/test_tt_up_probs.py +2 -2
- {most_queue-2.2 → most_queue-2.3}/tests/units/test_weibull.py +1 -1
- most_queue-2.3/tutorials/m_h2_h2warm.ipynb +272 -0
- most_queue-2.3/tutorials/mgn_takahasi_takami.ipynb +252 -0
- {most_queue-2.2 → most_queue-2.3}/tutorials/network_with_priorities.ipynb +2 -2
- {most_queue-2.2 → most_queue-2.3}/tutorials/priority_queue.ipynb +3 -3
- {most_queue-2.2 → most_queue-2.3}/tutorials/queue_sim.ipynb +122 -53
- {most_queue-2.2 → most_queue-2.3}/works/negative_queues/work_mgn_negatives.py +5 -5
- {most_queue-2.2 → most_queue-2.3}/works/vacations/cooling_delay.py +1 -1
- {most_queue-2.2 → most_queue-2.3}/works/vacations/run_one_calc_vs_sim.py +2 -2
- most_queue-2.2/most_queue/sim/utils/distribution_utils.py +0 -222
- most_queue-2.2/most_queue/sim/utils/exceptions.py +0 -37
- most_queue-2.2/tutorials/m_h2_h2warm.ipynb +0 -310
- most_queue-2.2/tutorials/mgn_takahasi_takami.ipynb +0 -234
- {most_queue-2.2 → most_queue-2.3}/.gitignore +0 -0
- {most_queue-2.2 → most_queue-2.3}/.pre-commit-config.yaml +0 -0
- {most_queue-2.2 → most_queue-2.3}/LICENSE +0 -0
- {most_queue-2.2 → most_queue-2.3}/assets/1.gif +0 -0
- {most_queue-2.2 → most_queue-2.3}/assets/2.gif +0 -0
- {most_queue-2.2 → most_queue-2.3}/assets/3.gif +0 -0
- {most_queue-2.2 → most_queue-2.3}/assets/queue_long.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/deploy.txt +0 -0
- {most_queue-2.2 → most_queue-2.3}/docs/Makefile +0 -0
- {most_queue-2.2 → most_queue-2.3}/docs/make.bat +0 -0
- {most_queue-2.2 → most_queue-2.3}/docs/source/conf.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/docs/source/index.rst +0 -0
- {most_queue-2.2 → most_queue-2.3}/docs/source/modules.rst +0 -0
- {most_queue-2.2 → most_queue-2.3}/docs/source/most_queue.rst +0 -0
- {most_queue-2.2 → most_queue-2.3}/docs/source/most_queue.sim.rst +0 -0
- {most_queue-2.2 → most_queue-2.3}/docs/source/most_queue.theory.rst +0 -0
- {most_queue-2.2 → most_queue-2.3}/doctest-output/QS.gv +0 -0
- {most_queue-2.2 → most_queue-2.3}/googleb31d3dccb40f969f.html +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/__init__.py +0 -0
- {most_queue-2.2/most_queue/general → most_queue-2.3/most_queue/io}/plots.py +0 -0
- {most_queue-2.2/most_queue/general → most_queue-2.3/most_queue/io}/tables.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/misc/compare_fj_calc.py +0 -0
- /most_queue-2.2/most_queue/distr_utils/base_distribution.py → /most_queue-2.3/most_queue/random/utils/base.py +0 -0
- /most_queue-2.2/most_queue/distr_utils/distribution_params.py → /most_queue-2.3/most_queue/random/utils/params.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/batch.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/fork_join.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/networks/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/utils/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/utils/phase.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/utils/qs_queue.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/utils/stats_update.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/sim/utils/tasks.py +0 -0
- /most_queue-2.2/most_queue/general/results_structs.py → /most_queue-2.3/most_queue/structs.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/base_queue.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/batch/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/calc_params.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/closed/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/fifo/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/fork_join/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/impatience/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/negative/structs.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/networks/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/networks/network_viewer.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/networks/opt/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/networks/opt/transition.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/networks/opt/transition_approx.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/networks/opt/transition_plus.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/priority/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/priority/non_preemptive/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/priority/preemptive/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/r_example.gexf +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/binom_probs.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/conv.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/diff5dots.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/passage_time.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/residual.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/student_stat.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/utils/utilization_approx.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/most_queue/theory/vacations/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/requirements.txt +0 -0
- {most_queue-2.2 → most_queue-2.3}/tests/Dockerfile +0 -0
- {most_queue-2.2 → most_queue-2.3}/tests/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/tests/default_params.yaml +0 -0
- {most_queue-2.2 → most_queue-2.3}/tests/run.sh +0 -0
- {most_queue-2.2 → most_queue-2.3}/tests/units/h2_params_cv_greater_than_exp.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/tests/units/h2_params_cv_less_than_exp.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/tests/units/test_v1_on_channels.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/tests/units/test_v1_utlization_approx.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/tests/units/v1_on_channels.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/tests/units/v1_on_utilization_approx.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/negative_queues/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/negative_queues/base_parameters.yaml +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/__init__.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/base_parameters.yaml +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/channels.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/cooling.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/main.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling/cooling_probs_vs_cool_ave.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling/cooling_probs_vs_cool_cv.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling/w1_error_vs_cool_ave.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling/w1_error_vs_cool_cv.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling/w1_vs_cool_ave.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling/w1_vs_cool_cv.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling_delay/cooling_delay_probs_vs_cool_delay_ave.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling_delay/cooling_delay_probs_vs_cool_delay_cv.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling_delay/w1_error_vs_cool_delay_ave.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling_delay/w1_error_vs_cool_delay_cv.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling_delay/w1_vs_cool_delay_ave.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/cooling_delay/w1_vs_cool_delay_cv.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/parameters.yaml +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/w1_errors_vs_channels.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/w1_errors_vs_service_cv.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/w1_errors_vs_utilization.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/w1_vs_channels.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/w1_vs_service_cv.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/results/exp_2/w1_vs_utilization.png +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/service.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/utilization.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/utils.py +0 -0
- {most_queue-2.2 → most_queue-2.3}/works/vacations/warmup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: most_queue
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3
|
|
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>
|
|
@@ -50,31 +50,12 @@ A Python package for simulating and analyzing queueing systems (QS) and networks
|
|
|
50
50
|
---
|
|
51
51
|
### Most-Queue 2.0 Release Notes
|
|
52
52
|
|
|
53
|
-
New
|
|
53
|
+
1. New similar API for both simulation and calculation classes:
|
|
54
54
|
|
|
55
55
|
```python
|
|
56
|
-
|
|
57
|
-
from most_queue.general.tables import probs_print, times_print
|
|
58
|
-
from most_queue.rand_distribution import GammaDistribution
|
|
59
|
-
from most_queue.sim.base import QsSim
|
|
60
|
-
from most_queue.theory.fifo.mgn_takahasi import MGnCalc
|
|
56
|
+
# ... initialize NUM_OF_CHANNELS and other parameters ...
|
|
61
57
|
|
|
62
|
-
#
|
|
63
|
-
NUM_OF_CHANNELS = 3
|
|
64
|
-
|
|
65
|
-
ARRIVAL_RATE = 1.0
|
|
66
|
-
SERVICE_TIME_CV = 1.2
|
|
67
|
-
|
|
68
|
-
NUM_OF_JOBS = 300_000 # number of jobs to simulate
|
|
69
|
-
|
|
70
|
-
UTILIZATION_FACTOR = 0.7
|
|
71
|
-
|
|
72
|
-
# calc service time moments using gamma distribution fitting
|
|
73
|
-
b1 = NUM_OF_CHANNELS * UTILIZATION_FACTOR / ARRIVAL_RATE # average service time
|
|
74
|
-
b = gamma_moments_by_mean_and_cv(b1, SERVICE_TIME_CV)
|
|
75
|
-
gamma_params = GammaDistribution.get_params([b[0], b[1]]) # gamma distribution parameters
|
|
76
|
-
|
|
77
|
-
# run Takahasi-Takami calc method
|
|
58
|
+
# run calculation
|
|
78
59
|
tt = MGnCalc(n=NUM_OF_CHANNELS)
|
|
79
60
|
|
|
80
61
|
tt.set_sources(l=ARRIVAL_RATE)
|
|
@@ -90,18 +71,11 @@ qs.set_servers(gamma_params, "Gamma")
|
|
|
90
71
|
|
|
91
72
|
sim_results = qs.run(NUM_OF_JOBS)
|
|
92
73
|
|
|
93
|
-
print(f"Simulation duration: {sim_results.duration:.5f} sec")
|
|
94
|
-
print(f"Calculation duration: {calc_results.duration:.5f} sec")
|
|
95
|
-
|
|
96
|
-
probs_print(sim_results.p, calc_results.p, 10)
|
|
97
|
-
times_print(sim_results.v, calc_results.v, False)
|
|
98
|
-
times_print(sim_results.w, calc_results.w, True)
|
|
99
|
-
|
|
100
74
|
```
|
|
101
75
|
|
|
102
76
|
See more examples in [tests](https://github.com/xabarov/most-queue/blob/main/tests/) and [tutorials](https://github.com/xabarov/most-queue/tree/main/tutorials/) folders.
|
|
103
77
|
|
|
104
|
-
|
|
78
|
+
2. Refactored code for better readability and maintainability.
|
|
105
79
|
|
|
106
80
|
---
|
|
107
81
|
|
|
@@ -9,31 +9,12 @@ A Python package for simulating and analyzing queueing systems (QS) and networks
|
|
|
9
9
|
---
|
|
10
10
|
### Most-Queue 2.0 Release Notes
|
|
11
11
|
|
|
12
|
-
New
|
|
12
|
+
1. New similar API for both simulation and calculation classes:
|
|
13
13
|
|
|
14
14
|
```python
|
|
15
|
-
|
|
16
|
-
from most_queue.general.tables import probs_print, times_print
|
|
17
|
-
from most_queue.rand_distribution import GammaDistribution
|
|
18
|
-
from most_queue.sim.base import QsSim
|
|
19
|
-
from most_queue.theory.fifo.mgn_takahasi import MGnCalc
|
|
15
|
+
# ... initialize NUM_OF_CHANNELS and other parameters ...
|
|
20
16
|
|
|
21
|
-
#
|
|
22
|
-
NUM_OF_CHANNELS = 3
|
|
23
|
-
|
|
24
|
-
ARRIVAL_RATE = 1.0
|
|
25
|
-
SERVICE_TIME_CV = 1.2
|
|
26
|
-
|
|
27
|
-
NUM_OF_JOBS = 300_000 # number of jobs to simulate
|
|
28
|
-
|
|
29
|
-
UTILIZATION_FACTOR = 0.7
|
|
30
|
-
|
|
31
|
-
# calc service time moments using gamma distribution fitting
|
|
32
|
-
b1 = NUM_OF_CHANNELS * UTILIZATION_FACTOR / ARRIVAL_RATE # average service time
|
|
33
|
-
b = gamma_moments_by_mean_and_cv(b1, SERVICE_TIME_CV)
|
|
34
|
-
gamma_params = GammaDistribution.get_params([b[0], b[1]]) # gamma distribution parameters
|
|
35
|
-
|
|
36
|
-
# run Takahasi-Takami calc method
|
|
17
|
+
# run calculation
|
|
37
18
|
tt = MGnCalc(n=NUM_OF_CHANNELS)
|
|
38
19
|
|
|
39
20
|
tt.set_sources(l=ARRIVAL_RATE)
|
|
@@ -49,18 +30,11 @@ qs.set_servers(gamma_params, "Gamma")
|
|
|
49
30
|
|
|
50
31
|
sim_results = qs.run(NUM_OF_JOBS)
|
|
51
32
|
|
|
52
|
-
print(f"Simulation duration: {sim_results.duration:.5f} sec")
|
|
53
|
-
print(f"Calculation duration: {calc_results.duration:.5f} sec")
|
|
54
|
-
|
|
55
|
-
probs_print(sim_results.p, calc_results.p, 10)
|
|
56
|
-
times_print(sim_results.v, calc_results.v, False)
|
|
57
|
-
times_print(sim_results.w, calc_results.w, True)
|
|
58
|
-
|
|
59
33
|
```
|
|
60
34
|
|
|
61
35
|
See more examples in [tests](https://github.com/xabarov/most-queue/blob/main/tests/) and [tutorials](https://github.com/xabarov/most-queue/tree/main/tutorials/) folders.
|
|
62
36
|
|
|
63
|
-
|
|
37
|
+
2. Refactored code for better readability and maintainability.
|
|
64
38
|
|
|
65
39
|
---
|
|
66
40
|
|
|
File without changes
|
|
@@ -9,7 +9,7 @@ from functools import lru_cache
|
|
|
9
9
|
import numpy as np
|
|
10
10
|
from scipy.misc import derivative
|
|
11
11
|
|
|
12
|
-
from most_queue.distributions import H2Distribution, H2Params
|
|
12
|
+
from most_queue.random.distributions import H2Distribution, H2Params
|
|
13
13
|
from most_queue.theory.fifo.mgn_takahasi import MGnCalc, TakahashiTakamiParams
|
|
14
14
|
from most_queue.theory.utils.conv import conv_moments
|
|
15
15
|
from most_queue.theory.utils.transforms import lst_exp
|
|
@@ -5,7 +5,7 @@ Test summation of flows.
|
|
|
5
5
|
|
|
6
6
|
import matplotlib.pyplot as plt
|
|
7
7
|
|
|
8
|
-
from most_queue.distributions import GammaDistribution
|
|
8
|
+
from most_queue.random.distributions import GammaDistribution
|
|
9
9
|
from most_queue.sim.flow_sum import FlowSumSim
|
|
10
10
|
from most_queue.theory.utils.flow_sum import SummatorNumeric
|
|
11
11
|
|
|
@@ -8,7 +8,6 @@ import time
|
|
|
8
8
|
|
|
9
9
|
import numpy as np
|
|
10
10
|
|
|
11
|
-
from most_queue.distributions import GammaDistribution
|
|
12
11
|
from most_queue.misc.vacations_paper_utils import (
|
|
13
12
|
calc_moments_by_mean_and_cv,
|
|
14
13
|
dump_stat,
|
|
@@ -16,6 +15,7 @@ from most_queue.misc.vacations_paper_utils import (
|
|
|
16
15
|
make_plot,
|
|
17
16
|
print_table,
|
|
18
17
|
)
|
|
18
|
+
from most_queue.random.distributions import GammaDistribution
|
|
19
19
|
from most_queue.sim.vacations import VacationQueueingSystemSimulator
|
|
20
20
|
from most_queue.theory.vacations.mgn_with_h2_delay_cold_warm import (
|
|
21
21
|
MGnH2ServingColdWarmDelay,
|
|
@@ -7,8 +7,8 @@ import os
|
|
|
7
7
|
import numpy as np
|
|
8
8
|
import yaml
|
|
9
9
|
|
|
10
|
-
from most_queue.
|
|
11
|
-
from most_queue.
|
|
10
|
+
from most_queue.io.tables import times_print
|
|
11
|
+
from most_queue.random.distributions import GammaDistribution
|
|
12
12
|
from most_queue.sim.fork_join_delta import ForkJoinSimDelta
|
|
13
13
|
from most_queue.theory.fork_join.split_join import SplitJoinCalc
|
|
14
14
|
|
{most_queue-2.2/most_queue/misc → most_queue-2.3/most_queue/misc/tests}/test_network_opt_approx.py
RENAMED
|
@@ -4,7 +4,7 @@ Test the NetworkOptimizerWithApprox class.
|
|
|
4
4
|
|
|
5
5
|
import numpy as np
|
|
6
6
|
|
|
7
|
-
from most_queue.distributions import ExpDistribution
|
|
7
|
+
from most_queue.random.distributions import ExpDistribution
|
|
8
8
|
from most_queue.theory.networks.open_network import OpenNetworkCalc
|
|
9
9
|
from most_queue.theory.networks.opt.transition_approx import NetworkOptimizerWithApprox
|
|
10
10
|
|
{most_queue-2.2/most_queue/misc → most_queue-2.3/most_queue/misc/tests}/test_network_opt_plus.py
RENAMED
|
@@ -4,7 +4,7 @@ Test the NetworkOptimizerPlus class.
|
|
|
4
4
|
|
|
5
5
|
import numpy as np
|
|
6
6
|
|
|
7
|
-
from most_queue.distributions import ExpDistribution
|
|
7
|
+
from most_queue.random.distributions import ExpDistribution
|
|
8
8
|
from most_queue.theory.networks.open_network import OpenNetworkCalc
|
|
9
9
|
from most_queue.theory.networks.opt.transition_plus import NetworkOptimizerPlus, Strategy
|
|
10
10
|
|
|
File without changes
|
|
@@ -4,13 +4,16 @@ Random distributions for simulation.
|
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
import math
|
|
7
|
+
import os
|
|
7
8
|
|
|
8
9
|
import numpy as np
|
|
9
10
|
import scipy.special as sp
|
|
11
|
+
import yaml
|
|
12
|
+
from colorama import Fore, Style
|
|
10
13
|
from scipy import stats
|
|
11
14
|
|
|
12
|
-
from most_queue.
|
|
13
|
-
from most_queue.
|
|
15
|
+
from most_queue.random.utils.base import Distribution
|
|
16
|
+
from most_queue.random.utils.fit import (
|
|
14
17
|
FittingParams,
|
|
15
18
|
calc_gamma_func,
|
|
16
19
|
fit_cox,
|
|
@@ -23,7 +26,7 @@ from most_queue.distr_utils.distribution_fitting import (
|
|
|
23
26
|
fit_weibull,
|
|
24
27
|
gamma_moments_by_mean_and_cv,
|
|
25
28
|
)
|
|
26
|
-
from most_queue.
|
|
29
|
+
from most_queue.random.utils.params import (
|
|
27
30
|
Cox2Params,
|
|
28
31
|
ErlangParams,
|
|
29
32
|
GammaParams,
|
|
@@ -35,6 +38,41 @@ from most_queue.distr_utils.distribution_params import (
|
|
|
35
38
|
)
|
|
36
39
|
|
|
37
40
|
|
|
41
|
+
def print_supported_distributions():
|
|
42
|
+
"""Prints supported distributions loaded from a YAML file."""
|
|
43
|
+
print(f"{Fore.GREEN}Supported distributions:{Style.RESET_ALL}")
|
|
44
|
+
separator = f"{Fore.BLUE}{'-' * 80}{Style.RESET_ALL}"
|
|
45
|
+
|
|
46
|
+
dist_path = os.path.join(os.path.dirname(__file__), "distributions.yaml")
|
|
47
|
+
try:
|
|
48
|
+
with open(dist_path, "r", encoding="utf-8") as file:
|
|
49
|
+
distributions = yaml.safe_load(file)
|
|
50
|
+
except FileNotFoundError:
|
|
51
|
+
print(f"{Fore.RED}Error: distributions.yaml not found.{Style.RESET_ALL}")
|
|
52
|
+
return
|
|
53
|
+
except yaml.YAMLError as e:
|
|
54
|
+
print(f"{Fore.RED}Error parsing distributions.yaml: {e}{Style.RESET_ALL}")
|
|
55
|
+
return
|
|
56
|
+
|
|
57
|
+
header = (
|
|
58
|
+
f"{separator}\n"
|
|
59
|
+
f"{Fore.CYAN}Distribution{'-':20}"
|
|
60
|
+
f"{Fore.GREEN}Kendall notation{'-':15}"
|
|
61
|
+
f"{Fore.RED}Parameters{Style.RESET_ALL}\n"
|
|
62
|
+
f"{separator}"
|
|
63
|
+
)
|
|
64
|
+
print(header)
|
|
65
|
+
|
|
66
|
+
for dist in distributions:
|
|
67
|
+
name = dist.get("name", "N/A")
|
|
68
|
+
kendall = dist.get("kendall_notation", "N/A")
|
|
69
|
+
params = dist.get("params", "N/A")
|
|
70
|
+
print(f"{Fore.MAGENTA}{name:<38}" f"{Fore.GREEN}{kendall:<19}" f"{Fore.RED}{params}{Style.RESET_ALL}")
|
|
71
|
+
print(separator)
|
|
72
|
+
|
|
73
|
+
print(f"{Fore.BLUE}See params dataclasses in most_queue.random.utils.params {Style.RESET_ALL}")
|
|
74
|
+
|
|
75
|
+
|
|
38
76
|
class Weibull(Distribution):
|
|
39
77
|
"""
|
|
40
78
|
Class for working with the Weibull distribution
|
|
@@ -1022,3 +1060,7 @@ class GammaDistribution(Distribution):
|
|
|
1022
1060
|
gamma = sp.gamma(x)
|
|
1023
1061
|
fraction = -math.pi / (x * math.sin(math.pi * x))
|
|
1024
1062
|
return fraction / gamma
|
|
1063
|
+
|
|
1064
|
+
|
|
1065
|
+
if __name__ == "__main__":
|
|
1066
|
+
print_supported_distributions()
|
|
@@ -6,19 +6,22 @@
|
|
|
6
6
|
params: H2Params dataclass
|
|
7
7
|
- name: Erlang
|
|
8
8
|
kendall_notation: E
|
|
9
|
-
params:
|
|
9
|
+
params: ErlangParams dataclass
|
|
10
10
|
- name: Cox 2nd order
|
|
11
11
|
kendall_notation: C
|
|
12
12
|
params: Cox2Params dataclass
|
|
13
13
|
- name: Pareto
|
|
14
14
|
kendall_notation: Pa
|
|
15
|
-
params:
|
|
15
|
+
params: ParetoParams dataclass
|
|
16
|
+
- name: Gamma
|
|
17
|
+
kendall_notation: G
|
|
18
|
+
params: GammaParams dataclass
|
|
16
19
|
- name: Deterministic
|
|
17
20
|
kendall_notation: D
|
|
18
21
|
params: b
|
|
19
22
|
- name: Uniform
|
|
20
23
|
kendall_notation: Uniform
|
|
21
|
-
params:
|
|
24
|
+
params: UniformParams dataclass
|
|
22
25
|
- name: Gaussian
|
|
23
26
|
kendall_notation: Norm
|
|
24
|
-
params:
|
|
27
|
+
params: GaussianParams dataclass
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Utils for distribution from random_distributions
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from most_queue.random.distributions import (
|
|
7
|
+
CoxDistribution,
|
|
8
|
+
DeterministicDistribution,
|
|
9
|
+
ErlangDistribution,
|
|
10
|
+
ExpDistribution,
|
|
11
|
+
GammaDistribution,
|
|
12
|
+
H2Distribution,
|
|
13
|
+
NormalDistribution,
|
|
14
|
+
ParetoDistribution,
|
|
15
|
+
UniformDistribution,
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def create_distribution(params, kendall_notation: str, generator):
|
|
20
|
+
"""Creates distribution from random_distributions
|
|
21
|
+
|
|
22
|
+
--------------------------------------------------------------------
|
|
23
|
+
Distribution kendall_notation params
|
|
24
|
+
--------------------------------------------------------------------
|
|
25
|
+
Exponential 'М' [mu]
|
|
26
|
+
Hyperexponential of the 2nd order 'Н' H2Params dataclass
|
|
27
|
+
Erlang 'E' [r, mu]
|
|
28
|
+
Cox 2nd order 'C' Cox2Params dataclass
|
|
29
|
+
Pareto 'Pa' [alpha, K]
|
|
30
|
+
Deterministic 'D' [b]
|
|
31
|
+
Uniform 'Uniform' [mean, half_interval]
|
|
32
|
+
Gaussian 'Norm' [mean, standard_deviation]
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
params (_type_): params of distribution.
|
|
36
|
+
For "M": one single value "mu".
|
|
37
|
+
For "H": H2Params
|
|
38
|
+
kendall_notation (str): like "M", "H", "E"
|
|
39
|
+
generator (_type_): random numbers generator, for ex np.random.default_rng()
|
|
40
|
+
|
|
41
|
+
Raises:
|
|
42
|
+
QsSourseSettingException: Incorrect distribution type specified
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
_type_: distribution from random_distributions
|
|
46
|
+
"""
|
|
47
|
+
dist = None
|
|
48
|
+
if kendall_notation == "M":
|
|
49
|
+
dist = ExpDistribution(params, generator=generator)
|
|
50
|
+
elif kendall_notation == "H":
|
|
51
|
+
dist = H2Distribution(params, generator=generator)
|
|
52
|
+
elif kendall_notation == "E":
|
|
53
|
+
dist = ErlangDistribution(params, generator=generator)
|
|
54
|
+
elif kendall_notation == "Gamma":
|
|
55
|
+
dist = GammaDistribution(params, generator=generator)
|
|
56
|
+
elif kendall_notation == "C":
|
|
57
|
+
dist = CoxDistribution(params, generator=generator)
|
|
58
|
+
elif kendall_notation == "Pa":
|
|
59
|
+
dist = ParetoDistribution(params, generator=generator)
|
|
60
|
+
elif kendall_notation == "Uniform":
|
|
61
|
+
dist = UniformDistribution(params, generator=generator)
|
|
62
|
+
elif kendall_notation == "Norm":
|
|
63
|
+
dist = NormalDistribution(params, generator=generator)
|
|
64
|
+
elif kendall_notation == "D":
|
|
65
|
+
dist = DeterministicDistribution(params)
|
|
66
|
+
else:
|
|
67
|
+
raise ValueError(
|
|
68
|
+
"Incorrect distribution type specified. See most_queue.random.distributions.print_supported_distributions() for list of supported distributions"
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
return dist
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Calculates the utilization (load factor) of the QS
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def calc_qs_load(source_kendall_notation: str, source_params, server_kendall_notation: str, server_params, n) -> float:
|
|
7
|
+
"""Calculates the utilization (load factor) of the QS
|
|
8
|
+
|
|
9
|
+
Args:
|
|
10
|
+
source_kendall_notation: str, Kendall notation of source
|
|
11
|
+
server_kendall_notation: str, Kendall notation of source
|
|
12
|
+
n (int): number of QS channels
|
|
13
|
+
|
|
14
|
+
Returns:
|
|
15
|
+
float: utilization (load factor) of the QS
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
l = 0
|
|
19
|
+
if source_kendall_notation == "M":
|
|
20
|
+
l = source_params
|
|
21
|
+
elif source_kendall_notation == "D":
|
|
22
|
+
l = 1.00 / source_params
|
|
23
|
+
elif source_kendall_notation == "Uniform":
|
|
24
|
+
l = 1.00 / source_params.mean
|
|
25
|
+
elif source_kendall_notation == "H":
|
|
26
|
+
y1 = source_params.p1
|
|
27
|
+
y2 = 1.0 - y1
|
|
28
|
+
mu1 = source_params.mu1
|
|
29
|
+
mu2 = source_params.mu2
|
|
30
|
+
|
|
31
|
+
f1 = y1 / mu1 + y2 / mu2
|
|
32
|
+
l = 1.0 / f1
|
|
33
|
+
|
|
34
|
+
elif source_kendall_notation == "E":
|
|
35
|
+
r = source_params.r
|
|
36
|
+
mu = source_params.mu
|
|
37
|
+
l = mu / r
|
|
38
|
+
|
|
39
|
+
elif source_kendall_notation == "Gamma":
|
|
40
|
+
mu = source_params.mu
|
|
41
|
+
alpha = source_params.alpha
|
|
42
|
+
l = mu / alpha
|
|
43
|
+
|
|
44
|
+
elif source_kendall_notation == "C":
|
|
45
|
+
y1 = source_params.p1
|
|
46
|
+
y2 = 1.0 - y1
|
|
47
|
+
mu1 = source_params.mu1
|
|
48
|
+
mu2 = source_params.mu2
|
|
49
|
+
|
|
50
|
+
f1 = y2 / mu1 + y1 * (1.0 / mu1 + 1.0 / mu2)
|
|
51
|
+
l = 1.0 / f1
|
|
52
|
+
elif source_kendall_notation == "Pa":
|
|
53
|
+
if source_params[0] < 1:
|
|
54
|
+
return None
|
|
55
|
+
|
|
56
|
+
a = source_params.alpha
|
|
57
|
+
k = source_params.K
|
|
58
|
+
f1 = a * k / (a - 1)
|
|
59
|
+
l = 1.0 / f1
|
|
60
|
+
|
|
61
|
+
b1 = 0
|
|
62
|
+
if server_kendall_notation == "M":
|
|
63
|
+
mu = server_params
|
|
64
|
+
b1 = 1.0 / mu
|
|
65
|
+
elif server_kendall_notation == "D":
|
|
66
|
+
b1 = server_params
|
|
67
|
+
elif server_kendall_notation == "Uniform":
|
|
68
|
+
b1 = server_params.mean
|
|
69
|
+
|
|
70
|
+
elif server_kendall_notation == "H":
|
|
71
|
+
y1 = server_params.p1
|
|
72
|
+
y2 = 1.0 - y1
|
|
73
|
+
mu1 = server_params.mu1
|
|
74
|
+
mu2 = server_params.mu2
|
|
75
|
+
|
|
76
|
+
b1 = y1 / mu1 + y2 / mu2
|
|
77
|
+
|
|
78
|
+
elif server_kendall_notation == "Gamma":
|
|
79
|
+
mu = server_params.mu
|
|
80
|
+
alpha = server_params.alpha
|
|
81
|
+
b1 = alpha / mu
|
|
82
|
+
|
|
83
|
+
elif server_kendall_notation == "E":
|
|
84
|
+
r = server_params.r
|
|
85
|
+
mu = server_params.mu
|
|
86
|
+
b1 = r / mu
|
|
87
|
+
|
|
88
|
+
elif server_kendall_notation == "C":
|
|
89
|
+
y1 = server_params.p1
|
|
90
|
+
y2 = 1.0 - y1
|
|
91
|
+
mu1 = server_params.mu1
|
|
92
|
+
mu2 = server_params.mu2
|
|
93
|
+
|
|
94
|
+
b1 = y2 / mu1 + y1 * (1.0 / mu1 + 1.0 / mu2)
|
|
95
|
+
elif server_kendall_notation == "Pa":
|
|
96
|
+
a = server_params.alpha
|
|
97
|
+
k = server_params.K
|
|
98
|
+
b1 = a * k / (a - 1)
|
|
99
|
+
|
|
100
|
+
return l * b1 / n
|
|
@@ -8,13 +8,13 @@ import numpy as np
|
|
|
8
8
|
from colorama import Fore, Style, init
|
|
9
9
|
from tqdm import tqdm
|
|
10
10
|
|
|
11
|
-
from most_queue.
|
|
12
|
-
from most_queue.
|
|
13
|
-
from most_queue.sim.utils.exceptions import QsWrongQueueTypeException
|
|
11
|
+
from most_queue.random.utils.create import create_distribution
|
|
12
|
+
from most_queue.random.utils.load import calc_qs_load
|
|
14
13
|
from most_queue.sim.utils.qs_queue import QsQueueDeque, QsQueueList
|
|
15
14
|
from most_queue.sim.utils.servers import Server
|
|
16
15
|
from most_queue.sim.utils.stats_update import refresh_moments_stat
|
|
17
16
|
from most_queue.sim.utils.tasks import Task
|
|
17
|
+
from most_queue.structs import QueueResults
|
|
18
18
|
|
|
19
19
|
init()
|
|
20
20
|
|
|
@@ -69,7 +69,7 @@ class QsSim:
|
|
|
69
69
|
elif buffer_type == "deque":
|
|
70
70
|
self.queue = QsQueueDeque()
|
|
71
71
|
else:
|
|
72
|
-
raise
|
|
72
|
+
raise ValueError("Unknown queue type")
|
|
73
73
|
|
|
74
74
|
self.servers = [] # service channels, list of Server's
|
|
75
75
|
|
|
@@ -5,8 +5,8 @@ Simulating a queueing system with finite number of sources.
|
|
|
5
5
|
import numpy as np
|
|
6
6
|
from colorama import Fore, Style, init
|
|
7
7
|
|
|
8
|
+
from most_queue.random.utils.create import create_distribution
|
|
8
9
|
from most_queue.sim.base import QsSim, Task
|
|
9
|
-
from most_queue.sim.utils.distribution_utils import create_distribution
|
|
10
10
|
|
|
11
11
|
init()
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@ ForkJoin Queue with delta
|
|
|
4
4
|
|
|
5
5
|
from colorama import Fore, Style, init
|
|
6
6
|
|
|
7
|
-
from most_queue.distributions import GammaDistribution
|
|
7
|
+
from most_queue.random.distributions import GammaDistribution
|
|
8
8
|
from most_queue.sim.fork_join import ForkJoinSim
|
|
9
9
|
from most_queue.sim.utils.tasks import ForkJoinTask
|
|
10
10
|
from most_queue.theory.utils.conv import get_self_conv_moments
|
|
@@ -4,8 +4,8 @@ Simulation model for queueing systems with impatient tasks
|
|
|
4
4
|
|
|
5
5
|
from colorama import Fore, Style, init
|
|
6
6
|
|
|
7
|
+
from most_queue.random.utils.create import create_distribution
|
|
7
8
|
from most_queue.sim.base import QsSim
|
|
8
|
-
from most_queue.sim.utils.distribution_utils import create_distribution
|
|
9
9
|
from most_queue.sim.utils.tasks import ImpatientTask
|
|
10
10
|
|
|
11
11
|
init()
|
|
@@ -7,10 +7,11 @@ from enum import Enum
|
|
|
7
7
|
|
|
8
8
|
import numpy as np
|
|
9
9
|
|
|
10
|
-
from most_queue.
|
|
10
|
+
from most_queue.random.utils.create import create_distribution
|
|
11
|
+
from most_queue.random.utils.load import calc_qs_load
|
|
11
12
|
from most_queue.sim.base import QsSim
|
|
12
|
-
from most_queue.sim.utils.distribution_utils import calc_qs_load, create_distribution
|
|
13
13
|
from most_queue.sim.utils.stats_update import refresh_moments_stat
|
|
14
|
+
from most_queue.structs import NegativeArrivalsResults
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class NegativeServiceType(Enum):
|
|
@@ -4,7 +4,7 @@ Base class for queueing networks simulation
|
|
|
4
4
|
|
|
5
5
|
from abc import ABC, abstractmethod
|
|
6
6
|
|
|
7
|
-
from most_queue.
|
|
7
|
+
from most_queue.structs import NetworkResults, NetworkResultsPriority
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class BaseSimNetwork(ABC):
|
|
@@ -9,7 +9,7 @@ import numpy as np
|
|
|
9
9
|
from colorama import Fore, init
|
|
10
10
|
from tqdm import tqdm
|
|
11
11
|
|
|
12
|
-
from most_queue.distributions import ExpDistribution
|
|
12
|
+
from most_queue.random.distributions import ExpDistribution
|
|
13
13
|
from most_queue.sim.base import QsSim
|
|
14
14
|
from most_queue.sim.networks.base_network_sim import BaseSimNetwork, NetworkResults
|
|
15
15
|
from most_queue.sim.utils.tasks import Task
|
|
@@ -9,7 +9,7 @@ import numpy as np
|
|
|
9
9
|
from colorama import Fore, init
|
|
10
10
|
from tqdm import tqdm
|
|
11
11
|
|
|
12
|
-
from most_queue.distributions import ExpDistribution
|
|
12
|
+
from most_queue.random.distributions import ExpDistribution
|
|
13
13
|
from most_queue.sim.networks.base_network_sim import (
|
|
14
14
|
BaseSimNetworkPriority,
|
|
15
15
|
NetworkResultsPriority,
|
|
@@ -9,10 +9,10 @@ import numpy as np
|
|
|
9
9
|
from colorama import Fore, Style, init
|
|
10
10
|
from tqdm import tqdm
|
|
11
11
|
|
|
12
|
-
from most_queue.
|
|
13
|
-
from most_queue.sim.utils.distribution_utils import create_distribution
|
|
12
|
+
from most_queue.random.utils.create import create_distribution
|
|
14
13
|
from most_queue.sim.utils.servers import ServerPriority
|
|
15
14
|
from most_queue.sim.utils.tasks import TaskPriority
|
|
15
|
+
from most_queue.structs import PriorityResults
|
|
16
16
|
|
|
17
17
|
init()
|
|
18
18
|
|
|
@@ -4,7 +4,7 @@ QS channels or servers
|
|
|
4
4
|
|
|
5
5
|
from colorama import Fore, Style
|
|
6
6
|
|
|
7
|
-
from most_queue.distributions import (
|
|
7
|
+
from most_queue.random.distributions import (
|
|
8
8
|
CoxDistribution,
|
|
9
9
|
ErlangDistribution,
|
|
10
10
|
ExpDistribution,
|
|
@@ -13,7 +13,7 @@ from most_queue.distributions import (
|
|
|
13
13
|
NormalDistribution,
|
|
14
14
|
ParetoDistribution,
|
|
15
15
|
)
|
|
16
|
-
from most_queue.
|
|
16
|
+
from most_queue.random.utils.create import create_distribution
|
|
17
17
|
from most_queue.sim.utils.phase import QsPhase
|
|
18
18
|
from most_queue.sim.utils.tasks import Task
|
|
19
19
|
from most_queue.theory.utils.conv import conv_moments
|