Hi,
I have an SD model which has a bunch of dimensioned inputs which values change over time. The changes however are not
triggered by the model's logic - they are known (values on a per time basis for all subscripts are stored in a database)
before the model starts executing.
I am planning to read in these inputs from the database before the model starts running and load them in memory. My
question is whether I can prepopulate the SD model inputs for all time periods before the model starts or I have to
populate on per time period basis as the model runs?
My guess is that I cannot do the latter, and have to settle for the former. If that's the case, I most likely will load
the values in a data structure that allows for fast lookups on a per input per time basis. The question is how do I
catch the event of the model progressing from one period to the next?
Thanks,
-nik
Pavel — 12.08.08
Hi Nik,
For instance, you may create ResultSet and write the data from the database to it. It can be done in the "Startup
code". Then add a statechart to the model that will control the current model time. Thus each transition will occur
at the specified time and the required values will be assigned to the variables in the corresponded state.
I hope it will help.