Skip to content

Latest commit

 

History

History
83 lines (47 loc) · 5.53 KB

File metadata and controls

83 lines (47 loc) · 5.53 KB
graph LR
    Sampler_Dispatcher["Sampler Dispatcher"]
    Truncated_Gaussian_Sampler["Truncated Gaussian Sampler"]
    Exponential_Sampler["Exponential Sampler"]
    Uniform_Sampler["Uniform Sampler"]
    Lognormal_Sampler["Lognormal Sampler"]
    Poisson_Sampler["Poisson Sampler"]
    Sampler_Dispatcher -- "delegates to" --> Truncated_Gaussian_Sampler
    Sampler_Dispatcher -- "delegates to" --> Exponential_Sampler
    Sampler_Dispatcher -- "delegates to" --> Uniform_Sampler
    Sampler_Dispatcher -- "delegates to" --> Lognormal_Sampler
    Sampler_Dispatcher -- "delegates to" --> Poisson_Sampler
    Truncated_Gaussian_Sampler -- "is invoked by" --> Sampler_Dispatcher
    Exponential_Sampler -- "is invoked by" --> Sampler_Dispatcher
    Uniform_Sampler -- "is invoked by" --> Sampler_Dispatcher
    Lognormal_Sampler -- "is invoked by" --> Sampler_Dispatcher
    Poisson_Sampler -- "is invoked by" --> Sampler_Dispatcher
Loading

CodeBoardingDemoContact

Details

The asyncflow.samplers subsystem is designed to provide a flexible and extensible mechanism for generating random variables with various statistical distributions. The central component, the Sampler Dispatcher, implemented by the general_sampler function, serves as a unified interface for all random variable generation requests. It abstracts the complexity of selecting and invoking specific distribution generators by accepting a configuration object (RVConfig). Based on this configuration, the Sampler Dispatcher dynamically delegates the actual random number generation to specialized components such as the Truncated Gaussian Sampler, Exponential Sampler, Uniform Sampler, Lognormal Sampler, and Poisson Sampler. Each of these specialized components is responsible for generating random numbers according to its specific distribution, ensuring accurate and efficient simulation modeling. This modular design facilitates the easy integration of new distribution types without requiring modifications to the core dispatching logic, thereby enhancing the system's maintainability and scalability.

Sampler Dispatcher

Acts as the central entry point and unified interface for all random variable generation requests. It abstracts the complexity of selecting and invoking specific distribution generators, providing a clean API for the rest of the simulation system.

Related Classes/Methods:

Truncated Gaussian Sampler

Specializes in generating random numbers that follow a truncated Gaussian distribution, allowing for the modeling of variables with defined upper and lower bounds, crucial for realistic simulations where values cannot be infinite.

Related Classes/Methods:

Exponential Sampler

Responsible for generating random numbers according to an exponential distribution, which is widely used in discrete-event simulations to model inter-arrival times of requests or service durations due to its memoryless property.

Related Classes/Methods:

Uniform Sampler

Generates random numbers from a uniform distribution, suitable for scenarios where every outcome within a specified range has an equal probability, useful for simple, unbiased random selections or durations.

Related Classes/Methods:

Lognormal Sampler

Provides random numbers following a log-normal distribution, frequently employed to model positively skewed quantities such as task execution times, file sizes, or network latencies, which are common in distributed systems.

Related Classes/Methods:

Poisson Sampler

Generates random numbers based on a Poisson distribution, primarily used for modeling the number of events occurring within a fixed interval of time or space, such as the number of requests arriving per second.

Related Classes/Methods: