How to use Decide with Assign Label & Object

How to use Decide with Assign Label & Object

ghadir_s
Not applicable
43 Views
5 Replies
Message 1 of 6

How to use Decide with Assign Label & Object

ghadir_s
Not applicable

[ FlexSim 21.2.4 ]

Hi,

I'm trying to create a manual combiner (since I don't know how to use a combiner with Process Flow).
1681121114201.png
The idea is to add one box from two differents sources, delete them and create a new box as soon as they are added in QueueCombiner.

The first row is working because of the "Wait for Event" but afterwards, I no longer can add the yellow boxes.


I imagine there are tons of ideas which can be done by "Decide" but I tried countless ways to get the information from QueueCombiner such as


Conditional Decide : Model.find("Queue_Combiner").subnodes[1].Type == 2 && Model.find("Queue_Combiner").subnodes[1].Type == 4.

I also tried to use a Flag with Assignlabel. So I created an Assign Label and called it Flag and tried with Conditional Decide : token.Flag.value != 1

Is there anyway you can demonstrate me what I'm doing wrong with examples. A small demontration of each step I tried (How to read values from Queue object with Conditional Decide, How to create Flag and then use them with Conditional Decide).

LigneP3_V2.fsm

0 Likes
Accepted solutions (1)
44 Views
5 Replies
Replies (5)
Message 2 of 6

kavika_faleumu
Autodesk
Autodesk
Accepted solution

Hey @Ghadir S, it looks like you've got it nearly working. Here are a few suggestions that may help you get on your way.

Near the top of your PF you have several Event-Triggered Sources that feed into a Push to List and Sink.

1681139246442.png

Instead of these sources, you could simply assign them all to a Group and use one Event-Triggered Source for them all.

1681139300399.png

1681139324499.png

As for your sources only working once, that's because you're using a Scheduled Source which will only spawn according to the set schedule (which in this case is one token at time 0). Instead you could use an Event-Triggered Source that will spawn a token each time an item arrives at Station3 (or the associated Rack).

0 Likes
Message 3 of 6

jason_lightfootVL7B4
Autodesk
Autodesk
Or use an Object Process Flow for the item racks and push to a global list.
Message 4 of 6

ghadir_s
Not applicable

Hi @Kavika F First of all, thank you for taking your time and helping me out.
Regarding Station 3. Your suggestion is working. Apparently I was so so obsess with Decision that I forgot I could actually use trigger event for this kind of situation. Can you tell me if I could done any better ?

1681143248410.png
1681143237064.png

Regarding Sources. I did gather all my sources into InputRack group. However, I'm having trouble understanding how to use Assign label in this scenario. I was thinking maybe I could do exactly what I did for my second problem. (add event trigger + Pull from list) but then I don't see the use of Assign Destination.


I'm currently trying at Station 1.

1681144368202.png1681144341500.png

I assume for Assign Destination, I have to use Names by Case ?

1681144397136.png

1681144409667.png

1681144426312.png
Is there anyway you can elaborate for me please ? You can simply show me a simple model example and I can understand the rest on my own.

But Thank you again.
LigneP3_V3.fsm

0 Likes
Message 5 of 6

ghadir_s
Not applicable

@Jason Lightfoot Although @Kavika F solved my main problem, I'm still interested how I can do your way. Can you please elaborate me a simple model please.

0 Likes
Message 6 of 6

kavika_faleumu
Autodesk
Autodesk
You don't necessarily need the Assign Destination that I had in my model. I just had it to assign a destination label to an item that I was trying for something else. Sorry for the confusion. Your code should work fine if you remove it.