question

Thalias avatar image
0 Likes"
Thalias asked Thalias commented

Adding Individual Process Times for Items Going to a Combiner

I previously posted a question "How to Use a Single Combiner for Multiple Different Combinations," to which @Jörg Vogel provided a great solution! I've since had a follow up question I thought would be best addressed as a separate post.

Is there a way to set individual process times for items entering a combiner? In other words, let's say I am combining items 1-8. For item 1, I'd like the model to experience a delay before retrieving item 2. Then experience another unique delay before retrieving item 3, and so on.

Wondering if this is even possible with the approach used in the attached model. I'm not very good with Process Mapping, but am open to any solution.

multi-cylinder-combiner.fsm

FlexSim 17.1.2
combiners
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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Thalias commented

That's look more like an delayed entry then actually a longer process time. The combiner starts its process time when all items of a recipe are together. You can increment a label at the combiner by different value depending on the item entering the combiner. Then you can use this label value as the process time. If the item leaves the processor you reset the label.

If you want to prevent that the next item enters the combiner you close the input of the combiner in the on entry trigger and send a delayed message to the combiner. In the on message trigger you open the input again. You set different delay times depending on the item that entered the combiners. But in this approach you can not set an order which item should enter the combiner next.

· 3
5 |100000

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

Thalias avatar image Thalias commented ·

I'm not sure that I follow what you're saying...

Is it possible to make a process map where when a item enters the combiner it closes all ports, delays (depending on its label), and then reopens the ports so the "combining" can continue?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Thalias commented ·

Yes, that is possible, but I prefer close and open input instead of actions on ports.

In the source code of the trigger picklist function "Send Message" I added some commented blocks setting different delaytimes. The first Block uses the Switch ...case structure depending on the label MyLabel1.

// instead of previous else line, this block:
else{
switch(item.MyLabel1){
case 1:{
delaytime = 0;
break;
}
case 2:{
delaytime = 2;
break;
}
case 3:{
delaytime = 4.2;
break;
}
case 4:{
delaytime = 2.1;
break;
}
default:{
delaytime = 0.1;
}
}
senddelayedmessage(toobject, max(0,delaytime), fromobject,param1,param2,param3);
}

The second optional Block looks up for the delaytime in the Global Table 4th column. The row is from the value of the Label MyLabel1.

else{
                    
delaytime = Table("GlobalTable1")[item.MyLabel1][4];
senddelayedmessage(toobject, max(0,delaytime), fromobject,param1,param2,param3);
}

The standard computes the delaytime by doubling the item label value of MyLabel1.

multi-cylinder-combiner-jv.fsm

0 Likes 0 ·
Thalias avatar image Thalias Joerg Vogel commented ·

Wow thank you so much! I ended up using the first block mainly so that I could apply delay times to cylinders 1, 9, and 20 since they aren't in my global table.

The last piece of my puzzle is strictly visual and not as critical, but I'm trying to figure out how to make the cylinders "grow" as they are added to the combiner. In other words, after #2 enters the combiner, I want it to visually show a cylinder "double" the size. After #3, triple the size, and so on until you have the final combined cylinder.

I'm going to attempt this using the visual triggers (Change Size or perhaps Change 3D Shape), although I'll probably need to write this somewhere in the code so it can update after each delay.

0 Likes 0 ·