MovableResourceWithQ

class MovableResourceWithQ(parent: ModelElement, initLocation: LocationIfc, defaultVelocity: RVariableIfc, queue: RequestQ? = null, name: String? = null) : MovableResource, ResourceWithQCIfc(source)

A movable resource is a single unit capacity resource that resides within a spatial model and thus can be moved.

A movable resource is considered idle if it has not allocated. The capacity can be changed during a replication; however, the capacity of every replication starts at the same initial capacity. A movable resource can have capacity of 0 or 1.

A movable resource is inactive if its capacity is zero. Capacity can only become 0 via the use of a CapacitySchedule or via the use of a CapacityChangeNotice. A movable resource that is inactive can be seized. If a request for the movable resource occurs when the resource is inactive, the request waits (as usual) until it can be fulfilled.

Define b(t) as the number of units allocated and c(t) as the current capacity of the resource at time t.

If (b(t) = 0 and c(t) = 0) then the resource is considered inactive If b(t) = 1 and c(t) >= 0, then the resource is busy If b(t) = 0 and c(t) = 1, then the resource is idle

Note that a resource may be busy when the capacity is 0 because of the timing of capacity changes.

Parameters

parent

the parent model element

initLocation

the initial starting location of the resource within the spatial model

defaultVelocity

the default velocity for movement within the spatial model

name

the name of the resource

Constructors

Link copied to clipboard
constructor(parent: ModelElement, initLocation: LocationIfc, defaultVelocity: RVariableIfc, queue: RequestQ? = null, name: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var defaultReportingOption: Boolean

Returns the default reporting option. True means that the response should appear on the default reports

Link copied to clipboard
Link copied to clipboard
open override val wip: TWResponseCIfc

The number waiting and in service

Functions

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