ResourceDetach


Detaches the previously seized and attached resources from the agent. The detached resource units will still be possessed by the agent but will not accompany it when the agent moves.

The detach operation takes zero time.

If the resources are released they are detached automatically, and you do not need to use this object in that case.

Parameters

Detach
Specifies which resources should be detached:
All attached resources - All the currently attached resources will be detached
All attached units seized in given Seize block(s)
- You specify the list of Seize blocks, and only the resources previously seized by these blocks will be detached.
Specified resources (list of pools) - You specify the list of ResorcePool blocks, and only the resources previously attached by these blocks will be detached.
Get value: detachMode
Set new value at runtime: set_detachMode( new value )
Valid values:
All attached resources - ResourceDetach.ALL
                     All attached units seized in given Seize block(s) - ResourceDetach.ALL_FROM_SEIZES
                     Specified resources (list of pools) - ResourceDetach.SPECIFIED_RESOURCES
Seize blocks
[Visible if DetachAll attached units seized in given Seize block(s)] List of Seize blocks. Only the resources previously seized by these blocks will be detached. 
Get value: seizeBlocks
ResourcePool blocks [dynamic]
[Visible if Detach: Specified resources (list of pools)] List of ResourcePool blocks. Only the resources previously attached by these blocks will be detached. One unit will be detached per pool name, so if you wish to detach two or more units of the same pool, you should list that pool twice, e.g.: doctors, nurses, nurses
Local variable: agent - the agent
Actions
On enter [code]
Code executed when the agent enters the block.
Local variable: agent - the agent
On exit [code]
Code executed when the agent exits the block.
Local variable: agent - the agent

Ports

in
The input port.
out
The output port.