Resource With Q
A resource is considered busy if at least 1 unit is allocated. A resource is considered idle if no units have been allocated. The capacity can be changed during a replication; however, the capacity of every replication starts at the same initial capacity.
A resource is considered inactive if all of its units of capacity are inactive. That is, a resource is inactive if its capacity is zero and there are no busy units. Capacity can only become 0 via the use of a CapacitySchedule or via the use of a CapacityChangeNotice. A resource that is inactive can be seized. If a request for units occurs when the resource is inactive, the request waits (as usual) until it can be fulfilled.
Define b(t) as the number of units allocated and c(t) as the current capacity of the resource at time t.
If (b(t) = 0 and c(t) = 0) then the resource is considered inactive If b(t) 0 and c(t) >= 0, then the resource is busy If b(t) = 0 and c(t) 0, then the resource is idle
Note that a resource may be busy when the capacity is 0 because of the timing of capacity changes.
Parameters
the containing model element
the capacity for the resource at the beginning of each replication, must be at least 1
the name for the resource
the queue for waiting entities. If a request for units cannot immediately be met, then this is where the request waits. If a queue is not supplied, a default queue will be created. Supplying a queue allows resources to share request queues.
Inheritors
Types
Properties
A flag to control whether the model element reacts to after experiment actions.
A flag to control whether the model element reacts to after replication actions.
A flag to control whether the model element reacts to before experiment actions.
A flag to control whether the model element reacts to before replication actions.
Access to the busy state. Busy means at least 1 unit of the resource is allocated.
The default rule is IGNORE. This can be changed when a CapacitySchedule is used.
Indicates the current status of the model element for observers of ModelElement.Status
Returns the default reporting option. True means that the response should appear on the default reports
If a(t) is greater than zero
If b(t) is greater than zero
Access to the idle state. Idle means that no units of the resource are allocated.
Access to the inactive state. Inactive means that the capacity of the resource is 0
The initial capacity of the resource at the start of the replication. The initial capacity must be greater than 0.
A flag to control whether the model element reacts to initialization actions
If b(t) is the number of busy units, and c(t) is the current capacity, then the instantaneous utilization iu(t) is
Checks to see if the resource is inactive
Indicates whether capacity changes are pending. The resource cannot allocate units when capacity changes are pending because released busy units will be used to fill the capacity change.
the left traversal count for pre-order traversal of the model element tree
Returns a string representation of the model element and its child model elements. Useful for realizing the model element hierarchy.
A flag to control whether the model element participates in monte carlo actions.
If c(t) is the current capacity and b(t) is the current number busy, then a(t) = c(t) - b(t) is the current number of available units. Under some capacity change situations, a(t) may be negative.
Gets the number of model elements contained by this model elements.
Statistical response representing the number of busy units of the resource.
The number of times that the resource has been released (deallocated)
The number of times that the resource has been seized (allocated)
The last (previous) state before the current state.
Indicates the previous status of the model element for observers of ModelElement.Status This allows the transition to be noted by observers
A flag to control whether the model element reacts to end replication actions.
the right traversal count for pre-order traversal of the model element tree
Statistical response representing the utilization of the resource. This is the time average number of busy units divided by the time average capacity.
The number of times the resource was seized
The spatial model associated with this model element. By default, each model element uses its parent model element's spatial model unless changed via this property. This changes the spatial model for this model element and no others.
Time when state time accumulation started. May be greater than 0 because of warmup.
The current state of the resource.
Indicates if proportion of time spent in states (idle, busy, inactive) is automatically reported
time average instantaneous utilization
The time interval between TimedUpdate events. The default is zero, indicating no timed update
Specifies whether this model element participates in time update event specified by its parent
Specifies the havingPriority of this model element's timed update event.
Total time that the resource has been idle, busy, or inactive
Indicates whether the warm-up action occurred sometime during the simulation for this model element. False indicates that the warm-up action has not occurred
Specifies if this model element will be warmed up when the warmup action occurs for its parent. The warm-up flag indicates whether this model element will be warmed up when its parent warm up event/action occurs. The default value for all model elements is true. A value of true implies that the model element allows its parent's warm up event to call the warm-up action. A value of false implies that the model element does not allow its parent's warm up event to call the warm-up action. False does not necessarily mean that the model element will not be warmed up. It may, through the use of the lengthOfWarmUp property, have its own warm up event and action.
Specifies the priority of this model element's warm up event.
Functions
Cause the entity to start the process. The activation of the process is governed by an event that is scheduled to occur at the specified activation time.
Add an allocation listener. Allocation listeners are notified when (after) units are allocated to an entity and after units are deallocated.
It is an error to attempt to allocate resource units to an entity if there are insufficient units available. Thus, the amount requested must be less than or equal to the number of units available at the time of this call.
A resource may fill a request in many ways. This function indicates if the request for the amount needed can be allocated immediately, without any wait based on the current state of the resource. Since the underlying state of the resource may be more complex than indicated by the state exposed in the API, it is important to use this method to determine if the requested amount can be allocated.
Cancels the timed update event for this model element.
Cancels the warm-up event for this model element.
It is an error to try to change the capacity directly via this method if the resource is using a capacity change schedule.
Checks if this model element or any model element directly above this model element in the hierarchy of model elements all the way until the top Model participates in the warm-up action.
Causes the resource to deallocate the amount associated with the allocation
Find the first parent that has its own warm up event this guarantees that all elements below the found model element do not have their own warm-up event. A model element that has its own warm up event also opts out of the warm-up action. If the returned parent is the Model, then all are controlled by the model (unless they opt out). Elements can opt out and not have their own warm-up event. Thus, they have no warm up at all.
Fills up the supplied StringBuilder carrying a string representation of the model element and its child model elements Useful for realizing the model element hierarchy.
This method returns the planned time for the warm-up for this model element.
Fills a StringBuilder carrying the model element names in the order that they will be initialized
Checks if a warm-up event is scheduled for any model element directly above this model element in the hierarchy of model elements all the way until the top Model.
Checks if current status is the supplied status
Checks if a timed update event has been scheduled for this model element
Checks if the entity is using (has allocated units) of the resource.
Checks if a warm-up event has been scheduled for this model element
Returns the value of a 1 millisecond time interval in terms of the base time unit
Computes the number of different allocations of the resource held by the entity. Recall that allocations can be for different amounts.
Removes the listener
Sets the after experiment option of all model elements (children) contained by this model element.
Sets the after replication flag of all model elements (children) contained by this model element.
Sets the before experiment option of all model elements (children) contained by this model element.
Sets the before replication flag of all model elements (children) contained by this model element.
Sets the initialization option of all model elements (children) contained by this model element.
Sets the monte carlo option flag of all model elements (children) contained by this model element.
Sets the end replication option flag of all model elements (children) contained by this model element. Determines whether the replicationEnded() method will be called
Sets the timed update option flag of all model elements (children) contained by this model element.
Sets the warm-up option flag of all model elements (children) contained by this model element.
Cause the entity to start the process sequence in the order specified by the sequence. The activation of the first process is governed by an event that is scheduled to occur based on the time until activation parameter.
Cause the entity to start the process sequence in the order specified by the sequence. The activation of the first process is governed by an event that is scheduled to occur at the specified activation time.
If the resource is using a schedule, the resource stops listening for capacity changes and is no longer using a schedule. The current capacity will be used for the remainder of the replication.
Computes the total number of units of the specified resource that are allocated to the entity.
Tells the resource to listen and react to capacity changes in the supplied Schedule.