how do I reload an existing dataset, including variable values?

Use this forum to post Vensim related questions.
Post Reply
sjgenco
Member
Posts: 25
Joined: Mon Sep 26, 2022 10:52 pm
Vensim version: PLE

how do I reload an existing dataset, including variable values?

Post by sjgenco »

I'm using VensimPLE. Suppose I have a model that includes 6 variables, a thru f, all constants. I use them to create some Custom Graphs. I populate each constant with a value.

Now I want to save this model as my default, so I set the Run Name to 'default' and run it.

Now I play around with my variables, maybe I change the values for a, c, and e to see how that affects my model's output. When I run the model again with my changed variable values, I give it a different run/dataset name like 'new-ace'.

Now I have two loaded datasets, default and new-ace.

I want to get back to my default model, but I don't want to have to manually change each of the variable values back to their original values. Maybe I don't even remember all the changes I've made. I just want to get back to that clean initial model.

If I move 'default' back to the top of my loaded datasets, all my Custom Graphs immediately change back to how they looked originally with the 'default' dataset. Great! But it looks like my variables in my View do not change their values back to their values in the 'default' dataset ... a, c, and e still have their 'new' values.

So how do I get back to my clean 'default' model/dataset, including not just graphs, but variable values as well?
It seems I should just be able to run the model with that 'default' dataset again, but I can't see how to do that.
I must be missing something very basic!
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: how do I reload an existing dataset, including variable values?

Post by tomfid »

Rather than editing equations, you probably want to make your changes to the model live, in Synthesim, or using change files.
sjgenco
Member
Posts: 25
Joined: Mon Sep 26, 2022 10:52 pm
Vensim version: PLE

Re: how do I reload an existing dataset, including variable values?

Post by sjgenco »

Synthesim is great and I've been using it. This is more an issue of getting back to a starting point after changing a model and running it under different names. For example, here is a snapshot of my Control Panel:
vensim-control-panel.jpg
vensim-control-panel.jpg (129.26 KiB) Viewed 551 times
To create a graph comparing the effects of different values of [a], I did 6 runs in which I set [a] to 0,1,2,3,4,5. I called these runs a0, a1, a2, etc. Then I created a custom graph comparing the behavior of another variable when [a] was set to each of these values.
effects-of-a.jpg
effects-of-a.jpg (152.84 KiB) Viewed 551 times
Before I started messing with [a] I wanted to save my model in its original state. So, before doing run a1, I saved a run I called 'default'.

This is the behavior that surprised me. After completing run a5, I wanted to get back to my default variable values. So I moved default to the top of my Loaded datasets list, believing this would "reload" it and replace a5. Immediately, all my graphs returned to how they looked in the default run. However, when I looked at my variable values, [a] was still set at 5 (0.5 actually). It was not reset to its "default" value of 0.31.

Now that's a trivial example. Even I could probably remember how to "get back" if I was only changing one variable in my multiple runs. But sometimes alternate runs consist of changing multiple variables, as in the "p" runs above, which alter 4 variables for each run. Sometimes its just a convenience thing. You just want to start over.

So I guess basically what I'm asking is this: If I modify a model from one state to a new state by changing variable values and saving the run under a different name, what's the best method for getting my model back to its first state, without having to remember everything I changed and reset it manually?

Thanks!
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: how do I reload an existing dataset, including variable values?

Post by tomfid »

If you change variable values interactively, e.g. by moving sliders, the model always retains the underlying equation values as a default. If you change the equations, you have to manually change back.

More advanced versions of Vensim can save and load change files (.cin) during simulations, to make it very easy to manage sets of parameters. They can also restart a simulation from the base values stored in a different dataset. Otherwise, datasets are output-only and the load order doesn't affect future runs.

If you need to recall the value of parameters in a dataset, one option is to use the Runs Compare tool.
sjgenco
Member
Posts: 25
Joined: Mon Sep 26, 2022 10:52 pm
Vensim version: PLE

Re: how do I reload an existing dataset, including variable values?

Post by sjgenco »

Datasets include output data only. That's the little nugget of info I was missing.
I've been thinking of upgrading to Pro for the sensitivity analysis. This could be another good reason to consider it.
Thanks again Tom!
Post Reply