RackStore


RackStore puts agent into a cell of a given pallet rack, or RackSystem. The agent is moved from its current location in the network to the cell location, optionally with the help of moving resources. Optionally, a delay may be associated with putting an agent into a cell; the delay may depend on the cell coordinates, e.g. on its level.

The cell may be specified explicitly as (row, position, level) or chosen automatically. In the latter case RackStore uses the function getFreeCell() of the storage or storage zone.

If resources are used to move the agent, RackStore seizes them, brings to the agent location, attaches to the agent, moves the agent to the cell, executes (an optional) delay, and then releases the resources. Alternatively you can seize and release resources outside the RackStore object, or not use them at all.

You can choose whether the agent (possibly, with the attached resources) moves smoothly all the way along the aisle and then from the aisle to the cell, or moves just along the aisle and then jumps to the cell. The latter case may be useful when animating automated storages.

RackStore exposes a number of extension points to insert your custom actions at different stages of the process.

When the agent exits the RackStore object it is stored in a storage cell. If this is a final point of your agent-related process, i.e. if there is no direct continuation from here, you can put a “blank” Exit object after RackStore, but you should not leave its out port unconnected. Putting Sink instead of Exit would not be correct, as the agent remains in the system.

Parameters

Pallet rack / Rack system [dynamic]
Pallet rack, or storage zone (defined by block RackSystem), where the agent should be put.
Local variable: agent - the agent
The cell is
Defines, whether the cell for the agent is Chosen automatically, or the cell should be Specified explicitly by the user.
Syntax: boolean autoChooseCell
Local variable: agent - the agent.
Default value: Chosen automatically (true)
Choose cell closest to
[Visible if The cell is Chosen automatically] Defines, whether the cell is chosen closest to Front of storage/zone, or - to Back of storage/zone.
Syntax: boolean closeToFront
Default value: Front of storage/zone  (true)
Row [dynamic]
[Visible if The cell is Specified explicitly] The row of the cell.
Value type: int
Local variable: agent - the agent.
Position [dynamic]
[Visible if The cell is Specified explicitly] The position of the cell.
Value type: int
Local variable: agent - the agent.
Level [dynamic]
[Visible if The cell is Specified explicitly] The level of the cell.
Value type: int
Local variable: agent - the agent.
For two-aisle racks [dynamic]
[Visible if The cell is Specified explicitly] Choose how you want to store agents in the two-aisled pallet rack:
Put from left aisle
Put from right aisle
Value type: boolean
Default value: Put from left aisle (true)
Local variables: agent - the agent.
                         PalletRackAccess<T> rackSystem - the rack system
Move agent to
Moves the agent to the defined destination: Cell (with elevation), Cell base level, or Aisle.
Get value: movementDestination
Default value: Cell (with elevation) (RackStore.DEST_CELL_LEVEL)
Elevation time per level [dynamic]
[Visible if Move agent to is defined by Cell (with elevation)]
Value type: double
Default value: 10 seconds
Local variable: agent - the agent.
Use delay
If the checkbox is selected (true), the delay is executed after the agent arrives to the cell and before it is actually put there
Syntax:
  boolean useDelay
Default value: false
Delay time [dynamic]
[Visible if Use delay is selected] Expression evaluated to obtain the delay time for the agent. 
Value type:  double
Local variables: agent - the agent.
             PalletRackAccess storage - the storage or storage zone where the agent is put
             int row - the row of the cell
             int position - the position of the cell
             int level -  the level of the cell
Agent location (queue)
Space markup shape for queue.
Name: entityLocationQueue
Resources
Use resources to move
IIf the checkbox is selected (true), the specified moving resources are used to move the agent.
Syntax:  boolean useResources
Default value: false
Resource sets (alternatives) [dynamic]
[Visible if Use resources to move is selected] Here you define set(s) of the required resources. You can define several alternative resource sets (add new list by clicking the Add list button). The resource set is chosen based on the availability of units. 
Local variable: agent - the agent
Move at the speed of resource
[Visible if Use resources to move is selected] If selected (true), the agent moves with the specified moving resources speed.
Syntax: boolean moveWithSpeedOfResourceUnit
Default value: false
Moving resource [dynamic]
[Visible if Move at the speed of resource is selected] If true, the specified moving resources are used to move the agent. 
Value type: ResourcePool
Local variable: agent - the agent
Task priority [dynamic]
[Visible if Use resources to move is selected] The priority of the task for the incoming agent (the larger the higher).
Value type: double
Default value: 0
Local variable: agent - the agent
Task may preempt [dynamic]
[Visible if Use resources to move is selected] If selected, task may preempt the currently performed task (if allowed in the task properties & the task priority is lower).
Value type: boolean
Default value: true
Local variable: agent - the agent
Task preemption policy [dynamic]
[Visible if Use resources to move is selected] Defines the task preemption policy:
No preemption - the current task continues executing.
Wait for original resource - the task is interrupted and waits for the same resource unit to finish it.
Terminate serving - the task is interrupted and never continued.
Seize any resource - the task is interrupted and tries to seize any resource of the specified type.
Continue without resource - the task is finished without resources assistance.
Default value: No preemption (RackStore.PP_NO_PREEMPTION)
Local variable: agent - the agent
Auto suspend/resume agents
[Visible if Task preemption policy is to Wait for original resource or to Seize any resource] This parameter defines whether the agent whose task is suspended should be automatically suspended in its current flowchart block and automatically resumed at the time there are available resources.
Syntax: boolean suspendResumeEntities
Default value: true
Enter for terminated agents [dynamic]
[Visible if Task preemption policy is to Terminate serving] Enter block for agents which lose all units obtained in this Seize block because of Terminate serving preemption policy, when one of units in the resource set (defined in this Seize) gets grabbed by another task with higher priority.
Local variables: agent - the agent
                          Agent unit - the unit which has originated termination
