RankValue

Some blocks in Simulation Studio schedule events in the application’s event queue. For example, an Entity Generator block schedules when to generate its next entity, and a Server block schedules when service will be completed for an entity it is holding. Events are placed in the event queue based on the time the event is scheduled to occur. It is possible for different blocks to schedule events to occur at exactly the same simulation time, resulting in an event scheduling tie.

If an event is put in the event queue with the same scheduled time as an event already in the event queue, the relative order in which those events actually occur is unpredictable, although reproducible. To address this potential event timing issue, some blocks provide a RankValue property or factor. The RankValue property of a block is an integer value that can be used to resolve ties for events that are scheduled in the application’s event queue. For events scheduled to occur at the same simulation time, the event associated with a higher RankValue value is given precedence over an event with a lower RankValue value. You can set the RankValue property of a specific block in your model at run time by including it as a factor in an Experiment window and assigning the desired value in the Experiment window. (See Chapter 5: Experiments, for details about experiments and factors.)

The following blocks support a RankValue property: Delay, Entity Generator, Queue, Server, and Resource Scheduler. Most blocks use the value 0 for their default RankValue value. The Resource Scheduler block, however, uses the largest positive integer value in the system to have the highest priority available.