Indexing a Data Record Sequentially or Randomly
This model gives two examples of referencing or indexing data, one row at a time, from a data table (e.g. imported from Excel or stored in a matrix data element). In the first example, rows of data are imported in sequential order from a table in Excel. The spreadsheet element uses the realization number as an offset to import the rows sequentially. The other example samples row offset values between 1 and 1000 from a uniform distribution to reference, in random order, rows of data stored in a matrix data element. The model is static and runs for 1000 realizations. Latin hypercube sampling is turned on so that the stochastic element samples all values from 1 to 1000 (note that a ceiling function is used to get an integer value from the actual sampled value).
After running the model, view cumulative distribution function (CDF) plots in the two result distribution elements. CDF plots should be identical for the two examples. However, if you view the results in table view, you can see that the rows are indexed in a different order in the two examples.