vcProductCreatorDistributionMode

vcProductCreatorDistributionMode allows you to define the probability of feeding one or more types of products when a vcProductCreator object uses a FeedMode of Distribution. A distribution feed mode uses entries. Each entry is a vcDistributionModeProductLineEntry object that defines a product type and weighted probability.

 

Properties

Name Type Access Description
Interval Expression (real) RW

Time to wait in seconds between creating products.

Note: Pseudo-random real number generated by an expression that defines a distribution.

normal([stream], u, s)
Normal distribution for mean value u and standard deviation s with an optional stream for seeding a random value to generator.

exponential([stream], lambda)
Exponential distribution where mean value is 1/lambda and variance is 1/lambda^2 with an optional stream for seeding a random value to generator.

gamma([stream], k, theta)
Gamma distribution with shape k and scale theta with an optional stream for seeding a random value to generator.

lognormal([stream], u, s)
Log normal distribution for mean value u and standard deviation s with an optional stream for seeding a random value to generator.

triangular([stream], min, mode, max)
Triangular distribution for given min, mode and max values with an optional stream for seeding a random value to generator.

uniform([stream], a, b)
Uniform distribution in range a <= x < b with an optional stream for seeding a random value to generator.

weibull([stream], k, lambda)
Weibull distribution with shape k and scale lambda with an optional stream for seeding a random value to generator.

Limit

Integer

RW

Number of products to create. Must be 0 or greater.

ProductEntries List of vcDistributionModeProductLineEntry R

List of all currently defined entries.

 

RandomStream Integer RW Index of the pseudo-random number generator to use when picking the next product type to instantiate. Must be in inclusive range 0-63.

Methods

Name Return Type Parameters Description
addProductEntry vcDistributionModeProductLineEntry vcProductType productType, Real probability Adds a new entry to the distribution mode configuration based on the given productType and probability.   Notes:
  • The productType must not be None.
  • The probability must be greater than or equal to zero.
  • Having more than one entry with same vcProductType is allowed but not recommended.

getProperty

vcProperty String name Returns a property matching a given name; otherwise returns None.
removeProductEntry None vcDistributionModeProductLineEntry entry Deletes the given entry from this configuration.  

Events

Name Parameters Description
OnProductEntriesChanged

vcProductCreatorDistributionMode source

Triggered when the ProductEntries collection content has changed.