Source Problem

Source Problem

Rassuli
Not applicable
2,706 Views
9 Replies
Message 1 of 10

Source Problem

Rassuli
Not applicable

[ FlexSim 24.2.2 ]

Please help this is for my Final Year Project 😞 I am creating a simulation of a kitchen assembly line in FlexSim, consisting of 2 sources (bun and patty), 3 processors (toast bun, condiments, and grill patty), 1 combiner, and 2 queues (Universal Holding Cabinet and Funnel).

Process Flow:

  1. The bun source produces one bun, which is toasted in the processor, and then condiments are added in another processor.
  2. The patty source produces 6 patties at once, which are grilled in the processor and stocked in the UHC (Universal Holding Cabinet), which has a maximum capacity of 12 patties. The patty source will stop producing once the UHC is full and will resume producing 6 patties once space is available in the UHC.
  3. When both the bun and patty are ready, the combiner combines them into a burger and sends it to the funnel.

Settings I have configured in FlexSim:

  • Toast Bun Processor: Process time = 17 seconds
  • Add Condiments Processor: Process time = 10 seconds
  • Grill Patty Processor: Process time = 39 seconds, Max capacity = 6 patties
  • UHC Queue: Max capacity = 12 patties
  • Patty Source: Inter-arrival time = 0s, Arrival style follows this table:
ItemNameQuantity
Arrival16
Arrival26

Issue: Currently, the patty source is set to produce 12 patties in total (6 patties at a time, twice). I want the patty source to stop producing when the UHC is full and resume production once space is available. How can I ensure that? Would really appreciate if someone can help this.

Attached is the file of my model:

Kitchen.fsm

0 Likes
Accepted solutions (1)
2,707 Views
9 Replies
Replies (9)
Message 2 of 10

FelixMoehlmann
Mentor
Mentor
Accepted solution

Add a label to the UHC that will denote the current content plus planned input from the grill. In the exit trigger of the patty source, increment this label by one. If the value is now 12, close the output of the source. Similarly, in the exit trigger of the UHC, decrement the label by 1. If the value is now 6 (so there is space for another batch), open the output of the source again. The source would be set to produce items with an interarrival time of 0 in this case.

0 Likes
Message 3 of 10

Rassuli
Not applicable

Image.png

Image.png

Hello thank you for helping me out, apologies but i dont really understand what you meant. I have tried putting your inputs based on the Source and UHC properties as shown above. Can you show me a step by step approach on your solution. Thank you 🙂

0 Likes
Message 4 of 10

FelixMoehlmann
Mentor
Mentor

The screenshots didn't attach properly, so I don't know what you are having trouble with. All you need is label on the queue that gets reset to 0 automatically and the "Data -> Set Label" and "Control -> Close and Open Ports" options in the exit triggers.

Centerport-connections or pointer labels can make referring to the other object easier (since you check the queue label in the trigger of the source and open the source output in the trigger of the queue). With a centerport-connection between source and UHC, the trigger of the source would look like this (assuming "Content" is the label name).

capture1.png

0 Likes
Message 5 of 10

Rassuli
Not applicable

uhc-problem.png

I have followed your properties settings, creating the Set Label and Close and Open Ports. But I encountered an error as shown in the picture. Is there anything else that I am missing?

Attached is the file that contains the error.

Kitchen.fsm

0 Likes
Message 6 of 10

FelixMoehlmann
Mentor
Mentor

- You didn't add a centerport-connection between the source and queue, resulting in an error message (you can't refer to a centerport-connected object if such a connection doesn't exist).

- You added the trigger options that are meant for the source to the queue. (The queue would check its own content, not that of the source and open the output of the source if the content is at 6. The source on the hand checks the content of the queue and closes its output if the content is at 12. Part of the expression was missing from the screenshot. Here's a larger version. Again, these are the settings for the source).

capture1.png

- Triggers on the source are currently missing completely in your model.

If you are unsure what those expressions actually mean, you take a look at the documentation.

https://docs.flexsim.com/en/24.2/Reference/CodingInFlexSim/BasicModelingFunctions/BasicModelingFunct...

0 Likes
Message 7 of 10

Rassuli
Not applicable

on-exi.png

1734664343320.png

Yup now the error is gone, I have connected the centerport-connection between the source and the queue. Now, the source has stopped producing the patties to the UHC when it is max content of 12. But how do I ensure that the source will continue to produce the next batch of patties when the UHC is emptied?

Summary of the whole process:

  1. Source will produce 2 batch of 6 patties continuously, for the first run. This will filled up the UHC with 12 patties in total.

  2. Source will stop producing patties and wait till the UHC is finished/empty.

  3. Source continue to produce the next batch and repeat the whole process again.


1734663966013.png

Additionally, the label shown is "1111111111" so what i did was changing the "Close and Output ports" --> condition: current.centerObjects[1].Content == 111111111111

0 Likes
Message 8 of 10

FelixMoehlmann
Mentor
Mentor

You now need to same logic "backwards" to the queue: Decrement the content label by one and if it reaches 6, open the output of the source again.

kitchen_1.fsm

0 Likes
Message 9 of 10

Rassuli
Not applicable

Got it! Thank you so much. But I have one more question. Is there any way that I can change the UHC (queue) color to different colors when the content is decreasing. For example:

12 Patties = Green

more than 4 and less than 10 Patties = Orange

less than 4 Patty = Red

So the UHC will follow these colors accordingly throughout the whole process.

0 Likes
Message 10 of 10

Jeanette_Fullmer
Community Manager
Community Manager

Hi @Faris Rizal, was Felix Möhlmann'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