Active Initial

Use this forum to post Vensim related questions.
Post Reply
Smooth
Junior Member
Posts: 6
Joined: Tue Jun 02, 2009 3:31 pm

Active Initial

Post by Smooth »

Hi
I need help with the Active Initial Function! How does it work?
Smooth
Junior Member
Posts: 6
Joined: Tue Jun 02, 2009 3:31 pm

Post 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!
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Post by Administrator »

Details on the "ACTIVE INITIAL" function are in the help system,

http://www.vensim.com/documentation/html/22325.htm
Smooth
Junior Member
Posts: 6
Joined: Tue Jun 02, 2009 3:31 pm

Post 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...
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Post 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".
Smooth
Junior Member
Posts: 6
Joined: Tue Jun 02, 2009 3:31 pm

Post 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...
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
Smooth
Junior Member
Posts: 6
Joined: Tue Jun 02, 2009 3:31 pm

Post 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]
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
Post Reply