Sage Modeling and Simulation Library

Resource Members

The Resource type exposes the following members.

Constructors


  Name Description
Public method Resource(IModel, String, Guid, Double, Double, Boolean, Boolean, Boolean)
Creates a new Resource. A resource is created with a capacity, and initial quantity available, 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.

This constructor allows the initial capacities and quantities available to be different from each other.

Public method Resource(IModel, String, Guid, Double, Double, Boolean, Boolean, Boolean, IResource)
Creates a new Resource, wrapped by an implementer of IResource. This constructor is used if the resource being created is serving as a delegated-to token which represents some other resource. 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 Resource()()()()
Initializes a new empty instance of the Resource class - for deserialization only.

Methods


  Name Description
Public method Acquire
Public method DeserializeFrom
Reconstitutes this object from the specified XmlSerializationContext.
Public method Equals(System.Object)
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
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
Serves as the default hash function.
(Inherited from Object.)
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
Public method Reserve
Public method Reset
Public method SerializeTo
Stores this object to the specified XmlSerializationContext.
Public method ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public method Unreserve

Properties


  Name Description
Public property Available
Public property Capacity
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.
Public property IsDiscrete
Gets a value indicating whether this instance is discrete.
Public property IsPersistent
Gets a value indicating whether this instance is persistent.
Public property Manager
Public property Model
The model that owns this object, or from which this object gets time, etc. data.
Public property Name
Public property PermissibleOverbook
The amount by which it is permissible to overbook this resource.