question

Krish S avatar image
0 Likes"
Krish S asked tannerp commented

Getting Global Table Values in Experimenter

I am unable to put the values which I got in global table after experimenter. The array is created. But the values are not getting printed in the final output. Is there a problem in my end of replication code? Or I am missing something?

Attaching the file along with this.

1.fsm

FlexSim 18.1.2
global tableexperimenterflexsim 18.1.2global table to experimenter
1600706624996.png (6.6 KiB)
1.fsm (30.9 KiB)
1.fsm (81.9 KiB)
1.fsm (84.7 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.

Krish S avatar image
0 Likes"
Krish S answered

After working on it for sometime, I got how to get global table values during an experimenter. Still need to do some post processing after you get the data. But this might be a good start on how to get global table values in an experimenter. @abhishek.k @joerg.vogel

Final_Solution.fsm


1601004150014.png (18.4 KiB)
final-solution.fsm (34.0 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.

tannerp avatar image
0 Likes"
tannerp answered tannerp commented

@krish.s,

I inserted a break point into your EndofRun code and it appears that the array is created, but it is not getting filled. My guess is that it's because the length of your array is set as the number of rows in the "Final" table, which is 1. So, your loop only runs once to fill the array. This is shown in my screenshot below. I hope this makes sense. Maybe you can take a look at this and see if it's correct.

My suggestion is to add breakpoints like this and make sure your code is working how you expect line by line. Let me know if you have any questions about how to use breakpoints.


empty-array.png (105.5 KiB)
· 4
5 |100000

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