MovableResource

open class MovableResource(parent: ModelElement, initLocation: LocationIfc, defaultVelocity: RVariableIfc, name: String? = null) : Resource, MovableResourceIfc, MoveableResourceCIfc(source)

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

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

Inheritors

Constructors

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

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var capacity: Int

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

Link copied to clipboard
open override var currentLocation: LocationIfc
Link copied to clipboard
open override val fracTimeMoving: TWResponseCIfc
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val hasHomeBase: Boolean
Link copied to clipboard
open override var homeBase: LocationIfc?
Link copied to clipboard
@set:KSLControl(controlType = ControlType.INTEGER, lowerBound = 0.0, upperBound = 1.0)
open override var initialCapacity: Int

The initial capacity of the resource at the start of the replication. The initial capacity must be greater than 0.

Link copied to clipboard
open override var initialHomeBase: LocationIfc?
Link copied to clipboard
open override var initialLocation: LocationIfc
Link copied to clipboard
open override var isMoving: Boolean
Link copied to clipboard
Link copied to clipboard

True indicates that the movable resource is in the process of returning to its home base.

Link copied to clipboard
open override val isTracked: Boolean
Link copied to clipboard
Link copied to clipboard
open override val modelElement: ModelElement
Link copied to clipboard
Link copied to clipboard
open override val previousLocation: LocationIfc
Link copied to clipboard
open override val spatialID: Int
Link copied to clipboard
open override val spatialName: String
Link copied to clipboard
open override val status: SpatialModel.Status
Link copied to clipboard
open override val velocity: GetValueIfc

A value for the velocity. May be random

Link copied to clipboard
open override val velocityRV: RandomVariableCIfc

Functions

Link copied to clipboard
open override fun attachObserver(observer: ObserverIfc<SpatialElementIfc>)

Allows the adding (attaching) of an observer to the observable

Link copied to clipboard
open override fun countObservers(): Int

Returns how many observers are currently attached to the observable

Link copied to clipboard
open override fun detachAllObservers()

Detaches all the observers from the observable

Link copied to clipboard
open override fun detachObserver(observer: ObserverIfc<SpatialElementIfc>)

Allows the deletion (removing) of an observer from the observable

Link copied to clipboard
Link copied to clipboard
open override fun initializeSpatialElement()
Link copied to clipboard
open override fun isAttached(observer: ObserverIfc<SpatialElementIfc>): Boolean

Returns true if the observer is already attached

Link copied to clipboard

If the movable resource has a defined home base, and it is not already returning to home, this function causes the movable resource to be requested and sent to its home base. If there are pending requests, this request will compete with them, possibly waiting until finally causing the resource to return to its home base.