Hi,
I am trying to set the inter-arrival times of objects coming out of a source, but I would like to set it using a normal distribution, not a constant value for each hour interval. I have created a global table containing the 'means' for each hour of the day. I wrote the following code, that I would like to reference the different cells in that table depending on the hour of day.
I create a double, 'hour', that gets the current hour, and would like to use it to pull from my table of means the corresponding value (using 'hour' as an index):
double hour = getmodelunit(CURRENT_HOUR_OF_DAY);
double mean = Table("ArrivalTable")[1][hour];
I have also created another table to be able to monitor the hour of day, mean and IAT throughout the simulation. When writing the code as above, the hour of the day does not update in the table throughout the simulation, but when replacing [1][hour], with say, [1][11], it works fine.
How do I reference the column of a global table using 'hour' ?
Many Thanks.