Sage Modeling and Simulation Library

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

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

Syntax


public Resource(
	IModel model,
	string name,
	Guid guid,
	double capacity,
	double availability,
	bool isAtomic,
	bool isDiscrete,
	bool isPersistent
)

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 by which this resource will be known.
capacity
Type: Double
The capacity of the Resource. How much there is to be granted.
availability
Type: Double
The amount of this resource that is initially available.
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.