Movable Resource
A movable resource is a resource that resides within a spatial model and thus can be moved.
Parameters
the parent model element
the initial starting location of the resource within the spatial model
the default velocity for movement within the spatial model
the name of the resource
Constructors
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.
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
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
A value for the velocity. May be random
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.
Allows the adding (attaching) of an observer to the observable
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.
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.
Returns how many observers are currently attached to the observable
Causes the resource to deallocate the amount associated with the allocation
Detaches all the observers from the observable
Allows the deletion (removing) of an observer from the observable
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.
Returns true if the observer is already attached
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.
Computes the total number of units of the specified resource that are allocated to the entity.