question

Glenys C avatar image
0 Likes"
Glenys C asked Glenys C commented

Throughput starts counting only after set-up flow item leave

Hello, I have 3 'dummy' flow items that are being used to trigger the set-up time. However, these 3 flow items are being counted into the throughput (input and output). Though, I only want the throughput data to count the actual flow items being processed in the model. I have attached some pictures and my simulation for easy reference. Thank you!AMCMockUp_updated.fsm

FlexSim 20.2.1
flexsim 20.2.1throughput
screenshot-774.png (525.1 KiB)
amcmockup-updated.fsm (117.4 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

Brittany Evans avatar image
2 Likes"
Brittany Evans answered Glenys C commented

Hi @Glenys C,

I would recommend not using a flow item to do the initial setup. I would recommend using messages to initiate the setup. This way you do not have to worry about those dummy flow items messing up your statistics.

I have attached a model that demonstrates this concept that can be applied to your model. In the model, you will see that the processor has an On Reset Trigger and an On Message Trigger.

The On Reset Trigger is used to send a message to the Processor as soon as the model starts running. I just used the picklist option for sending a message. You will notice that I added in a value of 1 for the first message parameter. I did this so I could identify the message that starts the setup from the message that ends the setup. You can kind of think of this as a message type.

The On Message Trigger is where I do most of the logic. In there, you will notice that I start off by closing/opening the input of the processor. I did this in case the a flow item arrived before the setup time was finished. This way the item will not be allow in. To do this, I used the Close and Open Ports Based on Cases picklist option. I closed the input if the first message parameter was 1 and opened it if it was 2. Next, I set the state of the processor based on the first message parameter. If it was a 1, I set the state of the processor to Setup. If it was a 2, I set the state of the processor to idle. Unfortunately, there is not a picklist option for this so I used a Code Snippit. You can do the same and just copy the code over. Lastly, I needed to send another message to the processor at the end of the setup time to open it back up and reset the state to idle. To do this, I copied the Send Message Code from the On Reset Trigger (because there is no picklist option for sending a message on the On Message Trigger). In there I changed my delay time to be the length of my setup time, the first message parameter to be a 2 (because of my second message type), and set the condition to be only if the first message parameter is 1. I changed the condition because we only need to open the inputs back up and set the state to idle only once.

I hope this helps.

If you decided that you did still want to use the flow items to do the initial setup then you would need to create a stats collector that kept track of input and output on its owns without looking at the object statistics and a calculated table that summed things up. The stats collector would need to record a line for every entry and every exit except the first one, which would require a condition that has the processor ignore the first entry. The processor would need to be recorded and if it was an entry or an exit. Then in the calculated table, you could sum up the number of rows and partition them by the processor and if they were an entry or an exit.

I personally feel that the message option may be a little bit easier.

States Using Messages.fsm


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