Samples don't correspond to output in Stochastic analysis

  • klucas@energy.state.md.us
  • Topic Author
More
19 Sep 2017 13:41 #5730 by klucas@energy.state.md.us
Samples don't correspond to output in Stochastic analysis was created by klucas@energy.state.md.us
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

Please Log in or Create an account to join the conversation.

  • klucas@energy.state.md.us
  • Topic Author
More
19 Sep 2017 14:18 #5731 by klucas@energy.state.md.us
Replied by klucas@energy.state.md.us on topic Samples don't correspond to output in Stochastic analysis
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

Please Log in or Create an account to join the conversation.

  • pgilman
More
19 Sep 2017 16:21 #5732 by pgilman
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.

Please Log in or Create an account to join the conversation.

  • klucas@energy.state.md.us
  • Topic Author
More
20 Sep 2017 08:16 #5733 by klucas@energy.state.md.us
Replied by klucas@energy.state.md.us on topic Samples don't correspond to output in Stochastic analysis
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

Please Log in or Create an account to join the conversation.

  • pgilman
More
20 Sep 2017 14:56 #5734 by pgilman
Hi Kevin,

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

Best regards,
Paul.

Please Log in or Create an account to join the conversation.

Moderators: pgilman
Powered by Kunena Forum