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
reccurent sequence
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
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
/*
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
*/
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]
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 231 times
/*
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
*/
Hope it helps. Another place to look is the Numerical Recipes book series - I think there are some sections on nonlinear root finding.
Tom
Tom
/*
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
*/