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 11-27-2007
Paul Dowling Paul Dowling is offline
Flexsim User
 
Join Date: Aug 2007
Location: Sydney, Australia
Posts: 42
Downloads: 14
Uploads: 0
Thanks: 12
Thanked 4 Times in 4 Posts
Rep Power: 161
Paul Dowling is on a distinguished road
Default Queue stacking

Hi,

Im having issues trying to stack items neatly in a queue (all on 1 level, long sides touching).

Specifically:

Using setrot in the onentry trigger doesn't seem to rotate the items (??), so i've just rotated the queue 90 degrees. This now creates the problem that the queue is using the longaxis of the box to get the spacing distance. This value also isn't showing up on the productspacing variable in the queue which i thought may be of some use.

I could get around this problem by swapping my x and y dimensions in the original model, but this is part of a much greater project where i don't want to change arould all the other conveyor orientations. i would also like to understand what's going on.

Any comments (or even referencing appropriate documentation) would be appreciated.

Regards

Paul
Attached Files
File Type: zip Queue_stacking.zip (50.1 KB, 349 views)

Last edited by Paul Dowling; 11-27-2007 at 08:04 PM.
  #2  
Old 11-27-2007
AlanZhang's Avatar
AlanZhang AlanZhang is offline
Flexsim Super Moderator
 
Join Date: Aug 2007
Location: CA
Posts: 289
Downloads: 64
Uploads: 0
Thanks: 88
Thanked 91 Times in 47 Posts
Rep Power: 225
AlanZhang is a jewel in the roughAlanZhang is a jewel in the roughAlanZhang is a jewel in the rough
Default

Paul,

I modified your model to show how to do stacking you want inside the queue. Basically, you do not use the default stacking strategy provided by the queue (Choose "Do Nothing" in the Item Placement). Instead, you write some code in the OnEntry and OnExit triger to explicitly set the pisitions and the rotations of the items inside the queue. Here is the code.

OnEntry:
Code:
...
setrot(item,0,0,90);
setloc(item,-ysize(item)*content(current),-xsize(item)/2,0);
...
OnExit:
Code:
...
// reset the item positions in the queue when the first item leaves the queue
int numItems=content(current);
for(int i=2;i<=numItems;i++){
    setloc(rank(current,i),-ysize(item)*(i-1),-xsize(item)/2,0);
}
...
I also attached the model.

Please let me know if this solves your problem.
Attached Files
File Type: zip Queue_stacking_AZ.zip (41.7 KB, 371 views)
__________________
Best,
Alan
  #3  
Old 11-27-2007
Paul Dowling Paul Dowling is offline
Flexsim User
 
Join Date: Aug 2007
Location: Sydney, Australia
Posts: 42
Downloads: 14
Uploads: 0
Thanks: 12
Thanked 4 Times in 4 Posts
Rep Power: 161
Paul Dowling is on a distinguished road
Default

Thanks Alan, thats exactly what i'm after. Wasn't having much success with setrot earlier for some reason.

So presumeably onexit triggers before an item has left the current object (hence only moving content(current)-1 items in the queue)...

Cheers Paul

Last edited by Paul Dowling; 11-28-2007 at 12:21 AM.



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.