AbstractResourcePool

abstract class AbstractResourcePool<T : Resource>(parent: ModelElement, name: String? = null) : ModelElement, ResourceIfc(source)

An abstract base class that represents a pool of resources (or subclasses of Resource).

Inheritors

Constructors

Link copied to clipboard
constructor(parent: ModelElement, name: String? = null)

Properties

Link copied to clipboard
open override val capacity: Int

The current capacity of the resource. In general, it can be 0 or greater

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val hasAvailableUnits: Boolean

If a(t) is greater than zero

Link copied to clipboard
open override val isInactive: Boolean

The pool is considered in active if all of its associated resources are inactive

Link copied to clipboard
open override val numAvailableUnits: Int

If c(t) is the current capacity and b(t) is the current number busy, then a(t) = c(t) - b(t) is the current number of available units. Under some capacity change situations, a(t) may be negative.

Link copied to clipboard
open override val numBusy: Int

The number of busy units at any time t, b(t)

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open fun addResource(resource: T)

Adds a resource to the pool. The model must not be running when adding a resource.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String

Includes the model name, the id, the model element name, the parent name, and parent id