question

Ibnuuusurya avatar image
0 Likes"
Ibnuuusurya asked Jeanette F commented

Limiting/ reset my Source output

I have 2 sources on my model, both are labeled. i want to limit one of my output source into 10output/day. can anyone help me with it? how to limit it? i already try to close output when it reach the limit but how can i reset it when day changes? 1703308717211.png

FlexSim 22.2.0
source controlsourceslimit
1703308717211.png (10.1 KiB)
· 1
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 @Ibnuuusurya, was one of Jason Lightfoot's or Joerg Vogel's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. 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 ·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered

Instead of using the output stats, use your own counter label on the source. Increment that on creation/exit. Depending on your model you may find it easier to destroy the excess created items then just close the output.


Experienced users may want to use a map label to record the number output by date key and reference that in order to choose whether to discard excess items.

5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Joerg Vogel edited

You need an event occurring next or after every 24 hours.

next: You send a delayed message to an object. By receiving such a message on an event called on Message you open the output. You compute the delay when you close the output. Unfortunately you must append a source code line by using source code editor instead of a template editor.

every 24 hours:

  • a user event
  • a source creates an item or a token every 24 hours.
5 |100000

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