Sage Modeling and Simulation Library

SelfManagingResource Constructor (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.

Namespace:  Highpoint.Sage.Resources
Assembly:  Sage4 (in Sage4.dll)

Syntax


public SelfManagingResource(
	IModel model,
	string name,
	Guid guid,
	double capacity,
	double available,
	bool isAtomic,
	bool isDiscrete,
	bool isPersistent,
	bool supportsPriorities
)

Parameters

model
Type: Highpoint.Sage.SimCore..::..IModel
The model to which the Resource will belong.
name
Type: String
The name of the Resource.
guid
Type: Guid
The guid of the Resource.
capacity
Type: Double
The capacity of the Resource. How much there can be to be granted.
available
Type: Double
The availability of the Resource. How much there is, at start, to be granted.
isAtomic
Type: Boolean
True if the Resource is atomic. Atomicity infers that the resource is granted all-or-nothing.
isDiscrete
Type: Boolean
True if the Resource is discrete. Discreteness infers that the resource is granted in unitary amounts.
isPersistent
Type: Boolean
True if the Resource is persistent. Atomicity infers that the resource, once granted, must be returned to the pool.
supportsPriorities
Type: Boolean
True if this resource is able ot treat resource requests in a prioritized order.