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-25-2012
jasonjj jasonjj is offline
Flexsim User
 
Join Date: May 2012
Location: Netherlands
Posts: 23
Downloads: 5
Uploads: 0
Thanks: 13
Thanked 0 Times in 0 Posts
Rep Power: 98
jasonjj is on a distinguished road
Default 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
Attached Files
File Type: fsm weight limit.fsm (33.5 KB, 81 views)
  #2  
Old 06-26-2012
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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.
  #3  
Old 06-26-2012
jasonjj jasonjj is offline
Flexsim User
 
Join Date: May 2012
Location: Netherlands
Posts: 23
Downloads: 5
Uploads: 0
Thanks: 13
Thanked 0 Times in 0 Posts
Rep Power: 98
jasonjj is on a distinguished road
Default

ok i fix my 1st problem

Can you kindly give me more hints about the code for sending message ?
  #4  
Old 06-26-2012
jasonjj jasonjj is offline
Flexsim User
 
Join Date: May 2012
Location: Netherlands
Posts: 23
Downloads: 5
Uploads: 0
Thanks: 13
Thanked 0 Times in 0 Posts
Rep Power: 98
jasonjj is on a distinguished road
Default

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  
Old 06-26-2012
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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);
}
Assumed is that the queue is connected to the first output port of the processor

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  
Old 06-26-2012
jasonjj jasonjj is offline
Flexsim User
 
Join Date: May 2012
Location: Netherlands
Posts: 23
Downloads: 5
Uploads: 0
Thanks: 13
Thanked 0 Times in 0 Posts
Rep Power: 98
jasonjj is on a distinguished road
Default

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  
Old 06-26-2012
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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  
Old 06-26-2012
jasonjj jasonjj is offline
Flexsim User
 
Join Date: May 2012
Location: Netherlands
Posts: 23
Downloads: 5
Uploads: 0
Thanks: 13
Thanked 0 Times in 0 Posts
Rep Power: 98
jasonjj is on a distinguished road
Default

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


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.