Page 1 of 1

Expressing the function of an auxiliary

Posted: Thu May 03, 2007 7:06 pm
by Monte
Hi,

Consider the auxiliary variable A that depends on two endogenous variables, denoted by B and C. I am confused as follows:

1) Can we express the function of A as either A(t) or A(B, C)?
2) For a Vensim model, which of these notations should be adopted?
3) If we use the notation A(B,C), is it possible to conclude that the Vensim helps solve partial differential equations?

Thank you very much for your helps.
Monte

Functions

Posted: Fri May 04, 2007 10:26 am
by LAUJJL
Hi

You can express A depending from the time A(t) or A depending from other auxiliaries or constants.
Generally you express A depending from other auxiliaries although A is depending too from the time.
But one can imagine an auxiliary depending directly from the time.
So any method can be used.
As to the partial differential equation, it could be represented theoretically with a system dynamic equation but it is generally better to represent it with other tools more adapted that you find in mathematical packages.
In anylogic you find too a tool to represent dynamical systems using differential equations.
Regards.
JJ

Posted: Fri May 04, 2007 11:15 am
by Monte
Hi JJ,

Thank you for your help.

I fear that the expression A(t) is still unclear whether

A(t) = f(t) = at + bt +ct

where a, b, and c are constants.

or

A(t) = f(B,C) = B+C

For clearity, can we write A(B, C, t) instead?

However, A(B, C, t) seems to denote partial differential equations, whereas SD is said to deal with ordinary differential equations only. This causes my confusion.

Posted: Fri May 04, 2007 11:37 am
by bob@vensim.com
If a variable depends on other it has the equation

a = f(b,c)

The simulation of the model would give the trajectory a(t) -

A partial differential equation has the form

da/db = f1(a,b,c)
db/dc = f2(a,b,c)

and so on. For a lumbep system of differential eqautions (ie classic system dynamics) the only thing on the bottom of a d/d is always t. so that

da/dt = f1(a,b,c)
ab/dt = f2(a,b,c)

and so on. You can approximate partial differential equations by taking discrete sectons of space and having b and c represent different regions. Even in 2 dimensions, however, a square has 4 adjoining squares and the numbe of grid points can be very big indeed - so it gets real messy. Generally, SD models are not great at approximating navier-stokes and other such solution techniques.

Posted: Sat May 05, 2007 7:09 am
by Monte
Thank you very much for your helps.

Posted: Mon Apr 14, 2008 5:49 pm
by grockson
Originally posted by bob@vensim.com
If a variable depends on other it has the equation

a = f(b,c)

The simulation of the model would give the trajectory a(t) -

A partial differential equation has the form

da/db = f1(a,b,c)
db/dc = f2(a,b,c)

and so on. For a lumbep system of differential eqautions (ie classic system dynamics) the only thing on the bottom of a d/d is always t. so that

da/dt = f1(a,b,c)
ab/dt = f2(a,b,c)

and so on. You can approximate partial differential equations by taking discrete sectons of space and having b and c represent different regions. Even in 2 dimensions, however, a square has 4 adjoining squares and the numbe of grid points can be very big indeed - so it gets real messy. Generally, SD models are not great at approximating navier-stokes and other such solution techniques.

Posted: Mon Apr 14, 2008 6:00 pm
by grockson
Dear Bob,
I am a beginner in modelling, and I was introduced to VENSIM PLE by a friend at the University of Western Ontario. I am a grad student in Ghana.

I have beed struggling with how to apply differential equation in this respect on a model.
[dy(1)/dt]=a(1)*y(1)
[dy(2)/dt]=a(2)*y(2)-b(2)*y(2)
a,b are auxillary variables which could depend on a constant or a lookup.

Could you assist me with how to approach this?

Sincerely

Posted: Mon Apr 14, 2008 11:32 pm
by grockson
Bob, so how do i represent this in terms of level, rate, etc. I am doing my best to understand Vensim PLE application.

Posted: Tue Apr 15, 2008 11:24 am
by bob@vensim.com
I am afraid that your notation is not clear. If you are using parenthesis to represent time then you will probably want to reformulate your model as a difference equation model. In this case

y = INTEG(rate,initial value for y)
rate = IF THEN ELSE(Time = 0,a*y,
IF THEN ELSE(Time = 1,a*y-b*y,
0))

or there could be more if then else statements.

If you are thinking of the variables as Vectors, Vensim PLE does not support that so you will need to use something like

y1 = INTEG(a1*y1,initial y1)
y2 = INTEG(a2*y2+b2*y2,initial y2)