Hi, just a quick question: which function is more efficient between X IF MISSING and IF THEN ELSE in terms of calculation time?
As I understand it, if we consider two variables A and B, X IF MISSING(A,B) and IF THEN ELSE(A=:NA :,B,A) will give the same result. In this case, is it better to use one expression rather than the other?
Thank you for your answer.
X IF MISSING / IF THEN ELSE
-
- Super Administrator
- Posts: 4849
- Joined: Wed Mar 05, 2003 3:10 am
Re: X IF MISSING / IF THEN ELSE
Probably X IF MISSING. Data variables are calculated only once before a simulation starts, so if you are running sensitivity/optimization, X IF MISSING will execute once, the IF THEN ELSE will execute every time the model is run.
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: X IF MISSING / IF THEN ELSE
X IF MISSING is also more convenient if you have multiple data inputs in the equation.
/*
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
*/