Templates


Server Block

serverHelp

Description

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 out 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.

Holding Block Preemption

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.

Fixed Ports

InEntity

Input entity port for entities to enter the Server block.

OutEntity

Output entity port for entities that can be accepted by a downstream block.

OutPreempt

Output entity port for root entities that are preempted and can be accepted by a downstream block.

OutResource

Output entity port for resource entities held by controlling entities that are preempted and can be accepted by a downstream block.

OutBalk

Output entity port for entities that cannot leave using the other output entity ports.

InServiceTime

Input numeric port for how long the next entity should remain in the Server block.

InCapacity

Input integer port for the number of entities the Server block can service simultaneously.

InPreempt

Entity Group input port that causes the Server block to preempt any root entities it is holding that match entities in the incoming Entity Group.

OutUtilization

Output numeric port for the current utilization of the Server block’s capacity.

OutAvailable

Output integer port for the Server block’s capacity that is not currently busy.

OutNumberBusy

Output integer port for the Server block’s capacity that is currently busy.

OutHoldings

Entity Group output port from which a group of entity references can be pulled, representing the entities held by the Server block.

Properties Dialog Box Controls

Values

The Capacity field specifies the capacity of the Server block.

Candidates for Design of Experiments

Factors

RankValue (double), Capacity (integer)

Responses

AvgUtilization (double), MaxUtilization (double)