Connecting "Create a person" process flow logic to a flowitem

Connecting "Create a person" process flow logic to a flowitem

Nate_Neubauer
Not applicable
48 Views
6 Replies
Message 1 of 7

Connecting "Create a person" process flow logic to a flowitem

Nate_Neubauer
Not applicable

[ FlexSim 23.1.0 ]

So I am trying to make a model based off of a Starbucks for a class project. I am not the best at Flexsim and our teacher is learning it with us as well so he doesn't really teach us how to use the software. I wanted to know if there is a way to connect the "create a person" process flow logic to an order or flowitem to my 3D model. I only have a working cafe but I am assuming that it would have similar logic. Anyways I am using the "create a person" that makes a customer, and the customer orders and sits down to wait for the drink to be made. when the drink is made, the customer walks up and picks up his order and leaves. This is where the issue happens. How do I connect that order to that customer? I have it when the customer picks up his drink, the object gets deleted but if I have too many customers or too many drinks, it breaks due to the way my process flow is.

My model is below. Any feedback on it would be greatly appreciated, even if its not about the process flow itself just how the logic should be and the model.

Starbucks_1.fsm

0 Likes
Accepted solutions (1)
49 Views
6 Replies
Replies (6)
Message 2 of 7

moehlmann_fe
Observer
Observer
Accepted solution

Your model was not uploaded successfully, so I don't know for certain. But it sounds like you might be using a Wait for Event activity but wait for any drink to become available, so all customers would try to pick it up.

Attached is a simple example model. For each person, a "drink" is created in a queue. The customer than moves to the queue and waits until their specific item finishes processing. Then they load it and move away.

1711350555201.png

I hope this is helpful.

wait-for-specific-event.fsm

0 Likes
Message 3 of 7

Nate_Neubauer
Not applicable

Starbucks_1.fsm

Here's the file. Hopefully it works.

what you did made sense but when I tried it, it didn't work. I think it is due to that I am using subflows and I am not getting the actual data in the same.

0 Likes
Message 4 of 7

moehlmann_fe
Observer
Observer

When the "drink" token is created, assign the token that caused the creation (the "customer" token) on a label. This allows you to assign the created item to a label on the customer token.

1711380707882.png

The "waiting" token has access to the labels on its parent (see the settings on the Run Sub Flow activity), so you use that label in the Wait for Event activity to wait until the specific drink is read.

1711380781535.png

starbucks-1-fm.fsm

0 Likes
Message 5 of 7

Nate_Neubauer
Not applicable
That makes so much more sense, thank you.
0 Likes
Message 6 of 7

Nate_Neubauer
Not applicable

For the first model I sent in, I got working, but now I added more process flow and what worked the first time isn't working this time around. This is for the added drive through section. what is necessarily the problem with what I have? I am also getting an error message that I tried troubleshooting but I haven't determined why it is happening. It seems to happen around 7:00 am. here is the link to the model.

starbucks-1.1.fsm

0 Likes
Message 7 of 7

moehlmann_fe
Observer
Observer

There are quotation marks at the end of the distribution expression for the customer quantity in many of the source table rows which cause the compiler errors.

1712125110321.png

In the two Wait for Event activities of the "drive through" side, you do not specify what the "drink" label signifies. You have to select "match" to make sure the the token waits for the correct item to finish processing.

1712125198019.png

You now have two zones that each allow one token access to processor7. You either need to use the same zone for both flows so that still only one token can enter. Or (if two items can occupy the processor at the same time) use the same logic as above and wait for the specific item to finish processing.

0 Likes