ATTENTIONThis 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 |
#1
|
|||
|
|||
Queue -weight limiting
hi
I am having some problem to complete my example model. Here each of the item has weight value as label. after process it will go to queue and i wanted to setup of a weight carrying limit for the queue. 1. I have added currentweight to count total weight , when it will be >=12 , the output will open and transporter will move all the items. But after first transportation finish , how i can reset the value of currentweight in the Queue ? 2. and how i can tell the transporter that when the simulation end (no more items to come) even if the weight is below 12 , transport all of them. Please help |
#2
|
||||
|
||||
1. onexit of the queue, either subtract the weight everytime an item leaves or make the your label 0 when the last one leaves (content(current) == 1, because the in the exit trigger the item is still in the queue)
2. You don't tell the transporter but you tell the queue to release all items by sending a message (probably a delayed message) to the queue when the last one is processed and on this message you open the output. |
#4
|
|||
|
|||
i mean what can be the code actually for using senddelayedmessage in my model now? i was looking the manual also,.. cant get it properly. please anyone help?
|
#5
|
||||
|
||||
Suppose you know on your processor when your last product (in this case your 100th) has been processed then you can state something like:
Code:
if( getoutput(current) == 100 ) { senddelayedmessage( outobject( current, 1 ), 0.1, current, 1, 0, 0); } and on the onmessage of your queue you could write Code:
if( msgparam(1) == 1) openoutput(current); |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
jasonjj (06-26-2012) |
#6
|
|||
|
|||
THANKS !
so the first code will be in Processors ONExit Triggers ? and if i have more than 1 processors will this code remain the same ? also dont understand why u said "(in this case your 100th)" Last edited by jasonjj; 06-26-2012 at 09:08 AM. |
#7
|
||||
|
||||
yes as long as your queue is the first output port of the processor.
But considering your questions have you worked your way through the tutorials? And might I suggest to follow a basic training somewhere |
#8
|
|||
|
|||
yap.. i look through some tutorials also. but not become the expert yet
if( getoutput(current) == 100 ) ; here by 100 you are meaning the number of item get out from the process ? so it should not be 15 ? as i have 15 items to come. I tried with putting the first code OnExit trigger of Processor and second code Onmessage trigger of Queue ! but still not working.. Thanks again for your time ! |
Thread | Thread Starter | Forum | Replies | Last Post |
Two queue's and a processor | Jelmer Js | Q&A | 2 | 04-19-2011 05:25 AM |
question about queue | Robert Liu | Q&A | 9 | 12-28-2010 06:26 AM |
3 queue problem | shafizad | Q&A | 4 | 08-06-2010 01:51 PM |
Pulling from a Queue vs Sorting the Queue | Brandon Peterson | Tips and Tricks | 3 | 03-03-2010 01:27 AM |
Queue Sorting | Jeff Nordgren | Q&A | 12 | 05-22-2008 03:21 PM |