Hey everyone,
in order to use an old model with the new vensim version I had to adjust and recompile my external functions. Unfortunatly now the results with the newer version are slightly different compared to the the results running with the older version. I think it might be because of my external functions. I thought I would create a new savelist with all the variables the are calculated with external function and then compare new and old versions results.
My Question: Is there an easy way to find all the variables that are calculated with the external functions? Looking through the model manually would be too much work.
Thank you in advance.
Cheers
Find variables that use external functions
-
- Super Administrator
- Posts: 4626
- Joined: Wed Mar 05, 2003 3:10 am
Re: Find variables that use external functions
There is not an easy way. You could unload the DLL and then open the model, it will take you to the syntax errors which will be the offending parameters.
Or do a runs compare and see where the differences start.
Or do a runs compare and see where the differences start.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Find variables that use external functions
Alright, I will try that. Thanks for your help.
Re: Find variables that use external functions
... or do a text search in the text view.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Find variables that use external functions
So a runs compare only makes sense, when I use a savelist with all my important (the ones directly stemming from external functions) variables, since I only compare the saved datasets, right? So I tried to find the variables via the text search. I looked up all my external functions in the equation editor under "User defined functions". I noticed that sometimes the external functions name was e.g. "A_B_C" but in the text view of the model the function was only "A B C", which makes it hard to find them. I dont get any errors running it, so I assume that vensim is able to load those functions anyway. But how so, if the name is (even though slightly) different?
-
- Super Administrator
- Posts: 4626
- Joined: Wed Mar 05, 2003 3:10 am
Re: Find variables that use external functions
Start by doing a runs compare on just data and constants, just in case there was an error setting the model up.
Next, unload the external function library. Open Vensim and a copy of the model (keep the original safe), and do a model check. It should take you to the calls to the external function library (as they will now be syntax errors). Make a note of the parameter, and then make the equation "0" so it's no longer a syntax error. Check the model again and it will take you to the next syntax error. This is the only way I can think of to get at the full list of parameters.
Next, unload the external function library. Open Vensim and a copy of the model (keep the original safe), and do a model check. It should take you to the calls to the external function library (as they will now be syntax errors). Make a note of the parameter, and then make the equation "0" so it's no longer a syntax error. Check the model again and it will take you to the next syntax error. This is the only way I can think of to get at the full list of parameters.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Find variables that use external functions
Vensim is generally indifferent to space vs. underbar in names. There's an option to switch display from one to the other, but the default is to use spaces, so a function defined in C as a_b_c will appear as a b c.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/