ATTENTION

This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.


flexsim.com

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 06-23-2015
David Chan David Chan is offline
Flexsim Distributor
 
Join Date: Sep 2007
Posts: 326
Downloads: 74
Uploads: 0
Thanks: 217
Thanked 73 Times in 44 Posts
Rep Power: 218
David Chan has a spectacular aura aboutDavid Chan has a spectacular aura aboutDavid Chan has a spectacular aura about
Default Question on Sending by Percentage

Hi

I have a model that has the flowitem that send to two identical processors. The distribution is 60% to the first one and 40% to the other.

I quite surprise that the result obtained from this case is different from switching the ports. That is 40% to the first one and 60% to the second one. I am expecting that the result is the same.

Can anyone explain why?

Regards

David
__________________
Advent2 Labs
David
  #2  
Old 06-25-2015
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

Sounds like you have something else going on in your model.

Attached is a simple model that shows this pick option working correctly.

Please post a simple example model demonstrating your problem, and we can then figure out why it is behaving that way.
Attached Thumbnails
Click image for larger version
Name:	send_by_percentage_output.png
Views:	334
Size:	120.3 KB
ID:	2895  
Attached Files
File Type: fsm send_by_percentage_output.fsm (15.8 KB, 339 views)

Last edited by Phil BoBo; 06-25-2015 at 05:26 PM.
The Following User Says Thank You to Phil BoBo For This Useful Post:
David Chan (06-26-2015)
  #3  
Old 06-26-2015
David Chan David Chan is offline
Flexsim Distributor
 
Join Date: Sep 2007
Posts: 326
Downloads: 74
Uploads: 0
Thanks: 217
Thanked 73 Times in 44 Posts
Rep Power: 218
David Chan has a spectacular aura aboutDavid Chan has a spectacular aura aboutDavid Chan has a spectacular aura about
Default

Phil

Thanks for your reply. I have attached my model.

I have run the model for a bit longer time. The throughput are the same, but the waiting time at the queue is different. But what account for the different?

Once again thanks

David
Attached Files
File Type: fsm send by percentage.fsm (79.7 KB, 294 views)
__________________
Advent2 Labs
David
  #4  
Old 06-29-2015
Phil BoBo's Avatar
Phil BoBo Phil BoBo is offline
Flexsim Development
 
Join Date: Jan 2008
Posts: 756
Downloads: 109
Uploads: 18
Thanks: 385
Thanked 1,483 Times in 525 Posts
Rep Power: 1174
Phil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond reputePhil BoBo has a reputation beyond repute
Default

You are passing 60 and -59 as your percentages. (or 40 and -39 for the other scenario.)

You should use 100-getlabelnum(current,"percentage") instead of 1-getlabelnum(current,"percentage")

Note that you will still have different staytimes between these two scenarios. The comparison in the code is checking if the random number is <= the percentage. So you are checking against 40 for one scenario and 60 for the other scenario. So in the 60 scenario, it is the 40% that would go to that port in the other scenario, plus another 20% that will now also go to that port; not the 60% that weren't sent to that port in the first scenario. At different times, you will be sending to ports where there is already an item in the processor. Hence, the difference between scenarios.

Here is a picture that might help explain the difference:



If you want identical staytimes in these scenarios, then you need to base the port on the scenario, not the comparison percentages. See the attached model.
Attached Thumbnails
Click image for larger version
Name:	send_percentages.png
Views:	563
Size:	7.3 KB
ID:	2905  
Attached Files
File Type: fsm send by percentage_port scenarios.fsm (144.4 KB, 300 views)

Last edited by Phil BoBo; 06-29-2015 at 10:20 AM.
The Following 4 Users Say Thank You to Phil BoBo For This Useful Post:
RalfGruber (06-29-2015)

Tags
flowitem, percentage, send


Thread Thread Starter Forum Replies Last Post
Send to Port By Percentage Herwina Richelle Andres Flexsim Student Forum 6 03-17-2015 09:58 PM
collecting state percentage periodically David Chan Q&A 2 06-16-2014 01:26 AM
Send flowitems to different ports by percentage! DilAmaya Container Terminal (CT) Library 7 12-26-2013 05:13 AM
Creation of flowitems by percentage vasiliki grigorakaki Q&A 2 12-11-2011 01:43 AM
Question on sending to different ports Jamie Santa Ana Container Terminal (CT) Library 2 09-09-2009 02:54 PM


All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.