question

nicofdz10 avatar image
0 Likes"
nicofdz10 asked mary edited

how do i set the limit of items processed in a processor (number)?

I have one source with some processors, and need to set a limit for each of them so the machines stop working when they have done an exact number of items,

FlexSim 23.1.1
processorsset item limit
· 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.

mary avatar image mary commented ·

I have attached the reference model that could help you. Create a label on each processor as "Item_Limit" and give the value as per your requirement. Then create "On Entry/On Exit" trigger with "Close and Open ports" option in Processor and give a condition as shown in image.

1686819450346.png

Every time the part enter or exit the processor it will check if the input of processor is matching the "Item_Limit" label of processor. When reaches condition it closes the port.

Open_or_Close_port _Modelv1.fsm

1 Like 1 ·
Julie Weller avatar image Julie Weller commented ·

Hi @nicofdz10, was Natalie White'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

Natalie White avatar image
0 Likes"
Natalie White answered Natalie White edited

You can create a trigger on your processor. When selecting the trigger, point to "Control" and then to "Close and Open Ports." Then, you can specify the condition to set a limit on the number of items processed.

Let me know if you have further questions about using triggers!

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

nicofdz10 avatar image nicofdz10 commented ·
Hi Natalie, thank you.

I have some more questions...

The trigger: On Exit? On stop? On process finish?


And then, the action: Closeoutput?

How do you fill Object and Condition boxes?

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel nicofdz10 commented ·
Hi @nicofdz10, if you look closer at all your questions, you find all you need in given answers and comments. You have to decide, which condition closes when an input or output.

And by the way, there are several tutorials you can do in the manual.

0 Likes 0 ·
Natalie White avatar image Natalie White nicofdz10 commented ·

When filling in your condition box, it is helpful to know that you can reference the number of flow items that have entered the current object with "current.stats.input.value" (or "current.stats.output.value" for the number of flow items that have left).

0 Likes 0 ·