|
Welcome to this month's newsletter! In this issue you'll find:
Creating a Scenario Manager by Frances Collins
To test the sensitivity of your simulation you often want to run your simulation many times but with different values for parameters and store the results separately. To do this by hand can be tedious but using Visual Logic you can completely automate the process.
The approach for creating a scenario manager is really simple:
- Record the values for the inputs you want to change in a spreadsheet.
- Run a trial.
- On the end of each run in the trial record the current run's results to a spreadsheet and read the next set of input data.
As an example lets look at a simple 4 object simulation, as pictured below.
Lets say we want to examine the effect Work Center 1's cycle time has on the average time Work Items spend in the system and the average queue size for Work Center 1.
Changing the Inputs
The first thing we need to do is create a spreadsheet to hold the Work Center's cycle times, let's call it ssInputs. We write the cycle time for each run we want to do on a separate row.

Now we need to tell the Work Center to use the value in the spreadsheet for its cycle time. We do this by writing a spreadsheet reference in the cycle time box, see Figure 3 below. (Tip, put the cursor in the cycle time box, hold down shift and double click to open the formula editor.)
But we don't want a fixed cell reference because depending on the run number we need to look at a different row. So we create a numeric variable, iRowInputs, to hold the row number and use On End Run to increment it, see Figure 1 below.
By default SIMUL8 will have set the On Reset value of iRowInputs to 0. As we will need to use a trial to make the scenario manager run multiple runs this means that at the beginning of each run iRowInputs will be set to 0 so the Work Center cycle time will always be set to 0. To stop SIMUL8 automatically resetting iRowInputs set its On Reset value to blank. Then we can write our own Visual Logic in On Reset to reset iRowInputs only when its the first run in a trial. We use the command Get Trial Run Number to do this. If it returns the value 1 then we know its the first run in the trial so we reset iRowInputs to 2, the first row that contains data.
Recording the Outputs
Now we need to set up a spreadsheet to record the results for each run, lets call it ssResults. We'll write each result we want to record on a separate row and the result for the run in the columns.

Figure 4
The easiest way to get the results into the spreadsheet is to add the results we're interested in to the Results Summary. We can then use the Get Result command which copies a Result Summary value to an information store variable in On End Run to retrieve the result and copy it to our spreadsheet.
To stop the results being written into the same cell each time we need to use a dynamic cell reference so we create a numeric variable, iColOutputs, to hold the column number. As with iRowInputs we use On End Run to increment it, see Figure 5 below. Again we need to set iColOutputs On Reset value to blank so that SIMUL8 will not reset it and write our own Visual Logic in On Reset to reset iColOutputs only when its the first run in a trial.

Figure 5
Running the Scenario Manager
Getting the Scenario Manager to run couldn't be easier. Just select the Conduct Trial option from the Trial menu. Set the number of runs in the trial to be the same as the number of input values you want to test and press OK. The trial will then run. When its completed open ssResults to examine the results. (Alternatively you can use set the main sheet to ssResults and use the Display Main Sheet command in On End Trial to display it automatically for you.)
You can download the example detailed above if you'd like to see this in action. If you have any questions on this topic please email support@SIMUL8.com, we're here to help!
Free Downloads
Our website is always being updated with new support resources. Here are details on some of the downloads that were added this month.
New SIMUL8 Service Pack Version 11 Build 827
A new service pack for SIMUL8 R11 has been released. Build 827 fixes a few issues including the automated loading of simulation files (e.g. with COM). It was possible with
some interactive commands to cause SIMUL8 to load a previous file automatically.
Download the Service Pack | Full Details of What's in the Service Pack
New Learning Zone Model
Change Over No Resources. Shows how to set up a Work Center to require a Resource when processing work but not on Change Over.
Download the Example
Hints and Tips
Adding Customized Data to the Results Summary
You can add any Information Store variable to the Results Summary by right clicking on the variable and selecting ADD TO RESULTS SUMMARY. This means you can create your own customized results and get the average value and the 95% and 99% confidence intervals for it.
Resource Utilization of Over 100%
Sometimes if you are manually setting resources from Visual Logic or depending on the options you have set for resource handling on shift changes you can get a utilization of over 100%. Resources currently in use can be held until the end of their current job and if the resource .Max Available property was reduced, or they have worked longer than their shift, then this would lead to more resource time being used than was available. This will lead to a utilization figure of more than 100% - effectively staff are working overtime.
Are you using SIMUL8 R9?
SIMUL8 R12 is due to be released this summer. Upgrades are only available to those who have a SIMUL8 Version that is no older than 2 previous versions. This is to encourage and reward users that use the most up to date SIMUL8 and to reward those that do. So that means that R9 users are about to lose the chance to qualify for the upgrade.
However if you upgrade to or buy R11 in April then you will qualify for the upgrade to R12 for free, Check out Why R11? to see all the great features made available in R11 and watch this space for what's going to be available in R12!
To qualify for this offer you will need to purchase the upgrade on-line or contact us. Please quote offer code ZX2452.
If you have any questions generated from, or comments about this
newsletter then email Newsletter@SIMUL8.com
|