Skip to content

Commit 4c87465

Browse files
committed
changing api per ArrivalsGenerator and implementing distrib for ArrivalRuntime
1 parent d38d927 commit 4c87465

7 files changed

Lines changed: 804 additions & 301 deletions

File tree

examples/builder_input/event_injection/lb_two_servers.ipynb

Lines changed: 403 additions & 0 deletions
Large diffs are not rendered by default.

examples/builder_input/event_injection/lb_two_servers.py

Lines changed: 0 additions & 240 deletions
This file was deleted.

src/asyncflow/config/constants.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,21 @@ class Distribution(StrEnum):
4646
"""
4747

4848
POISSON = "poisson"
49-
NORMAL = "normal"
5049
LOG_NORMAL = "log_normal"
5150
EXPONENTIAL = "exponential"
5251
UNIFORM = "uniform"
52+
EMPIRICAL = "empirical"
53+
WEIBULL = "weibull"
54+
PARETO = "pareto"
55+
ERLANG = "erlang"
56+
DETERMINISTIC = "deterministic"
57+
58+
class VariabilityLevel(StrEnum):
59+
"""Wrapper to define three level of fluctuations"""
60+
61+
LOW = "low"
62+
MEDIUM = "medium"
63+
HIGH = "high"
5364

5465
# ======================================================================
5566
# CONSTANTS FOR ENDPOINT STEP DEFINITION (REQUEST-HANDLER)

src/asyncflow/runtime/actors/rqs_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _requests_generator(self) -> Generator[float, None, None]:
7979
dist = self.rqs_generator_data.avg_active_users.distribution
8080

8181
if dist == Distribution.NORMAL:
82-
#Gaussian-Poisson model
82+
# Gaussian-Poisson model
8383
return gaussian_poisson_sampling(
8484
input_data=self.rqs_generator_data,
8585
sim_settings=self.sim_settings,

0 commit comments

Comments
 (0)