question

Delano avatar image
0 Likes"
Delano asked Jeanette F commented

How to set object flow

Hi all Flexsim Senior,


I have 3 processor (A,B1,B2), the processor can only process 1 obect at the same time. how to set the exit object from A the first 3 object in sequence will go to B1, the after 4 object in sequence will go to B2, and so on. 3 to B1, 4 to B2, 3 to B1, 4 to B2 ....



FlexSim 18.1.2
move objectobject process flowobject labels
· 2
5 |100000

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

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Delano,

Please be aware that your FlexSim version is past its supported lifecycle and is no longer eligible for paid technical support. For more information, please see the article "Software Support Lifecycle".

Community members here may still be able to offer advice, but features have been added and bugs fixed in the time since your software version was released. You may find that an offered solution that works in more recent versions of the software is not compatible with your old version, or that a posted sample must be opened in a recent version.

Contact your local FlexSim distributor for information on upgrading or getting a trial license.

Good luck!

0 Likes 0 ·

Hi @Delano, was Xavier Low's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Xavier Low avatar image
0 Likes"
Xavier Low answered Xavier Low commented

@Delano

Based on your description, I have created a simple model, with Processor A having two outputs to Processor B1 and Processor B2.

1713855714717.png

In the properties of Processor A, I set the Send to Port logic to Conditional Port, with the condition as follows:

1713855862080.png

current.stats.output.value % 7 < 3

What this condition does is that it will take the value of Processor A's output, modulo by 7 (getting the remainder of the division), and check if the remainder value is less than 3:

  • If the remainder value is less than 3, send the object to port 1 (Processor B1), else
  • Send the object to port 2 (Processor B2)

1713855714717.png (47.8 KiB)
1713855862080.png (9.1 KiB)
· 2
5 |100000

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

Delano avatar image Delano commented ·

20240423-162609.jpg

Sorry, maybe my explanation is not detail enough, how about if i have conveyor connected the processor, Thanks~

0 Likes 0 ·
Xavier Low avatar image Xavier Low Delano commented ·

Good Day @Delano,

What you can do is add a Decision Point before each of the Processors, and connect it to the respective ExitTransfer (connected to the Processor).

1713935076276.png

In the Source, create an On Creation Trigger (Data > Set Label and Color), with the following logic.

1713935466288.png

current.stats.output.value % 7 < 3 ? 1 : 2

is the ternary operatior of (same as):

if(current.stats.output.value % 7 < 3) {
   return 1;
} else {
   return 2;
}

The first three items created in Source will have a label "Type" of value 1, and the next four items will have a label "Type" of value 2.


1713936045764.png

For the 3 Decision Points, create an On Arrival Trigger (Send Item), and leave the first Decision Point's logic as default.

Change the Condition in Send Item logic for the other 2 Decision Points as follows:

Decision Point near Processor B1:
item.Type == 1

Decision Point near Processor B2:
item.Type == 2

This ensures that for every 7 items created, the first 3 items (Type 1) will go to Processor B1, and the next 4 items (Type 2) will go to Processor B2.

Hope this helps.

0 Likes 0 ·
1713935076276.png (164.2 KiB)
1713935466288.png (76.1 KiB)
1713936045764.png (35.3 KiB)

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.