NodeRandomizer

Parent Previous Next

Interfaces and Buses / Wireless_Sensor / Block /  NodeRandomizer
Block Name: NodeRandomizer


This actor, when fired, randomizes the locations of all actors in the same container that contain an attribute named "randomize" with value true. It can also optionally perform the randomization in its preinitialize() method. In both cases, the randomization is performed in a change request, so it will take effect after the current iteration.

This actor assumes that the location is represented in an object of class Locatable (which is an attribute that implements Settable) with name "_location". This is how ModelBuilder represents locations.

The range parameter is an array of arrays giving the range of possible values for each dimension of the location. For example, if the location is in two dimensions, then range has the form {{x1, x2}, {y1, y2}}, indicating that the X value of the location is uniformly distributed between x1 and x2, and that the Y value is uniformly distributed between y1 and y2.


 

Field Detail

randomizeInPreinitialize

public VisualSim.data.expr.Parameter randomizeInPreinitialize


range

public VisualSim.data.expr.Parameter range


seed

public VisualSim.data.expr.Parameter seed


trigger

public VisualSim.actor.TypedIOPort trigger



Created with the Personal Edition of HelpNDoc: Create HTML Help, DOC, PDF and print manuals from 1 single source