Sage Modeling and Simulation Library

SelfManagingResource Members

The SelfManagingResource type exposes the following members.

Constructors


  Name Description
Public method SelfManagingResource(IModel, String, Guid, Double, Boolean, Boolean, Boolean, Boolean)
Creates a new SelfManagingResource. A resource is created with a capacity, and is granted in portions of that capacity, or if atomic, all-or-nothing. The IResourceRequest will specify a desired amount. If the IResourceRequest specifies a desired quantity less than the resource's capacity, and the resource is atomic, the IResourceRequest will be granted the full capacity of the resource. A self-managing resource is a resource that is responsible for granting access to itself.
Public method SelfManagingResource(IModel, String, Guid, Double, Double, Boolean, Boolean, Boolean, Boolean)
Creates a new SelfManagingResource. A resource is created with a capacity, and is granted in portions of that capacity, or if atomic, all-or-nothing. The IResourceRequest will specify a desired amount. If the IResourceRequest specifies a desired quantity less than the resource's capacity, and the resource is atomic, the IResourceRequest will be granted the full capacity of the resource. A self-managing resource is a resource that is responsible for granting access to itself.

Methods


  Name Description
Public method Acquire
Attempts to acquire this resource using the provided IResourceRequest.
Public method Equals
We override the Equals operator so that a self-managing resource can declare equivalency to its underlying resource.
Protected method Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public method GetHashCode
Returns a hash code for this instance.
Public method GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public method InitializeIdentity
Initialize the identity of this model object, once.
Protected method MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public method Release
Releases the resource through the provided resource request.
Public method Reserve
Attempts to reserve this resource using the provided IResourceRequest.
Public method Reset
Resets this instance, returning it to its initial capacity and availability.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public method Unreserve
Unreserves the resource through the provided resource request.

Properties


  Name Description
Public property AccessRegulator
Gets or sets the access regulator, which is an object that can allow or deny individual ResourceRequests access to specified resources.
Public property Available
How much of this resource is currently available to service requests.
Public property Capacity
The current capacity of this resource - how much 'Available' can be, at its highest value.
Public property Description
A description of this Resource.
Public property Guid
The Guid for this object. Typically required to be unique.
Public property InitialAvailable
The quantity of this resource that will be available if the resource experiences a reset.
Public property InitialCapacity
The capacity of this resource that will be in effect if the resource experiences a reset.
Public property IsAtomic
Gets a value indicating whether this instance is atomic. And atomic resource is allocated all-or-none, such as a vehicle.
Public property IsDiscrete
Gets a value indicating whether this instance is discrete. A discrete resource is allocated in integral amounts, such as cartons or drums.
Public property IsPersistent
Gets a value indicating whether this instance is persistent. A persistent resource is returned to the pool after it is used.
Public property Manager
Gets or sets the manager of the resource.
Public property Model
The model that owns this object, or from which this object gets time, etc. data.
Public property Name
The user-friendly name for this object.
Public property PermissibleOverbook
The amount by which it is permissible to overbook this resource.
Public property Resources
Gets the resources owned by this Resource Manager.
Public property SupportsPrioritizedRequests
Gets a value indicating whether this resource manager supports prioritized requests.
Public property Tag
An Object that contains data about this self-managing resource. The default is a null reference (Nothing in Visual Basic). Any Object derived type can be assigned to this property.

Events


  Name Description
Public event AcquiredEvent
Occurs when this resource has been acquired.
Public event ReleasedEvent
Occurs when this resource has been released.
Public event RequestEvent
This event is fired when any acq/rls/rsv/unr request is issued to this equipment.
Public event ReservedEvent
This event is fired when this equipment is reserved.
Public event ResourceAcquired
This event is fired when this resource is acquired.
Public event ResourceAdded
Fired when a resource is added to the pool.
Public event ResourceReleased
This event is fired when this resource is released.
Public event ResourceRemoved
Fired when a resource is removed from the pool.
Public event ResourceRequested
Fired when a resource request is received.
Public event UnreservedEvent
This event is fired when this equipment is unreserved.