question

Aaupadhye avatar image
0 Likes"
Aaupadhye asked Natalie White commented

Assigning label based on quantity of arrival?

Hi all,

I hope all is well. I am super new to FlexSim and I have just started my first model. I am trying to route orders of items based on their quantity. To do this, I first created an arrival schedule, and then added an on creation trigger that assigned a label to the arrival if the quantity is less than 5 or is greater than equal to 5. After this, I want the arrival to go to the queue and be routed to the Autobagger or Packing Station A based on its label. The issue is that my source isn't even creating any items and I am also not sure if I did the triggers correctly. Does anyone know how to solve this? I will also attach my file.


WCOC Simulation Project.fsm

FlexSim 23.0.8
sourcelabelports
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Natalie White avatar image Natalie White commented ·

Hi @Aaupadhye, was Julie Weller'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 0 ·

1 Answer

·
Julie Weller avatar image
1 Like"
Julie Weller answered Julie Weller commented

Hi @Aaupadhye! I looked at your model and the issue is the way that you're trying to set your label. Right now you're try to say if item is > 5 set port to 1, but the compiler can't find a value for item, nor can you set the send to port that way. I would create your label in the arrivals table instead of in the source trigger, like this:

1687296231413.png

Then you can delete the triggers and on the pouching system queue in the Output properties you can add a conditional port:

1687296323899.png

You have some other errors that I would also get rid of like changing your Packing Station B to use the number 5 instead of the getProperty command which is for developer use usually and is giving you tons of errors. (BTW: It's best practice not to post a model with errors unless that is your question, understanding and solving the errors first helps solve the problem a good chunk of the time).

I hope that helps you understand what's happening more! Here the file for reference:

wcoc-simulation-project_1.fsm


· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Aaupadhye avatar image Aaupadhye commented ·
Hi @Julie Weller, thank you so much for this! You cleared everything up for me. Also, thanks for the heads up with the errors and posting. I was also wondering- in the event I wanted to go and use a randomized distribution as the source instead of an arrival schedule, how would I go about accomplishing the same task?
0 Likes 0 ·
Julie Weller avatar image Julie Weller Aaupadhye commented ·

@Aaupadhye, that is a super good question! I thought about it for a bit and I think the easiest way to do it would be to create a really simple process flow. I created a Inter-Arrival Source that makes the tokens randomly, then added an Assign Labels activity that labels that token with a random number of items (I used a discrete uniform statistical distribution so it chose integers from 1-10):

1687299426642.png

Next I had it spawn the appropriate number of tokens and connected that to a Create Object activity that then created and labelled those tokens in the pouching system queue:

1687299549847.png

1687299559603.png

I then added sinks so that the tokens wouldn't just hang around in the process flow. My final process flow looked like this:

1687299598476.png

I'll attach the model though so you can look at it in more depth and play around with it!

wcoc-simulation-project_1.fsm

Does that do what you wanted? Also if you want more detailed tutorials to learn more about the software I highly recommend working through these :)

https://docs.flexsim.com/en/23.1/Tutorials/Introduction/Introduction.html

0 Likes 0 ·
Aaupadhye avatar image Aaupadhye Julie Weller commented ·
This answers my questions regarding this section of my model for now! Again, I'd like to thank you so much for your help!
0 Likes 0 ·
Show more comments

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.