After release resources
[Visible if Use resources to move is selected] Defines whether resources should Return to home location (if they are not immediately seized by another agent) or Stay where they are after being released.
Syntax: boolean resourcesGoHome
Default value: Return to home location (true)
Return home [dynamic]
[Visible, if After release resources: Return to home location]
Here you select in what case resource units will return home after performing the "put agent into a pallet rack cell" task.
There are three alternative options:
each time - resource unit will return in its home location each time this resource unit finishes the task and is released by the agent. 
if no other tasks - resource unit returns in its home location only if there are no other tasks currently waiting for this resource unit.
custom- if you select this option, you can define the priority and preemption policy for "return home" task using the parameters below. In this case the priority of the "return home" task will be compared with priorities of other incoming tasks, and the specified preemption policy will be used to select the next task for this particular resource unit. 
Local variables: agent - the agent
                          Agent unit - the unit 
'Wrap-up' priority [dynamic]
[Visible, if Return home: custom] Here you can set up the priority of the "return home" task for the resource unit. 
Value type: double
Local variables: agent - the agent
                          Agent unit - the unit 
'Wrap-up' preeemption policy [dynamic]
[Visible, if Return home: custom] Specifies the policy of the "return home" task for the resource unit. 
No preemption - "return home" task cannot be preempted
Terminate - "return home" task may be preempted and will be terminated
Local variables: agent - the agent
                          Agent unit - the unit 
Customize resource choice
[Visible if Use resources to move is selected] If the option is selected, you can choose some specific resource unit to perform the "store agent in a pallet rack cell" operation (using the Resource choice condition below.) 
Syntax: boolean customizeResourceChoice
Default value: false
Resource choice condition [dynamic]
[Visible if Customize resource choice is selected] Here you can specify boolean expression that will be checked to find the specific resource unit that may perform the "store agent in a pallet rack cell" operation. If none currently available resource units satisfy the specified condition (the condition returns false), RackStore will wait for the first resource unit that matches the condition.
Usually you define some field inside the agent type (say, worker), store there the reference to the resource unit when it starts working with this agent (agent.worker=unit), and then specify here the condition agent.worker==unit enabling only this particular unit to continue working with this particular agent.
Value type: boolean
Default value: true
Local variables: agent - the agent
                          Agent unit - the unit
                          ResourcePool pool - the resource pool
Actions
On enter [code]
Code executed when the agent enters this flowchart block.
Local variable: agent - the agent.
On resources arrived [code]
[Visible if Use resources to move is selected] Code executed when the resources arrive to the agent current location.
Local variable: agent - the agent.
On delay starts [code]
[Visible if Use delay is selected] Code executed when the delay associated with putting the agent starts.
Local variables: agent - the agent.
             double delayTime - the delay time.
             PalletRackAccess storage - the storage or storage zone where the agent is put.
             int row - the row of the cell.
             int position - the position of the cell.
             int level - the level of the cell.
On delay ends [code]
[Visible if Use delay is selected] Code executed when the delay associated with putting the agent ends.
Local variable: agent - the agent.
On exit [code]
Code executed when the agent exits the object.
Local variables: agent - the agent.
             PalletRackAccess storage - the storage or storage zone where the agent is put.
             int row - the row of the cell.
             int position - the position of the cell.
             int level - the level of the cell.
On task suspended [code]
[Visible if Task preemption policy is set to Wait for original resource or Seize any resource] Code executed when agent task is suspended because of Wait for original resource and Seize any resource preemption policy, when its unit gets grabbed by another task with higher priority. 
Local variables: agent - the agent
                          Agent unit - the unit
On task resumed [code]
[Visible if Task preemption policy is set to Wait for original resource or Seize any resource] Code executed when agent resumes processing after it has been suspended because of Seize any resource and Wait for original resource preemption policy.
Local variables: agent - the agent
                          Agent unit - the unit
On task terminated [code]
[Visible if Task preemption policy is set to Terminate serving] Code executed when agent loses all units obtained in this RackStore block because of Terminate serving preemption policy, when one of units in the resource set (defined in this RackStore) gets grabbed by another task with higher priority.
Local variables: agent - the agent
                          Agent unit - the unit which has originated termination.

Functions

int queueSize()Returns the size of the queue of agents waiting for the resource.

Ports

in
The input port.
out
The output port.