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)


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


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