Samples don't correspond to output in Stochastic analysis

5 posts / 0 new
Last post
klucas@energy.s...
Samples don't correspond to output in Stochastic analysis

Hi,

I am exploring the stochastic analysis section, and I am having trouble correlating the values from the generated input samples to the simulation output. As a simple case, I choose 'scaling factor' as the only input variable and 'electricity load total year 1' as the only output variable. I click on 'compute samples' and copy the window that pops up with the 100 samples and paste into excel. I close the window and immediately hit 'run simulations' and copy the output results into excel.

Since the 'scaling factor' should simply scale the 'electricity load total year 1' value, I would expect that dividing the electricity load total year 1 by the scaling factor would exactly result in the total load inputted in the base model simulation. However, it does not, and a scatter plot of the two values shows them to be rather randomly distributed. Moreover, if I manually sort each value independently and plot them against each other, there is a tight but non-perfect relationship.

It is entirely possible I am performing the steps in the wrong sequence, but this is the way it was described in the webinar video. It seems that the model might be regenerating the samples after I copy them but before the simulation runs. If this is the case, then there does not seem to be an obvious way to get the input values for a given set of outputs, which is obviously problematic. If there is another way to match these up, I'd appreciate some guidance.

Thanks,
Kevin

Tags: 
klucas@energy.s...

I think I might have found a workaround. It is clearly the case that the 'run simulation' generates new samples before each run as clicking it multiple times in succession produces different results each time. However, if one changes the 'seed value' from 0 to something else, it appears that the sample values remain static.

Ideally, it would be nice to be able to still generate random samples and have the sample values 'stick' for one simulation run so the inputs and outputs could be matched up. But I suppose manually changing the seed value to generate a new set of inputs is an ok workaround.

Kevin

Paul Gilman

Hi Kevin,

I think I see your point. If you use the default seed value of zero, and then click Run Simulations, you can't ever see the input samples used to generate the outputs because when you click Compute Samples, SAM regenerates the samples using a different random seed.

It sounds like what you need is a way to show the samples that SAM used to generate the current set of outputs. Am I understanding the issue correctly?

Best regards,
Paul.

klucas@energy.s...

Yes, that is exactly it. In the random mode, the 'run simulations' recalculates the samples as part of its own process, so there is no way to capture them. If you use a non-random seed (i.e. anything other than 1), then you can 'fix' the samples, copy them, run the simulations with those same samples, and copy the output.

Thanks,
Kevin

Paul Gilman

Hi Kevin,

Thanks for the feedback. We'll try to address this in a future version or update.

Best regards,
Paul.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer