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
|
|||
|
|||
Strange mergesort behavior
Hi all.
I have encountered a strange issue with mergesort objects. In the attached model, there are 7 identical lines, where a source with an arrival time of uniform(0,2) feeds a queue, which in turn feeds a mergesort. The mergesort feeds 6 processors. The mergesorts have the default "pull anything" pull criteria. If I run the model, some of the lines work, while others don't. On the lines that don't work, the queue has status:releasing, and the mergesort has status:empty, but no flow items are transferred from the queue to the mergesort. Each time I reset and rerun the model, the pattern of working and non-working lines changes. A line that worked on a previous run may not work, and vice versa. I can force the line to run by executing a openip(Mergesort,1) command, but not with an openinput(Mergesort). Can anyone offer an explanation of why the lines do not run? Best regards Christian |
#2
|
||||
|
||||
This appears to be a bug with the MergeSort's wrap-around feature.
Because all of your exit points have a blocking value of 0, when flowitems reach the end of the conveyor, they start at the beginning of the conveyor again. The state of the conveyor when you stop the model is determining whether you see this issue or not. That's why this bug is inconsistent; it is based on the timing of when you stopped the previous run. If you set the last exit point's blocking value to 1, then you can avoid this issue. You can also put the following code into the reset trigger of each of your MergeSorts to avoid this issue. This code will reset the values in their input table that aren't getting reset properly: Code:
treenode inputtable = getvarnode(current,"inputtable"); for (int r = 1; r <= gettablerows(inputtable); r++) settablenum(inputtable, r, 2, 0); |
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
Jörg Vogel (08-07-2014) |
Thread | Thread Starter | Forum | Replies | Last Post |
Operator Behavior Problem | Joseph Mueller | Q&A | 1 | 05-09-2013 03:35 AM |
Batch Behavior Q. | shafizad | Q&A | 11 | 12-13-2010 09:14 AM |
TaskExcuter BreakTime Behavior | Sung Kim | Q&A | 6 | 10-09-2009 11:22 AM |
strange behavior of ts prioity? | zhang xin | Q&A | 7 | 03-23-2009 02:32 AM |
Trouble with mergesort... | Paul Dowling | Q&A | 6 | 02-23-2009 11:20 PM |