I will put queue into a group. When selecting unloading objects for crane, I want them to be selected according to the order within the group. For example, the first unloading object is queue1, the second is queue2, and the third is queue1.
I will put queue into a group. When selecting unloading objects for crane, I want them to be selected according to the order within the group. For example, the first unloading object is queue1, the second is queue2, and the third is queue1.
Hi @guoyi ,
If you have a resource that points to a group of queues, you can acquire that resource onto your token (token.resource) to get an individual queue. Then FlexSim automatically takes the first object to Queue1, the second to Queue2, and so on. This is demonstrated here:
You can also accomplish this by adding a variable which changes with each token. The first token will be 1 and send it to the first queue in the group. The second token will set the variable to 2 and go to the second queue. This gives you more control over what the code is doing to decide the destination.
Note: this custom code changes between 3 queues (1 sets to 2, 2 sets to 3, and 3 sets back to 1). You will have to change it according to your model
Finally, if you are simply wanting to reference the objects within the queue and choose which queue to be your unloading object. Use this syntax:
Group("Queues")[1]
This selects the first member of the group titled "Queues"
Hopefully this helps!
13 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved