The Entity Generator block generates entities. You can control when the entities are created, the total number of entities created, and how many entities are created simultaneously.
After an entity is created, the Entity Generator block attempts to send the new entity out the OutEntity port. If this fails, it then tries to push the entity out the OutBalk port. If this also fails, the entity is destroyed and a message is sent to the Tracer.
Multiple entities can be generated every time an entity creation event occurs in an Entity Generator block. The number of entities to create at an entity creation event is referred to as the batch size. When the Entity Generator block is preparing to schedule an entity creation event, it attempts to pull a value from its BatchSize port and associate this value with the entity creation event. (If nothing is connected to the BatchSize port, it uses a default batch size of 1.) When the entity creation event occurs in the Entity Generator block, the Entity Generator block creates the number of entities specified by the associated batch size value (within the constraints of the maximum limits described in the next paragraph). All entities are sent out individually either through the OutEntity port or the OutBalk port.
You can specify the maximum number of entities that the Entity Generator block can generate in addition to the maximum number of batches. The Entity Generator block stops creating entities whenever either of these limits is reached. Fields are also provided to set the start and end time (in terms of the simulation clock) for controlling the duration of operation of the block.
The Boolean Signal port can be used to initiate entity creation as well. When a true value arrives at the Signal port, the Entity Generator block pulls values from its InterArrivalTime and BatchSize ports and schedules an entity creation event.
You can use the Entity Types dialog box to specify the types of entities the Entity Generator block can create. To open the Entity Types dialog box, right-click in the Project Explorer window and select Entity Types. You can enter default values for any of the editable entity attribute fields (indicated by a check in the Editable column) in the Entity Types dialog box.
Input numeric port for how long to wait before the next entity creation event.
Input integer port for how many entities to create at the next entity creation event.
Input Boolean port that schedules an entity creation event (when true is passed in).
Output entity port for entities that can be accepted by a downstream block.
Output entity port for entities that cannot leave using the OutEntity port.
The Maximum Number of Entities field specifies the maximum number of entities this Entity Generator block is permitted to generate. Selecting the Infinite check box supersedes the value of the Maximum Number of Entities field. Similarly, the Maximum Number of Batches field specifies the maximum number of batches of entities this Entity Generator block is permitted to generate. Selecting the Infinite check box supersedes the value of the Maximum Number of Batches field. By default, both Infinite check boxes are checked. If both the Maximum Number of Entities field and the Maximum Number of Batches field contain valid values, the Entity Generator block stops creating new entities as soon as either of the criteria has been met.
The Start Time field designates the simulation time at which the first entity is generated by this Entity Generator block. This value must be greater than or equal to 0. The default Start Time is 0. Similarly, the End Time field specifies the simulation time when no more entities can be generated by the Entity Generator block. The End Time must be greater than or equal to the Start Time. Selecting the Infinite check box supersedes the value of the End Time field.
Specifies when the first entity is created by the Entity Generator block. Select At Start Time to cause the first entity to be created at the time specified in the Start Time field. This is the default selection. If you select At First Interarrival Time, then at Start Time the Entity Generator block pulls the first interarrival time value from the InterArrivalTime port and schedules the first entity to be created at that time. The pulled value determines how long the Entity Generator block waits before generating the first entity. (Whenever the interarrival time value is not a number, the simulation terminates. If the value is a number less than 0, the Entity Generator block logs a warning and uses a value of 0.) If you select After Signal Arrival, the Entity Generator block waits until a true value arrives at the Signal port before scheduling the first entity creation.
If you check this check box, after the Entity Generator block has created a new entity and pushed it downstream it automatically pulls a value from its InterArrivalTime port and uses this value to schedule the generation of the next entity creation. If you clear this check box, future entity creation events can be scheduled only by using the Signal port. By default, this check box is checked.
Specifies the name of the EntityType used for entity creation.
Displays the default attributes associated with the selected EntityType. You can set the default value for editable entity attributes directly in the table.
StartTime (double), EndTime (double), MaxEntities (integer), MaxBatches (integer), RankValue (double)
None