Internal Spread Sheets can be used to change values in your simulation without editing the simulation model itself.

We have 3 different Activities and 3 different product grades. Each grade takes a different amount of time to process within each Activity. The following steps show you how to set up your simulation so that these values are read in from one of Simul8's internal spreadsheets.



Using the naming convention 'ss_xxx' will make it easy to identify your spreadsheet later on. This spreadsheet will be used to hold timing information, so 'ss_timing' is an appropriate name.
Your spreadsheet is now accessible from the 'Spreadsheets' menu on the Build tab.

It is possible to change the timing of an Activity so that it references a particular cell in a spreadsheet.

Double click on the name of your spreadsheet to add it to the text box as above and open a preview of the spreadsheet to the right. There is also a cell reference here, which is where you can tell your simulation which cell in the spreadsheet to look at for this Activity's timing information.
This is Activity 1, and we are only going to consider Product Type 1 at the moment, so we reference cell [1,1].
It is worth noting at this point that, as default, Simul8 uses the convention [c,r], In the Formula Editor you have the option to switch to [r,c].
Choose cell [1,1] and click OK.

Whenever a Work Item enters the Activity, your simulation will reference the appropriate cell of ss_timing to get the timing information.
The next step is to add some more Activities to your simulation model; expand your
4-click so that there are 2 more Activities.
Now we can modify their timings so that they also read the relevant cell within ss_timing.
Pick Activity 2 and set its timing to ss_timing[2,1]. Do the same with Activity 3, and reference ss_timing[3,1].
We now have a simulation model where Product Type 1 takes a different amount of time in each Activity, based on the values in our spreadsheet. The next step is to add the other 2 product types.
We can now add the two other product types and vary the amount of time they take in each Activity, based on the values in our spreadsheet.
First, create a new Label (lbl_grade) See this Tutorial for more information on how to do this.


We now want to vary the row we look at based on lbl_grade.
Instead of always referring to row 1, we want to look at rows 2 or 3 if our lbl_grade is 2 or 3.
Change your cell reference for Activity 1 to ss_timing[1,lbl_grade]. This means that we look at column 1, but the row we look at depends on lbl_grade. We can do the same for Activities 2 and 3, so that they look at ss_timing[2,lbl_grade] and ss_timing[3,lbl_grade] respectively.
In order to ensure our simulation is working as expected, it is important to test the way it behaves.

This will give you the Label value for the selected Work Item. Work out how long you would expect that Work Item to take in Activity 1 (this will be either 20, 120 or 90 minutes depending on Label value). You can then step forward to see when the Work Item leaves and see if this corresponds to the timing you would expect for that Label value.