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
Time-weighted 0/1 indicator of the busy state (at least one unit working).
Time-weighted response of the resource's capacity (which may vary over time under a capacity schedule).
Time-weighted 0/1 indicator of the failed state; its average is the long-run fraction of time failed (unavailability due to failure).
The effect of a failure on in-service work. The default is preempt-resume. Must be set before the model runs.
Indicates if resource has available units
Time-weighted 0/1 indicator of the idle state (on shift, not busy, not failed).
Time-weighted 0/1 indicator of the inactive state (off shift, capacity 0, not busy/failed).
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 the number of failures (downtimes) experienced.
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
Registers a listener notified when the resource fails (for preemption).
Registers a listener notified when available units increase.
Sets the current capacity. An increase that creates newly available units notifies the availability listeners so a waiting queue can be served. A decrease takes effect as busy units are released (IGNORE-rule semantics): in-service units are not interrupted.
This method should be overridden by subclasses that need actions performed to initialize prior to a replication. It is called once before each replication occurs if the model element wants initialization. It is called after beforeReplication() is called
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.
Configures usage (count) based failures: the resource fails after countToFailure completed services and is down for timeToRepair. The count is re-sampled after each repair.
Configures operating-time (usage) based failures: the resource fails after operatingTimeToFailure units of busy time accumulate, and is down for timeToRepair. The operating clock advances only while the resource is busy and on shift; it pauses while idle, off-shift (capacity 0), or failed.
Drives this resource's capacity from a CapacitySchedule (IGNORE-rule semantics).
Configures time-based (calendar-clock) failures: the resource fails after timeToFailure elapses (wall-clock, whether busy or idle) and is down for timeToRepair. Failures are finish-then-fail (in-service units complete first) and take the whole resource down.