question

King-Ki F avatar image
0 Likes"
King-Ki F asked Braydn T answered

Conditional Decide Question

Hello,

I created a decide activity which will push items to a queue called "PickingStation" only when "PickingStation" is empty. I attempted to do this by creating a label called "StationCapacity" which would count how many flowitems was in "PickingStation" with the code

model.find("PickingStation").as(Object).subnodes.length

but it is always returning a value of 0. Is there a better way to determine if there is items in "PickingStation"? I've attempted to set the max limit on the queue named "PickingStation" to 1, but items are still able to be placed into the queue via my process flow. Model attached below

ClusterPickingTestv5.fsm

FlexSim 20.0.3
flexsim 20.0.3
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·

The maximum capacity value is only relevant for 3D models. If you decide to build your model logic upon process flow, you accept that you are responsible for all conditions in your model. If you build your model in 3D logic, you can substitute partly functions in 3D logic by Process Flow logic. The you can still benefit from the main logic conditions of 3D models and you are able to customize parts which are really difficult to work with in 3d models. A typical example are conditional tasksequences.

0 Likes 0 ·
King-Ki F avatar image King-Ki F Joerg Vogel commented ·

Thanks for the explanation. I'll want to understand how to set up a max capacity in process flow, but the code I'm using doesn't seem to be correct. Is the only way possible to setup a counter within the process flow, where I would have to add/subtract as tokens leave the process?

0 Likes 0 ·

1 Answer

Braydn T avatar image
0 Likes"
Braydn T answered

@King-Ki F

I think you what you are looking for is a zone. Here is a tutorial on how to use them to collect statistics, but you can use it to get familiar with them. You can use a zone to limit the number of tokens that enter a part of process flow.

https://docs.flexsim.com/en/20.1/Tutorials/ProcessFlow/Tutorial1UsingSharedAssets/1-3AddZone/

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.