The Server block models a resource used by an entity for a specified period of time. An entity can enter a Server block only when the Server block is not busy. A Server block is deemed busy if all of its capacity is being used to service entities. After an entity enters the Server block, the Server block pulls a value from its InServiceTime port. If the service time value is not a number, the simulation terminates. If the value is less than 0, the Server block logs a warning and uses a value of 0. The entity is held for the duration of the service time and then released through the OutEntity port.
The InCapacity port can be used to set the capacity for a Server block. This value represents the number of entities the Server can service simultaneously. Valid incoming values for this port are integers in the range of 0 to 2,147,483,647. During simulation execution, an integer value can be pushed through the InCapacity port to dynamically change the capacity. If the value from the port is less than the currently busy capacity, the capacity reduction request will be deferred and accommodated as entities finish service and leave the Server block. Entities will not be balked or preempted in this case.
Entities in Simulation Studio are hierarchical. That is, entities can hold other entities. The term controlling entity denotes an entity that holds other entities, and the term root entity denotes an entity that is not held by another entity. Each entity held by another entity has one root entity associated with it. The root entity for any held entity is found by traversing up the entity hierarchy from the held entity.
Entities being held by a Server block can be preempted either by input to the block’s InPreempt port or by a scheduled resource entity event. In order for a root entity that is held by a Server block to be preempted, the OutPreempt port (or OutBalk port) must have at least one link attached to it. Similarly, for a resource entity that is held by a controlling entity that is in turn held by the Server block to be preempted, the OutResource port (or OutBalk port) must have at least one link connected to it.
The Server block’s InPreempt port accepts an Entity Group object as input. (An Entity Group is a collection of references to entities.) When an Entity Group object is pushed to a Server block’s InPreempt port, the Server block iterates through the Entity Group collection looking for matches to root entities held by the Server block. For any matched entity, the Server block first tries to push that entity out its OutPreempt port. If this push is not successful, the block attempts to push the entity out the OutBalk port. If this also fails, the entity continues to be held by the Server block until either it exits out the OutEntity port or it is preempted again.
The Server block, like all entity holding blocks, detects potential preemptive changes (such as those scheduled by a Resource Scheduler block) to resource entities it holds (either directly or indirectly through a controlling entity).
If the number of units associated with a held resource entity decreases or the state of a held resource entity becomes nonfunctional, the Server block attempts to preempt that resource entity. If the resource entity identified for preemption is a root entity, then the Server block follows the same protocol for pushing an entity out its OutPreempt port that the InPreempt port uses. If the resource entity is part of a controlling entity, the Server block removes the resource entity from the controlling entity and attempts to push the associated root entity out the OutPreempt port. The Server block then attempts to push the preempted resource entity out its OutResource port, or if that fails, out its OutBalk port. If there is a connection to the Server block’s OutResource port and the Server block cannot push the resource entity out either the OutResource or OutBalk port, the resource entity is disposed.
The Server block also provides an OutHoldings port that other blocks can use to pull an Entity Group object that contains a collection of references to entities held by the Server block.
Input entity port for entities to enter the Server block.
Output entity port for entities that can be accepted by a downstream block.
Output entity port for controlling entities that are preempted and can be accepted by a downstream block.
Output entity port for resource entities held by controlling entities that are preempted and can be accepted by a downstream block.
Output entity port for entities that cannot leave using the other output entity ports.
Input numeric port for how long the next entity should remain in the Server block.
Input integer port for the number of entities the Server block can service simultaneously.
Entity Group input port that causes the Server block to preempt any controlling entities it is holding that match entities in the incoming Entity Group.
Output numeric port for the current utilization of the Server block’s capacity.
Output integer port for the Server block’s capacity that is not currently busy.
Output integer port for the Server block’s capacity that is currently busy.
Entity Group output port from which a group of entity references can be pulled, representing the entities held by the Server block.
The Capacity field specifies the capacity of the Server block.
RankValue (double), Capacity (integer)
AvgUtilization (double), MaxUtilization (double)