I have assigned a statistics value to the variable
jeepneys is the population, and
Waiting_Units() is the statistics. When simulated, it only returns 0 and not the statistics value.
It only shows the right statistic value if I add an event with an action
waiting_units = jeepneys.Waiting_Units_MDJ(); to assign the value.
Is there a right way so I can assign the statistics value to a variable without using an event? I need the variable to continuously have the current value of the statistic.
I appreciate any help you can provide.
Waiting_Units() statistic is a function (hence the brackets). By design, it is never actually calculated unless you call it. This is to avoid accidentally slowing your model.
It is your responsibility to call the function/statistic when you need it.
Note that the code in the "Value" field depends on the setup of your current statistic.