question

Emily K avatar image
0 Likes"
Emily K asked Emily K commented

Array index out of bounds: Assign Labels

example model.fsm

Hi,

4 totes arrive at buffer2 every 10 seconds, each tote will be sent to the input queue of the processor.

I assign a label called destination, value is the input queue of processor.

But it comes out exception error, what's wrong with the activity assign label?

Any advices is much appreciated.

FlexSim 21.2.4
processflowassign labels
example-model.fsm (148.2 KiB)
5 |100000

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

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Emily K commented

The processors WireBond12, 13 and 14 are not connected to their queue. So "inObjects" is empty and trying to read the first inObjects causes the error.

1670163844273.png


1670163844273.png (102.5 KiB)
· 6
5 |100000

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

Emily K avatar image Emily K commented ·
After connecting processors and queues, the model still not working well.

In Processor process flow, I found that token enters <Push to List> has assigned label <destination>, however when I check the entries, the <has destination> label is still equals to zero. Therefore, agv can't pull anything from the list.

Any mistakes in my push to list/pull to list event?


0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Emily K commented ·
The "destination" label is written to the token, but the item is pushed to the list. Since the item still doesn't have the label, the "hasDestination" field returns 0.
0 Likes 0 ·
Emily K avatar image Emily K Felix Möhlmann commented ·
I got it! I should assign label on token.item! Thanks Felix!
0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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