question

Ghadir S avatar image
0 Likes"
Ghadir S asked Kavika F commented

How to use Decide with Assign Label & Object

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

FlexSim 21.2.4
decideconditional decideassign labelobject with conditional decide
1681121114201.png (887.1 KiB)
lignep3-v2.fsm (197.2 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.

1 Answer

·
Kavika F avatar image
0 Likes"
Kavika F answered Kavika F commented

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).


1681139246442.png (13.4 KiB)
1681139300399.png (20.4 KiB)
1681139324499.png (14.1 KiB)
· 4
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·
Or use an Object Process Flow for the item racks and push to a global list.
2 Likes 2 ·
Ghadir S avatar image Ghadir S Jason Lightfoot ♦ commented ·

@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 0 ·
Ghadir S avatar image Ghadir S commented ·

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 0 ·
1681143237064.png (55.6 KiB)
1681143248410.png (59.9 KiB)
1681144341500.png (38.6 KiB)
1681144368202.png (44.6 KiB)
1681144397136.png (30.8 KiB)
1681144409667.png (47.1 KiB)
1681144426312.png (53.8 KiB)
lignep3-v3.fsm (191.0 KiB)
Kavika F avatar image Kavika F ♦ Ghadir S commented ·
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.
1 Like 1 ·

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.