use

open suspend fun use(resource: Resource, amountNeeded: Int = 1, seizePriority: Int = SEIZE_PRIORITY, delayDuration: Double, delayPriority: Int = DELAY_PRIORITY, queue: RequestQ)(source)
open suspend fun use(resource: Resource, amountNeeded: Int = 1, seizePriority: Int = SEIZE_PRIORITY, delayDuration: GetValueIfc, delayPriority: Int = DELAY_PRIORITY, queue: RequestQ)(source)

Uses the resource with the amount of units for the delay and then releases it. Equivalent to: seize(), delay(), release()

Parameters

amountNeeded

the number of units of the resource needed for the request. The default is 1 unit.

resource

the resource from which the units are being requested.

seizePriority

the priority of the event that makes the request, which orders seizes made at the same simulated instant. It does not set the request's position in the queue: that comes from the entity's priority, and only when the queue's discipline is RANKED.

delayDuration

, the length of time required before the process continues executing, must not be negative and must be finite.

delayPriority

, since the delay is scheduled, a priority can be used to determine the order of events for delays that might be scheduled to complete at the same time.

queue

the queue that will hold the entity if the amount needed cannot immediately be supplied by the resource. If the queue is priority based (i.e. uses a ranked queue discipline) the user should set the entity's priority attribute for use in ranking the queue prior to the calling use.


open suspend fun use(resource: ResourceWithQ, amountNeeded: Int = 1, seizePriority: Int = SEIZE_PRIORITY, delayDuration: Double, delayPriority: Int = DELAY_PRIORITY)(source)

Uses the resource with the amount of units for the delay and then releases it. Equivalent to: seize(), delay(), release() The queue that will hold the entity is internal to the resource. If the queue is priority based (i.e. uses a ranked queue discipline) the user should set the entity's priority attribute for use in ranking the queue prior to the calling use.

Parameters

amountNeeded

the number of units of the resource needed for the request. The default is 1 unit.

resource

the resource from which the units are being requested.

seizePriority

the priority of the event that makes the request, which orders seizes made at the same simulated instant. It does not set the request's position in the queue: that comes from the entity's priority, and only when the queue's discipline is RANKED.

delayDuration

, the length of time required before the process continues executing, must not be negative and must be finite.

delayPriority

, since the delay is scheduled, a priority can be used to determine the order of events for delays that might be scheduled to complete at the same time.


open suspend fun use(resource: ResourceWithQ, amountNeeded: Int = 1, seizePriority: Int = SEIZE_PRIORITY, delayDuration: GetValueIfc, delayPriority: Int = DELAY_PRIORITY)(source)

Uses the resource with the amount of units for the delay and then releases it. Equivalent to: seize(), delay(), release(). The queue that will hold the entity is internal to the resource. If the queue is priority based (i.e. uses a ranked queue discipline) the user should set the entity's priority attribute for use in ranking the queue prior to the calling use.

Parameters

amountNeeded

the number of units of the resource needed for the request. The default is 1 unit.

resource

the resource from which the units are being requested.

seizePriority

the priority of the event that makes the request, which orders seizes made at the same simulated instant. It does not set the request's position in the queue: that comes from the entity's priority, and only when the queue's discipline is RANKED.

delayDuration

, the length of time required before the process continues executing, must not be negative and must be finite.

delayPriority

, since the delay is scheduled, a priority can be used to determine the order of events for delays that might be scheduled to complete at the same time.


open suspend fun use(resourcePool: ResourcePool, amountNeeded: Int = 1, seizePriority: Int = SEIZE_PRIORITY, delayDuration: Double, delayPriority: Int = DELAY_PRIORITY, queue: RequestQ)(source)
open suspend fun use(resourcePool: ResourcePool, amountNeeded: Int = 1, seizePriority: Int = SEIZE_PRIORITY, delayDuration: GetValueIfc, delayPriority: Int = DELAY_PRIORITY, queue: RequestQ)(source)

Uses the resource with the amount of units for the delay and then releases it. Equivalent to: seize(), delay(), release(). If the queue is priority based (i.e. uses a ranked queue discipline) the user should set the entity's priority attribute for use in ranking the queue prior to the calling use.

Parameters

amountNeeded

the number of units of the resource needed for the request. The default is 1 unit.

resourcePool

the resource from which the units are being requested.

seizePriority

the priority of the event that makes the request, which orders seizes made at the same simulated instant. It does not set the request's position in the queue: that comes from the entity's priority, and only when the queue's discipline is RANKED.

delayDuration

, the length of time required before the process continues executing, must not be negative and must be finite.

delayPriority

, since the delay is scheduled, a priority can be used to determine the order of events for delays that might be scheduled to complete at the same time.

queue

the queue that will hold the entity if the amount needed cannot immediately be supplied by the resource. If the queue is priority based (i.e. uses a ranked queue discipline) the user should set the entity's priority attribute for use in ranking the queue prior to the calling use.


open suspend fun use(resourcePool: ResourcePoolWithQ, amountNeeded: Int = 1, seizePriority: Int = SEIZE_PRIORITY, delayDuration: Double, delayPriority: Int = DELAY_PRIORITY)(source)
open suspend fun use(resourcePool: ResourcePoolWithQ, amountNeeded: Int = 1, seizePriority: Int = SEIZE_PRIORITY, delayDuration: GetValueIfc, delayPriority: Int = DELAY_PRIORITY)(source)

Uses the resource with the amount of units for the delay and then releases it. Equivalent to: seize(), delay(), release() The queue that will hold the entity is internal to the resource pool. If the queue is priority based (i.e. uses a ranked queue discipline) the user should set the entity's priority attribute for use in ranking the queue prior to the calling use.

Parameters

amountNeeded

the number of units of the resource needed for the request. The default is 1 unit.

resourcePool

the resource from which the units are being requested.

seizePriority

the priority of the event that makes the request, which orders seizes made at the same simulated instant. It does not set the request's position in the queue: that comes from the entity's priority, and only when the queue's discipline is RANKED.

delayDuration

, the length of time required before the process continues executing, must not be negative and must be finite.

delayPriority

, since the delay is scheduled, a priority can be used to determine the order of events for delays that might be scheduled to complete at the same time.