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 |
|
Downloads |
Q&A Using Flexsim and building models |
#1
|
|||
|
|||
Getting parts from three conveyors in our defined order
Hi,
Please find my model (6.1 verison) attached to your reference. My problem is, I want the queue to receive parts from three conveyors like Round robin fashion, but my model stops, when any one conveyor is not having parts to fed the queue. The queue must get the parts as like the following conditions. 1st condition - when all three conveyors have parts to fed, then receive parts from conveyor-1 & 2 & 3. 2nd condition - when any one conveyor doesn't have parts to fed, then receive parts from other two conveyors (for eg: if conveyor-1 is stopped, then parts to be received from conveyor-2 & 3. 3rd condition - when any two conveyor doesn't have parts to fed, then receive parts from third conveyor until it also stops feeding the parts. Kindly give your valuable inputs/thoughts about to solve this problem. Thanks to one and all, Regards, RK |
#3
|
|||
|
|||
Jason,
Thanks for your input. I have tried using that option also, but it takes randomly from the port, which is available with parts (, its not following the condition which i said above. My model condition for receiving parts from three conveyor is, First loop- one part from conveyor-1 & one part from conveyor-2 & one part from conveyor-3. this same loop is continued until the part supply from conveyor-1 is stopped. Then my second loop must be fired, second loop- one part from conveyor-2 & one part from conveyor-3. this same loop is continued until the part supply from conveyor-2 (or) 3 is stopped. Then balance parts from conveyor-2(or)3 is to be fed to the queue. I think, i have explained clearly about my problem situation. Thanks, Regards, RK |
#4
|
|||
|
|||
Looks like there might be a problem with 'round robin if available' since ipavailable() is often returning false - defaulting to first available. In turn is seems Opopen is the culprit, returning 0 for the conveyors.
|
#5
|
|||
|
|||
Hi all,
I welcome further more inputs / ideas / suggestions from you all to solve this issue (Round robin-if available not working correctly). I tried with assigning ("IF") condition inside the round robin-if available code, in Queue to open the input ports based on the total demand parts & the received part count. its working fine to some extent. Is there any other way to write a flexsim code without using IF condition inside the round robin-if available. Thank you, Regards, RK |
#6
|
|||
|
|||
This should not be a very complex problem I guess. As far as I know of flexsim if you have attached the conveyor 1,2,3 to the respective input ports of the queue.. it will give preference in that order..
I am using something similar in my model and if there is nothing available at the first input port it automatically picks up from the second... |
#7
|
||||
|
||||
hi,
my first approach was wrong. I need the pull strategy to look for the next port to release an item. The item state must be FRSTATE_READY. Code:
treenode current = ownerobject(c); /**next round robin fashion port*/ int nextport = getlabelnum(current,"f_curinport"); for(int lap = 0; lap < nrip(current); lap++) { if (nextport > nrip(current)) nextport = 1; // continue with an existing port if (getitemstate(first(inobject(current,nextport))) == FRSTATE_READY) { setlabelnum(current,"f_curinport",nextport+1); return nextport; } nextport++; } Last edited by Jörg Vogel; 10-16-2012 at 03:50 AM. Reason: it works not quite right. There must be a condition in the pull strategy, to choose the next port. |
Thread | Thread Starter | Forum | Replies | Last Post |
Receiving parts with respect to its itemtype | Radhakrishnan R | Q&A | 3 | 09-10-2012 01:33 AM |
Feeding source with various demand quantity for 15 different parts | Radhakrishnan R | Q&A | 1 | 05-21-2012 01:10 AM |
Feeding source with various demand quantity for different parts | Radhakrishnan R | Q&A | 0 | 05-18-2012 05:58 AM |
Problems about Input order and picking order | Fernando Fan | Q&A | 8 | 06-10-2011 03:55 AM |
Conveyors, and more conveyors | Davie Stomp | Q&A | 8 | 01-27-2008 11:35 AM |