Random
A Random Operator (beOpRandom) is used to randomly select one connection among several connections. A weight can be allocated for each connection.
The order in which connections are added is not relevant. When the Random Operator is evaluated, a random selection is then performed among connections, according to their weight.
Notice that the random selection is influenced by the random seed of the Crowd Manager.
Each connections, can be switched off by clicking on the arrow of the link.
Creation
- Behavior Editor / Behavior Library:
- Golaem Menu: Crowd Behaviors / Operators / CrowdBeO pRandom Node
- MEL command: glmCrowdBeOpRandomCmd;
Configuration
Random Attributes
Weight |
Configure an existing connection, by changing:
|
Add | Create a new connection between the Random Operator and a given Behavior (this Behavior must be a child of the parent Behavior Container). A new entry "Weight" is then added in the Random Attributes, allowing to configure the weight associated to the connection (default value is set to 1.0). |
Example
The following example describes an alternative selection between 3 Motion Behaviors (with weight values set up as shown in the Random Attributes description).
When the Random Operator is reached, each connections will be taken into account for random selection depends on their weight.