question

Orlando P avatar image
0 Likes"
Orlando P asked Eric M answered

Create a decision from list value

I am trying to create a decision for 3 different colors, each color has a value and I wanted them to go to the correct destination, it will be possible for someone to help
AGV_T_V6.fsm
FlexSim 21.1.1
flexsim 21.1.1
agv-t-v6.fsm (60.1 KiB)
5 |100000

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

Eric M avatar image
0 Likes"
Eric M answered

Hi @Orlando P, here's an example of what you're trying to do. I created a new default AGV process flow. A trigger is on Queue1 to push the item value of "cores" to to the Cores list. The other queues' input setting is set to pull from the Cores list with a Query for each queue as shown below with different values depending on which type of cores you want in each queue.

agv-t-v6 (2) - EM.fsm


1621459138002.png (8.2 KiB)
agv-t-v6-2-em.fsm (55.0 KiB)
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
1 Like"
Joerg Vogel answered Orlando P commented

I suggest you do it with labels instead of colors. A color is a set of three values. If you want to evaluate a condition by a color you have test it against the set of three values. This means you assert another label at your items for this purpose.

· 5
5 |100000

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

Orlando P avatar image Orlando P commented ·
Thanks for the answer, I'm thinking about colors but what I'm trying to do is: red = 1 green = 2 blue = 3 so when the box is created it sends the value to the list and then takes that value and tries to make the decision, but it is not easy. It's for a school project and I find myself fumbling with a simple thing
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

If it's a predefined color then it's an easy test:

item.color==Color.green;

But that color will often be based on the type of an item and so as Jörg says you may as well just use that.

0 Likes 0 ·
Orlando P avatar image Orlando P Jason Lightfoot ♦ commented ·

AGV_T_V6.fsm

In this case we created a list where we use label values, i'll atach a image so you can see what i'm talking about. So when the AGV takes the box it makes a decision where i's going to go to and leave that box.

0 Likes 0 ·
capturar.png (69.8 KiB)
agv-t-v6.fsm (67.9 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Orlando P commented ·

You only need to set the destination label on the item based on the decision - and then either push to the AGVWork list or create your own tasks as you show, but you don't need 3 different tasks - you can pull from the list partitioned by the color to get the destination and reference that in your tasks.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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