question

SudheerReddy avatar image
0 Likes"
SudheerReddy asked Regan Blackett edited

How to maintain always fixed number of tokens in a zone?

As Shown in below, Zone Max Content is 60, as soon as max content is reached the old token should exit the zone to create a space for new token. So that I always keep 60 tokens in the zone. How to achieve this. I am attaching the model for your reference.

zone.fsm

The idea is to have minimum buffer of 60 , until you reach 60 you should not consume instead you should wait for minimum buffer. Once 60 is reached , always maintain 60 and send the remaining token to next step. To achieve this, I thought of creating a zone.

Is there any alternative of achieving this?

FlexSim 19.1.2
zone
doubt1.jpg (21.1 KiB)
zone.fsm (21.0 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

·
Regan Blackett avatar image
0 Likes"
Regan Blackett answered Regan Blackett edited

I would actually use a List for this.

Push tokens onto a List to represent your buffer, describe whatever process you want after the Push to List activity.

Create a single token at the start of you model using a Schedule Source activity to monitor the buffer size. Send that token to a Wait for Event that listens for the on Content Change event of the List. Set the change rule to Arrive at Value, put in 60 and check the box for Fire If Initial Content Meets Rule.

As soon as the 60th token is pushed to the list, the puller token will immediately release the oldest token on the list. After the pull from list activity, send the token back to the Wait for Event.

See attached:minimum-buffer.fsm


minbuffer.png (30.8 KiB)
minimum-buffer.fsm (33.7 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.

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.