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.

Glenys C avatar image Glenys C commented ·

Hi @Brittany Evans!

Thank you so much for taking the time to provide me with such a detailed explanation, I really appreciate it.

However, I am having some issues with adopting your approach. For example, after setting all the parameters as per your instructions, the set-up time for the processor is only triggered after the first flow item enters the system. In addition, the set-up time is 2s though the delay time set as is 50s (following your model). I have attached the picture as well as my model for easy reference.

Do note that I have disconnected the source2 to queue4 so that the 'dummy' flow items will not affect my new settings. Also, i only set the new settings for my first processor "dispensing".

I hope to hear from you again! Thank you so much! :)

AMCMockUp_updated - Copy.fsm

0 Likes 0 ·
Brittany Evans avatar image Brittany Evans ♦ Glenys C commented ·

Hi @Glenys C,

I am not sure that the model you attached is the right one. It looks like it has none of the On Reset code of the On Message Code.

My example model did have a Setup Time on it but that was just to demonstrate that you can still have a setup time for individual items on top of having a initial setup time. If you only do the setup once, then you can remove the set-up time all together. This may be why you only see the 2 seconds.

0 Likes 0 ·
Glenys C avatar image Glenys C Brittany Evans ♦ commented ·

Hi @Brittany Evans,

Thank you so much for all your help, I really really appreciate it. Your solution has helped me a lot. Have fixed the issue and my model is running fine now. Once again, thank you so much! Stay safe and healthy :)

0 Likes 0 ·