constants or data not showing correctly when forced by reali

Use this forum to post Vensim related questions.
Post Reply
LAUJJL
Senior Member
Posts: 1445
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

constants or data not showing correctly when forced by reali

Post by LAUJJL »

Hi every body

I have a little problem when I force constants or imported data to new values
using reality check.
I illustrate this with a simplistic model with one constant = 10 and a variable = 10 * constant = 100, running during 4 years.
I check with reality check that if i divide the constant by 2 at time 2, the variable will also be divided by 2 at time 2, which of course is evident. When I check the values of the constant in the table it shows a value of 5 which is correct but only at time 1, which is not. Of course I can understand that being a constant Vensim does treat it as a constant not susceptible to vary through the time and shows the last value it had. But this is a bit annoying and if there was a way to avoid it I would be glad to know it.
But if now I decide to import the value of 10 4 times through a tab file and change the type of the constant to a data type, I get with a normal simulation, 4 values of 10 on the table for the constant instead of one when it was a plain constant which is ok.
If I run the reality check, it does not show at all the fact that the value of the constant goes from 10 to 5 at time 2, and shows the value of 10 through all the 4 years when it show the correct value for the variable!
I join a model model1.mdl for the model with the constant, model2.mdl for the model with the data, and the file model2.tab for the tab file and the model2.vdf for the imported file all zipped in a zip file. Il is then not even necessary to import the tab file.
I use many imported data that I need to force to all sorts of value to test the model.
Another question. Is it possible to import lookup tables as data.
I use elasticity functions using lookups that vary through the time and that I need to import from a data base.
Thanks in advance for the help.
J.J. Laublé
Attachments
model.zip
(2.36 KiB) Downloaded 430 times
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

It is true that constants involved in reality checks do not have their dynamics, but only their terminal values stored. We will look at that.

As far as getting data for tables use GET XLS LOOKUPS or you can use ODBC to fetch this information with Vensim DSS.
LAUJJL
Senior Member
Posts: 1445
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

temporary solution for the dynamic of constants

Post by LAUJJL »

Hi bob

Thanks for your prompt reply!

I will use the get xls look up to get data lookups.
As for the dynamic of constants I will temporarily use a dummy variable for each constant or data constant equal to the constant and make reality check to change the values of the dummy variable.
It is a bit cumbersome but it works.
Regards.
J.J. Laublé
Post Reply