question

Stella avatar image
0 Likes"
Stella asked Stella commented

FlexScript Exception - Global Table

Hello, My global table "Orders" table are not updating with OrderNum and OrderSize information. I can use some help troubleshooting my miss in the code or set up. Primer_5-1.fsm1728081002945.png1728081369582.png

FlexSim 24.2.1
flexscript exception
1728081002945.png (928.1 KiB)
1728081369582.png (107.0 KiB)
primer-5-1.fsm (121.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 Stella commented

In the On Creation trigger of the Orders source there is an extra quotation mark in line 17. The "Empirical" class you use in line 27 only works with empirical distributions set up through the respective tool in the toolbox (Toolbox -> Statistics -> Empirical Distribution). If you want to use a global table, use the dempirical() command (for discrete distribution). There are also empricial and cempirical for continuous values.

capture1.png

In the On Exit trigger the code snippet code is duplicated (the GUI only shows it once because the second copy is outside the markup). The duplicate variable declaration causes a compiler error.

capture2.png

In the third Write to Table option you forgot to change the table name.

capture3.png

And finally, you need to rename the "Storage" global variable. The keywork Storage is part of the storage system. Having a global variable with this name is the reason for the comliper error of the slot assignment code.


capture1.png (62.4 KiB)
capture2.png (32.7 KiB)
capture3.png (29.0 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.

Stella avatar image Stella commented ·

Thank you for all the pointers! Big Help!

However, one last item is my tote. After changing the global variable to Storagehouse from Storage, I still cannot seem to get my tote to move to the rack.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Stella commented ·
The Slot Assignment Strategy of the racks is set to require the items to physically fit inside the slot ("Slot Must Have Space"). The totes do not fit onto the rack. So if you want them to move there, deactivate that option.
0 Likes 0 ·
Stella avatar image Stella Felix Möhlmann commented ·
Wonderful guidance! I was able to fix the issue and then some. In addition to your guide, my tote dims somehow changed and had to fix that before I was really able to fit it into the rack. Thanks!
0 Likes 0 ·