I have a global Table where some of the columns are Tracked Variables. I want to access the average of each cell of "T between shuttles" and store it in the next column. The manual tells me how to do this for a Global Tracked Variable, but it is not working for the local one.
Here is the table: the column "T between shuttles" is the tracked variable and "Avg TBS" is where I want to store the average.
This is the Custom Code I have tried.
/* Calculate TBS, store in table */ Variant value = Model.time - table[row]["Leave time"]; table[row][column] = value; /* get average value, store in next column */ TrackedVariable trackedVar = table[row][column]; double avg = trackedVar.average; table[row]["Avg TBS"] = avg;
When the logic gets to "trackedVar" it gives a "Null" value for it.
If I try using "avg = table[row][column].average;" the error message says you can't use .average with a table.
I can't find any other explanation of this in the manual.