Optimization in Vensim

Use this forum to post Vensim related questions.
Post Reply
Sarah8888
Junior Member
Posts: 16
Joined: Thu Feb 08, 2018 12:46 pm
Vensim version: DSS

Optimization in Vensim

Post by Sarah8888 »

Hello,

I have a question regarding optimization/calibration & vensim.

First, some infos: At the moment, I have a model that uses some data via the possibility of "data-import" (and, this will not be changed, those are exogenous variables that use scenarios from other sources) and hence I use in the model the option to specify the variable as a 'data-variable'.

Second, So far, I did the optimization be creating data-variable. For example, I have the endogenously simulated variable 'imports" that I want to calibrate towards the actual "imports" by using different parameters. Therefore, I created a second variable called 'Data imports" (and I use again the 'data-import' function to fill it with the actual data'.

Now, I learned, that I should to this differently. That is, I should instead have just another data-sheet with the entry "imports" (that is, with the exact same names as the endogensouly simulated variable that I want to compare with the data variable). And I should use this for the optimization.

However, what I don't understand is:
How can I create a VPN-file with the data (that I need to use for the Vensim optimization) ? Can this be a different file, than the file form which I import the data for my "data-variables" in Vensim?
2) If I use my method, can I calibrate different variables (endogenously simulated) to other variables in vensim (that import data, and that correspond therefore to the reference data)?

Many thanks (also, please notice, I am not locking for conceptual explanation with regard to model calibration, it is just the technical question, for which I would highly appreciate some clarification).

Thank you
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Optimization in Vensim

Post by tomfid »

I'm not sure you need to change your method - there are really 2 approaches that work.

Option 1 is what you've done, which is to have a model variable (imports) and a corresponding data variable (data imports). Then your payoff has to explicitly specify both, which will look like
model variable|data variable/weight
in text. In recent versions, you can also compare a model variable to another model variable (e.g., for synthetic data experiments).

The only downside is that if you want to compare model vs. data on a graph, you have to select both or use a Custom Graph. This is really the only option if you're importing data via GET XLS DATA.

Option 2 is to use the same name for model and data, as you propose. This enables some shortcuts. For example, if you graph imports, you can compare model and data directly as long as you have the simulation and data vdf files loaded in the Datasets Control. There are some limitations to this - for example, you couldn't write an equation to compute the residual between model and data.

If you've already implemented #1, I wouldn't bother switching.

Tom
Sarah8888
Junior Member
Posts: 16
Joined: Thu Feb 08, 2018 12:46 pm
Vensim version: DSS

Re: Optimization in Vensim

Post by Sarah8888 »

Dead Tom,

Many thanks for these clarifications, very helpful!

The drawback with regard to the graphs is fine - I already 'installed' them. But good to know this is the only drawback, and I will certainly inform myself about the possibility to calculate the residuals !

However, just for clarification: Does Vensim use the VNP-file with this option at all? (Because there would be no need to use now external data for the optimization)?

In any case, many thanks again
Sarah
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: Optimization in Vensim

Post by tomfid »

Whether a vdf is needed or not depends on the data import method.

If you're using GET XLS DATA for everything, no vdf is required.

Otherwise, if you're importing data from text or spreadsheets, you do need the vdf - but you must already have it if your model is working now.
Sarah8888
Junior Member
Posts: 16
Joined: Thu Feb 08, 2018 12:46 pm
Vensim version: DSS

Re: Optimization in Vensim

Post by Sarah8888 »

Ok, thanks, I think I understand this now much better !
Post Reply