Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop random variables library under O2DESNet #7

Open
datou103 opened this issue Jun 4, 2020 · 0 comments
Open

Develop random variables library under O2DESNet #7

datou103 opened this issue Jun 4, 2020 · 0 comments
Assignees

Comments

@datou103
Copy link
Collaborator

datou103 commented Jun 4, 2020

Currently, random generator is using O2DESNet.Distributions. Each distribution is implemented as a static class, and sampling is done through .Sample(random stream, parameters).
This causes some difficulties in modeling the static components of simulation models, as we need several properties to define parameters of distribution and they are subject to change if underlying distribution changes.

A better practice is to have an abstract random variable class with a virtual method of Sample(). We can implement different distributions to extend the abstract class. In such a case, the parameter can be encapsulated in the class, and the type of random distribution is separated out from simulation dynamics, rather, as the static properties in the configuration.

For those distributions with multiple ways of specifying its parameters, we need to implement setter functions explicitly to allow conversions.

@datou103 datou103 self-assigned this Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant