reccurent sequence

Use this forum to post Vensim related questions.
Post Reply
rosenm
Member
Posts: 32
Joined: Sat Aug 15, 2009 11:17 am
Vensim version: PRO

reccurent sequence

Post by rosenm »

Hello colleagues!
I would like to know:
1)how to solve reccurent sequences in Vensim PLE, for example: x(t+1)=x(t)+1;
2) how to solve system of nonlinear algebraic equations -for example x^2+y^25, x^2-y^2=1;
Thanks in advance
tomfid
Administrator
Posts: 3808
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

1) A recurrent sequence that looks like a discrete-time dynamic model, like your example, is easy to solve:

x = INTEG( dx, x0 )
dx = ( (x+1) - x )/TIME STEP

Here dx represents the change from x(t) to x(t+1). Just be sure to use Euler or Diff integration.

2) This is possible using FIND ZERO in advanced versions of Vensim, but it's not really the purpose of the software. You could probably build a model that solves by representing iterations of Newton's method as time steps, but you'd be better off using some other package.

Tom
rosenm
Member
Posts: 32
Joined: Sat Aug 15, 2009 11:17 am
Vensim version: PRO

Post by rosenm »

Thanks for the answer;
About the nonlinear system - i am wondering , is there a method like realized in the attached file (for linear system 4x+2y=14; 2x+5y=-5), but applicable to nonlinear systems.


[Edited on 11-29-2010 by rosenm]
Attachments
linear_system.mdl
(1.92 KiB) Downloaded 230 times
tomfid
Administrator
Posts: 3808
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

rosenm
Member
Posts: 32
Joined: Sat Aug 15, 2009 11:17 am
Vensim version: PRO

Post by rosenm »

Ok, Thank you very much Tom
tomfid
Administrator
Posts: 3808
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

Hope it helps. Another place to look is the Numerical Recipes book series - I think there are some sections on nonlinear root finding.

Tom
Post Reply