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-11-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default how to change exit position of MergeSort dynamically ?

how to change exit position of MergeSort dynamically like like the first attach video,i connect more queue to MergeSort , the item will move out the MergeSort,the two model code is the same .see the second video. i think the code like these cause the problem.
for(int i=1;i<=nrop(current);i++)
{
settablenum(node(">variables/outputtable",current),i,1,xloc(outobject(current,i ))-xloc(current));
settablenum(node(">variables/sortedtable",current),nrip(current)+i,1,xloc(outob ject(current,i))-xloc(current));

settablenum(node(">variables/inputtable",current),i,1,xloc(inobject(current,i))-xloc(current));
settablenum(node(">variables/sortedtable",current),i,1,xloc(inobject(current,i) )-xloc(current));
}

how to solve the problem? i try a lot but not successful ,the third attach is a small that have the same problem.
Attached Files
File Type: zip mergesort-problem.zip (1.95 MB, 178 views)

Last edited by LINWEIXU; 08-12-2010 at 01:39 AM. Reason: use zip
  #2  
Old 08-12-2010
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: 520
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

Linwei,

I think this is a problem created events and I wonder how it should work if you do not change the events if you change the position where the events should happen.
If an item arrives on the MergeSort an event is created when the item hits a transfer point (see in the project tree under exec/events). If you now change the position of the Exit Points (transfer points) the events in the event list will still be fired on the first calculated time.
To make this working in my eyes all the events need to be recalculated or let me say current events need to be destroyed and new events need to be generated.

Don’t ask how to destroy and create events, because this is very advanced and I am not sure if I know how to do it properly.

There must be another way to solve your task. I guess you should explain what and why you like to do it in other words what exactly your task is. Then there might be another solution then messing up the MergeSort functionality.

Let’s speak about reality. How would you change an exit point on a conveyor dynamically? Normally there might be photo eyes or barriers (which have fixed positions) to stop or transfer items from a conveyor.
The only situation which comes to my mind where products picked from a conveyor during conveying is if an operator picks them directly. I remember a thread where this task was discussed.

I had a very special conveyor project (don’t want to explain it in depth), where I change the size and photo eye position on a conveyor in my model (even if this is not possible in reality). I remember that it was necessary to do this before the item enters the conveyor and was only possible if there is no item on the conveyor. The reasons I explained above.
But I did this before we had the BasicConveyor. Actually the BasicConveyor was invented because of my project.
So I guess a solution for you could be to use the BasicConveyor which is very flexible, but also means that you need to “program” his functionality. In other words on the BasicConveyor you can create your “own” events with the decision points, delayed messages, etc.

P.S.: People, please pack your files in a ZIP file and not in RAR. I know that compressor are freeware, but why should I install another program on my computer and not using the one included (windows zip)? Even if RAR might pack a bit better, on todays hardware I guess ZIP is good enough. What I am trying to say is, that I will not have a look at RAR compressed files ...
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
  #3  
Old 08-12-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

hi,tom ,thank you very much,you are right.
perhaps you do not see the fisrt video? that is why ,i want to change to exit position dynamically.the stacker-reclaimer is move along the conveyor so the exit position is changing along the stacker-reclaimer moving. stock pile is very long, so the transit time is different along the stacker-reclaimer moving. the item donot move out convey directly ,must by stacker-reclaimer .if the exit position donot change dynamically,that is mistake.if you see the first video,you will undstand.
and i know there is command changeconveyorspeed(obj conveyor, num newspeed ),this command perhaps have relationship with event, so probably have a function called ‘setportposition()’ or something similar that then handles the required extra functions. i think this is important to handle
bulk material handling .jason seems can handle this problem,but he is too busy.i have talked with him. perhaps some other delevoper also can delevop it . so i need support.
  #4  
Old 08-12-2010
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: 520
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

Yes, you are right I did not see the video, because it was compressed with RAR.
Now I downloaded the archive again and I can see what you mean.

It is an interesting problem and I am pretty sure that you can solve it with the BasicConveyor. Because you can set in the kinematics the starting position, could set the release point with a delayed message, etc.

As far as I know does changeconveyorspeed() NOT work on a MergeSort. I build a small model and test it and get and Exception in the System Console. I think changeconveyorspeed() is only for conveyors. Maybe someone can clarify this.

In a way I like the idea to have a command to set the entry and exit point on a MergeSort and maybe also to change the speed (if this is not possible in the moment). But I guess it is quite a development job to do.

Another idea could be to change the load time of the stacker-reclaimer depending on his position. The exit point is at a fix position but depending on the stacker-reclaimer position the load time changes. I know that this might not look nice in terms of visualization, but it could be a way to model the task. I did not think it to the end, but I guess it could be an idea.

In the moment I would try the BasicConveyor to solve the task.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
The Following User Says Thank You to Tom David For This Useful Post:
Jason Lightfoot (08-12-2010)
  #5  
Old 08-12-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

hi tom, i know your idea, i make a small model. i also hope there have a command to set the entry and exit point on a MergeSort and maybe also to change the speed
Attached Files
File Type: zip MergeSort-problem2.zip (34.9 KB, 159 views)

Last edited by LINWEIXU; 08-12-2010 at 04:09 AM.
The Following User Says Thank You to For This Useful Post:
Tom David (08-12-2010)
  #6  
Old 08-12-2010
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: 520
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

Linwei,

nice model and I see you got the idea. Thanks for sharing your model.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions."
  #7  
Old 09-07-2010
LINWEIXU
Guest
 
Posts: n/a
Downloads:
Uploads:
Default

hi tom
this way also can not solve the problem,today i have free time , i test the way, because the bulk material in the convey must be continuous, there are two position in BasicConveyor, if you use your kinmatics ,the internal position do not change ,so the error will happen,so you must move out the item , and move in ,change the internal position (use bcsetitemconveystate),it is so trouble . attach is the problemed model.

so i am dying to hope the developer can solve the problem. thank you very much.
I also hope the internal position can changing accorde to custom kinmatics
Attached Files
File Type: zip MergeSort-problem2.zip (34.9 KB, 161 views)


Thread Thread Starter Forum Replies Last Post
Exit Chassis Transaction Jamie Santa Ana Container Terminal (CT) Library 1 09-21-2009 11:01 AM
exit after certain time Raul Paz Gripes and Goodies 6 07-20-2009 08:56 AM
Trouble with mergesort... Paul Dowling Q&A 6 02-23-2009 11:20 PM
On Exit (Lead Time) Gavin Douglas Q&A 5 07-30-2008 01:51 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.