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
FAQ Downloads Calendar Search Mark Forums Read

Q&A Using Flexsim and building models

Reply
 
Thread Tools Display Modes
  #1  
Old 01-18-2008
Sung Kim Sung Kim is offline
Flexsim User
 
Join Date: Jan 2008
Location: York, PA
Posts: 85
Downloads: 70
Uploads: 0
Thanks: 70
Thanked 9 Times in 6 Posts
Rep Power: 156
Sung Kim is on a distinguished road
Default MergeSort Spacing Rule For Recirculation

Hi!
I just finished Flexsim Basic Training. To practice Flexsim and to learn more about the FlexScript, I downloaded a demo model from the download page and tried to test it. One model I tried is "Demo_ConveyorSortingSystem" (Author: Tom David). It helped me a lot to understand MergeSort conveyor. I played with it by changing arrival rate to see the behavior of the MergeSort.
One thing that I realized is that, however, when the arrival rate is too fast (expo. 1 sec), the recirculation flow doesn't seem right. The flowitem that passes its sort lane disappears at the end of MergeSort conveyor, and instantaneously reappears at the beginning of the MergeSort. It wouldn't take the reciculation conveyor. To fix this, I modified "Send Requirement" script. It is a very simple change and seems to work fine. However, from time to time, some of the recirculated flowitem seem to ignore the MergeSort conveyor's "spacing rule" and overlap onto the other flowitem. if the overlapped particular flowitem reaches to the recirculation again (at the end of MergeSort), it even ignores the script and reappears instantaneously at the begining point again.

Could you please let me know what I missed and did wrong?
For your review, modified demo model is attached. (I assume this modification and reposting the model with different name here is ok??)
Attached Files
File Type: zip Question_ConveSortRecircSystem.zip (57.8 KB, 387 views)

Last edited by Sung Kim; 01-18-2008 at 03:03 PM.
Reply With Quote
  #2  
Old 01-19-2008
Tom David's Avatar
Tom David Tom David is offline
Flexsim User
 
Join Date: Aug 2007
Location: Schwaebisch Gmuend, Germany
Posts: 430
Downloads: 157
Uploads: 47
Thanks: 486
Thanked 450 Times in 233 Posts
Rep Power: 516
Tom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant futureTom David has a brilliant future
Default

Sung,

First of all I like to suggest, if people do not use the official version 4.01, but a beta version 4.30 (release from?) they should mention in the post, which version they used to build the model.
Please do not fell offended, but this will make life easier .

I had a look into your model and you are right, there is an issue, and that’s why I built a different model called SortingCircleConveyor_TD which you can find in the User Concept section of the Downloads. In this model I address the issue and solved it in my eyes.

I tried to figure out, how you start to solve this problem and had a look into the Send Requirement of the MergeSortA.
For me it looks like that you not really did a change, because you added return (port == 9);

The whole code is
if (getitemtype(item) == port) {
return 1;
}
//return getitemtype(item) == port;
return (port == 9);

This means that depending on the item type the port is returned. But after this return the following code is not executed. In other words it will always return at the first return.
Beside this you made a compare of port and 9 which means you do not return 9 as you might expect. You return 1 or zero, because 9 = = 9 is one and x = = 9 is zero.
If you want return 9 you should just say return9;

Anyway, I hope I was able to give you some hints.

Good success.
tom the (A)tom
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
Reply With Quote
  #3  
Old 01-21-2008
Sung Kim Sung Kim is offline
Flexsim User
 
Join Date: Jan 2008
Location: York, PA
Posts: 85
Downloads: 70
Uploads: 0
Thanks: 70
Thanked 9 Times in 6 Posts
Rep Power: 156
Sung Kim is on a distinguished road
Default Thanks for the hint

Tom,

First of all, I am sorry that I didn't specified the version that I use. I agree that it can make life easier.

I tried the other model you recommended, and your hint helped a lot.

Regarding the code I "ADDED" in the previous demo model, I think you meant what I intended. I didn't expect to have 9 as a return value. I thought the IF statement only returns true when the port num equals the itemtype which can have only 1 thru 8. If the port is 9 (recirculation), I think it passes the IF statement, and reaches to the line "return (port == 9);". I wanted to have return value true for that event to make recirculation. It seems to work fine to make recirculation except the overlapped items.

Thanks,
Sung
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 11:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.