Analytica User Group/Reference Webinar Glitch
During the end of the Analytica User Group webinar on 15 Nov 2007, a recording of which can be viewed here:
I encountered a problem that I was unable to resolve during the presentation. For those of you who attended or watched the recording, you may be curious what was happening, and how I managed to fix it.
The original symptom was that the line:
sampleSize := Large_scale_sample_s;
was not having the intended effect. I expected the Run index to be enlarged to 1..10K, but it was remaining with 100 elements.
While trying to debug this, I added an assignment to Run itself to see if that would make a difference:
sampleSize := Large_scale_sample_s; Run := 1..Large_scale_sample_s;
It did not fix the problem, so I removed the extra line. Shortly thereafter, Grace noticed that I had the wrong variable name, that it should have read:
sampleSize := Large_scale_sample_1;
I made this fix, and thought we had found the problem, but it still didn't cure the problem. This is where we left it at the end. After we ended the meeting, I tracked the problem down.
The first mistake I had made was naming one of my variables incorrectly. The decision variable holding the number of meta iterations should have had a name such as "Number of meta iterations". Instead, I had titled it "Large Scale Sample Size". Because of that earier error, I had two variables named "large scale sample size", which was the reason I made the first error in the first place.
It turns out this was the error. Had we noticed this before I had experimented with the line:
Run := 1..Large_scale_sample_s;
the problem would have been fixed. But when this line set Run, because Large_scale_sample_s was 100, Run was set to the literal list 1..100.
The default definition for Run is: 1..sampleSize
Thus, when sampleSize changes, so does Run. You can see this by viewing the object window for Run (with nothing selected on a diagram, from the menus, select Definitions → System Variables → Run). But since I had switched Run from its default to a literal list, I severed this connection. Once I replaced the definition of Run with its default definition, things were good.
If you want to see the final climax, load the model (Reference and Dereference Operators.ana), in the Large Sampler module press "Run Sampler", and after it finishes, view the probabilistic results for the two objective variables.