Hi, everyone
I want to achieve this equation
when the equation equal to zero, find the value of p.
So, I used Find Zero function to solve it.
But, when I run the model, the simulation results are incorrect
This is because the denominator cannot be 0.
And, when I change the initial x in Find Zero, the results also have error .
The value of p in the equation must not be zero.
I was wondering how to set the equation run it in Vensim if p≠0 is satisfied.
If it can be solved, I uploaded a simple example below.
Thank you very much!
Kind regards
The question about Find Zero function
Re: The question about Find Zero function
The simple model
- Attachments
-
- FIND ZERO.mdl
- (21.77 KiB) Downloaded 193 times
Re: The question about Find Zero function
I think the immediate problem is that you have the initial guess (initial x) set to 0. If the function's first execution is invalid, it can't proceed with a search.
If you set initial x = 1, it runs, but there's no solution to the equation, so it still fails to converge.
If you set initial x = 1, it runs, but there's no solution to the equation, so it still fails to converge.
/*
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
*/
Re: The question about Find Zero function
To clarify, the equation in the model uploaded appears to differ from the one in your initial post. The model has no solution; the original equation might.
/*
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
*/
Re: The question about Find Zero function
I don't know what any of this means, but with a corrected expression it works:
/*
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
*/