question

Josiah S avatar image
0 Likes"
Josiah S asked Ryan Clark commented

Custom queue location and spacing

Hi, I am trying to do a custom placement in a queue (looks like a rack) so that it doesn't look like its all stacking under it. I'd like for it to look stacked on the rack properly with proper space between and height between rows.

(see below picture for what I have now. the red is about how I'd Ideally like them to be, not smooshed together and at that level.)


Thanks!

1640207590084.png

FlexSim 21.0.9
queue loadqueue items
1640207590084.png (369.7 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ryan Clark avatar image Ryan Clark commented ·

Hi @Josiah S, was one of Fang J's or Joerg Vogel's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·
Fang J avatar image
2 Likes"
Fang J answered Felix Möhlmann commented

I think you might need this.queue.png


queue.png (28.1 KiB)
· 3
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·
@Josiah S , because you want to set locations yourself, you have to turn off any methods in a queue.
1 Like 1 ·
Josiah S avatar image Josiah S commented ·

@Fang J @Joerg Vogel I have changed Item Placement and got them to move but I can only get it to stack all the flow items in one given space. I would like to be able to select or program the space between the Z level of each flow item and X, Y levels if possible on entry of said flow items. (I'm doing what I am doing at the moment using snippet code with on entry trigger)1640697031924.png

0 Likes 0 ·
1640697031924.png (200.7 KiB)
Felix Möhlmann avatar image Felix Möhlmann Josiah S commented ·

You can get the current number of items in the queue via "current.subnodes.length" in the entry trigger and then adjust the location of the entering item according to it.

For the z-location you would simply divide by the number of items on one level and discard the decimal places (Math.trunc() ).

The x- and y-locations can be determined similarly or by using the modulo operator "%" (or Math.fmod) which returns the remainder of a division.

CustomStackInQueue.fsm

1 Like 1 ·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered

Then use a rack instead! Any mechanism to control rack like placement costs you as much afford as using a rack. You can compute placement of level and bay by modulus operator and integer division. You can write location values in global table. You can replace a table by multi dimensional arrays. But in the end you will copy just a default rack object. Then use one!

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.