Skip to content

Develop random variables library under O2DESNet #7

@datou103

Description

@datou103

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions