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 08-07-2014
Christian Norregaard Christian Norregaard is offline
Flexsim User
 
Join Date: Oct 2011
Posts: 59
Downloads: 13
Uploads: 0
Thanks: 33
Thanked 14 Times in 9 Posts
Rep Power: 115
Christian Norregaard will become famous soon enough
Default 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
Attached Files
File Type: fsm DemoModel.fsm (47.8 KB, 45 views)
  #2  
Old 08-07-2014
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

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)
  #3  
Old 08-07-2014
Christian Norregaard Christian Norregaard is offline
Flexsim User
 
Join Date: Oct 2011
Posts: 59
Downloads: 13
Uploads: 0
Thanks: 33
Thanked 14 Times in 9 Posts
Rep Power: 115
Christian Norregaard will become famous soon enough
Default

Thanks, Phil.

I will work around it, then. Do you expect this to be fixed in a future release?
  #4  
Old 08-07-2014
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

I will fix this bug for the next release.
The Following User Says Thank You to Phil BoBo For This Useful Post:
Christian Norregaard (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


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.