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

Develope RandomVariables library under O2DESNet #2

Open
li-haobin opened this issue May 1, 2020 · 0 comments
Open

Develope RandomVariables library under O2DESNet #2

li-haobin opened this issue May 1, 2020 · 0 comments

Comments

@li-haobin
Copy link
Owner

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.

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