Page 1 of 1

Active Initial

Posted: Tue Jun 16, 2009 3:11 am
by Smooth
Hi
I need help with the Active Initial Function! How does it work?

Posted: Tue Jun 16, 2009 4:44 am
by Smooth
I do not find a way to implement the Active Initial Function in an other programming language, how can I do this? I tried many times, but nothing helps, please help me, thanks!

Posted: Tue Jun 16, 2009 6:37 am
by Administrator
Details on the "ACTIVE INITIAL" function are in the help system,

http://www.vensim.com/documentation/html/22325.htm

Posted: Tue Jun 16, 2009 1:18 pm
by Smooth
I have already studied those notes, but they don't say, what active initial is doing in detail. They break a simultaneous computation, but how does the algorithm behind that works? Thanks for help...

Posted: Tue Jun 16, 2009 2:16 pm
by Administrator
The help is pretty clear. The function returns two different values/equations, one for when INITIAL TIME = 0 and a different result during the simulation (ACTIVE).

It's not that much different from "IF THEN ELSE".

Posted: Sun Jun 28, 2009 12:59 am
by Smooth
Hi,

is testet so often, but this isn't correct:
if(time==0)
initialvalue
else
equation

I'm really sure, that this is not the solution. Please help...

Posted: Sun Jun 28, 2009 9:57 am
by bob@vensim.com
See Chapter 2 of the Vensim Reference Manual. There is a section called "Computational Sequence." The sections before that are also important to understand.

Posted: Mon Jun 29, 2009 5:01 am
by Smooth
Hi its me again,

I have already noticed this Chapter, but I do not understand more, than before. Is it maybe possibel, that someone of the vensim-contributors can look in the source code of vesim, how the function is implemented in vensim?

[Edited on 6-29-2009 by Smooth]

[Edited on 6-29-2009 by Smooth]

Posted: Mon Jun 29, 2009 9:19 am
by bob@vensim.com
The initial component of ACTIVE_INITIAL is executed in stage 2 then the active component in stage 4. If you change the integration type to DIFF you can see the result of the INITIAL computation stored at the initial time, with other integration techniques these are not saved.