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 CT > Container Terminal (CT) Library
Downloads

  #1  
Old 09-01-2009
DilAmaya DilAmaya is offline
Flexsim User
 
Join Date: Aug 2009
Location: Tegucigalpa, Honduras
Posts: 2
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
DilAmaya is on a distinguished road
Default Send flowitems to different ports by percentage!

Good Evening,

In my model I have a rack connected to three different queues and I want that the items flow to the queues according to certain percentages. I know that this can be done with the "by percentage" option in the rack's flow; the problem is that my model needs to have 52 racks connected to 104 queues and that exceeds the "by percentage" capacity (it only accepts up to 10 ports).

I need to know how can I make this possible, maybe if I use a table...but please let me know!!

Need some urgent help!

Dil Amaya
Attached Files
File Type: zip Example.zip (40.3 KB, 252 views)
  #2  
Old 09-02-2009
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default Test_DefinePortByPercentage_TD

You are right, if you use the Template Code, you only have 10 entries for the percentage. But what you can do is extend the code in the Code Edit by adding local variables (percent and result/port), adjust the percentage calculation and the return code. But this would be quite some effort, I guess.
Another way would be to use arrays for the local variables (percent and result/port) to make it more flexible. Define a local variable for the array size and this information can be used e.g. in a loop. You could then e.g. use a table to fill the array or directly do it in the code.
That’s the way I would try to go.

I modified your model a bit and it seems to work. I added a Global Table and changed the code in the Send To Port trigger.
Attached Files
File Type: zip Test_DefinePortByPercentage_TD.zip (46.1 KB, 268 views)
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
The Following User Says Thank You to Tom David For This Useful Post:
Pablo Concha (09-02-2009)
  #3  
Old 09-02-2009
Pablo Concha Pablo Concha is offline
Flexsim User
 
Join Date: Aug 2007
Posts: 104
Downloads: 100
Uploads: 1
Thanks: 103
Thanked 52 Times in 37 Posts
Rep Power: 232
Pablo Concha is just really nicePablo Concha is just really nicePablo Concha is just really nicePablo Concha is just really nice
Default

Hello,

What would be the difference between using the arrays option and just using the table ("PercentArray" in Tom's model) and calling it by the default "Discrete Empirical Distribution" option in the Send to Port field...

regards..

Pablo Concha E.
The Following 2 Users Say Thank You to Pablo Concha For This Useful Post:
Tom David (09-02-2009)
  #4  
Old 09-02-2009
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

Tom's code does almost the same thing as the dempirical command. Good suggestion to use that pick option, Pablo.
  #5  
Old 09-02-2009
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 520
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

Pablo,

You are right it would be good first to search through the pick options before writing own code. Thanks for pointing this out.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
  #6  
Old 10-06-2009
Jamie Santa Ana Jamie Santa Ana is offline
Flexsim User
 
Join Date: Jul 2009
Location: Southern California
Posts: 44
Downloads: 22
Uploads: 0
Thanks: 25
Thanked 4 Times in 4 Posts
Rep Power: 135
Jamie Santa Ana is on a distinguished road
Default

Hello,

I'm trying to send 25% of items to a processor, and 75% of items to a conveyor. But, if the processor is busy processing, I want the items to go straight to the conveyor instead of waiting for the processor. So, I've tried adding code at the end of the template code for percentage, but with no success. I've attached a sample model trying trying to accomplish this. Thanks for any help.
Attached Files
File Type: zip percentage bypass.zip (34.1 KB, 240 views)
  #7  
Old 10-06-2009
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default

Jamie,

If you have 1 processor and 1 conveyor then you could do the following:

1.Connect the first output port to the processor and the second one to the conveyor.
2.In the function that you are using to send to port return 0 for the processor and 2 for the conveyor.

Returning 0 for the processor basically tells the item to go to the first open port. Because the processor is connected to port 1 it will try the processor first and if it is busy then it will go to the conveyor lilke you want.

Good Luck,
Brandon
__________________
thats not normal.
The Following 2 Users Say Thank You to Brandon Peterson For This Useful Post:
Phil BoBo (10-07-2009)
  #8  
Old 12-26-2013
sagar bolisetti's Avatar
sagar bolisetti sagar bolisetti is offline
Flexsim User
 
Join Date: Aug 2013
Location: Hyderabad,India
Posts: 160
Downloads: 145
Uploads: 0
Thanks: 124
Thanked 99 Times in 63 Posts
Rep Power: 150
sagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the roughsagar bolisetti is a jewel in the rough
Default

...................

Last edited by sagar bolisetti; 12-27-2013 at 03:14 AM.


Thread Thread Starter Forum Replies Last Post
Using TE FlowItems to Transport other FlowItems juan alberto Q&A 13 09-13-2009 09:00 AM
Problem with Send to Output Port Joe Allen Q&A 3 05-14-2009 02:38 PM
Using Reevaluate Send To vs Pull Brandon Peterson Tips and Tricks 4 11-19-2008 08:56 AM
Automated creation of connections between ports Matthias Hofmann Q&A 3 06-25-2008 03:04 AM
how to send msg to another which do not have connection with the sender object KelvinHo Q&A 3 03-05-2008 04:28 AM


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.