SResource
A SResource represents a simple resource that can have units become busy. A resource is considered busy when it has 1 or more units seized. A resource is considered idle when all available units are idle. A resource has an initial capacity, which represents the units that can be allocated.
The capacity of the resource represents the maximum number of units available for use. For example, if the resource has capacity 3, it may have 2 units busy and 1 unit available. A resource cannot have more units busy than the capacity.
Author
rossetti
Properties
Indicates if resource has available units
The initial capacity of the resource at time just prior to 0.0
Current number of available units
Response information on number of busy units
Counts how many times the resource has units become idle
Counts how many times the resource has units become busy
Response information on resource utilization
Functions
Seizes amount units of the resource. If amt = 0, then an exception occurs. If the resource has no units available, then an exception occurs. If the amt is greater than the number available, then an exception occurs. Thus, users must check for availability before calling this function.