Save results

Revision as of 23:56, 21 November 2023 by Mhenrion (talk | contribs)

Normally Analytica must recompute any result when you change an input or when you restart a model. When it takes a long time to compute a result it is useful to save the result in the model, so that

  • you won't lose the result when you change an input it depends on
  • you can see it when you restart the model without having to wait to recompute it, and
  • you can compare it with a new version of the result based on changed inputs

It's also sometime helpful to save data imported from a CSV file or a spreadsheet within a model. Then you won't have to reimport the data whenever you start the model. And when you share the model with someone else, you don't need to remember to send the data files too.

Here's how to save a result, say Objective X, in the model:

  1. Create a place to store the result, say Objective Saved_X.
  2. Create a button called "Save X" and set its OnClick Attribute to:
     Saved_X := X

Whenever you want to, just click button "Save X". It will compute X if needed and save a copy into Saved_X.

If you want to save the prob value (not the mid value), set the OnClick Attribute of "Save prob X" to:

     Saved_Prob_X := Sample(X)

Note that Saved_X will contain only the Mid value and Saved_prob-X contains only the Prob value in this second example. There's no siple way to give it both Mid and Prob values.

If you change an index used by a saved result, it may affect that result. For example, suppose Samplesize = 1000 when you click "Save prob X", and later increase Samplesize to 2000: Then

Comments


You are not allowed to post comments.