Anyone can hekps me to solve this equation to convert into VENSIM PLE?
I have to parameter which W and C
How to solve this type of equation
How to solve this type of equation
- Attachments
-
- Convert to the vensim eq PLE
- eqVensim.JPG (12.42 KiB) Viewed 3629 times
Re: How to solve this type of equation
This isn't a dynamic problem, and therefore Vensim is not the tool of choice.
However, you could solve this in Vensim Pro/DSS, using arrays.
In PLE, you could probably simulate this by treating b as time and using a stock to do the summation.
Either way, some other tool would probably make more sense.
However, you could solve this in Vensim Pro/DSS, using arrays.
In PLE, you could probably simulate this by treating b as time and using a stock to do the summation.
Either way, some other tool would probably make more sense.
/*
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: How to solve this type of equation
Then how to structure the equation to make sure its loop so that it can be summation?
- Attachments
-
- try1.mdl
- File Problem
- (2.12 KiB) Downloaded 155 times
Re: How to solve this type of equation
1. There is no loop, because this equation has no feedback.
2. "Final" needs to be a stock. Then:
Final = INTEG( Rate, 0 )
Rate = W(b)*C(a-b+1)
a = ...
b = time
INITIAL TIME = 1
FINAL TIME = a+1
Note that FINAL TIME is > a - the stock introduces a discrete lag of one TIME STEP, so if you want Final to contain the complete sum, you have to run one step past the end.
Why not do this in a spreadsheet? Seems like it would be easier.
2. "Final" needs to be a stock. Then:
Final = INTEG( Rate, 0 )
Rate = W(b)*C(a-b+1)
a = ...
b = time
INITIAL TIME = 1
FINAL TIME = a+1
Note that FINAL TIME is > a - the stock introduces a discrete lag of one TIME STEP, so if you want Final to contain the complete sum, you have to run one step past the end.
Why not do this in a spreadsheet? Seems like it would be easier.
/*
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: How to solve this type of equation
Thank you for helping me
But I'm still have a lot of problem
The reason I don't use excel because main topic is to use VENSIM as dynamic software
Here attached model update by me and hand calculation as required result
I think still need loop since in each row not used previous data or information
Can you help me on this Mr. tomfid?
But I'm still have a lot of problem
The reason I don't use excel because main topic is to use VENSIM as dynamic software
Here attached model update by me and hand calculation as required result
I think still need loop since in each row not used previous data or information
Can you help me on this Mr. tomfid?
- Attachments
-
- IMG_4359.JPG (1.53 MiB) Viewed 3611 times
-
- try1.mdl
- (2.22 KiB) Downloaded 146 times
Re: How to solve this type of equation
Ahh ... if the summation is also time varying, there's no practical way to do this in PLE.
/*
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: How to solve this type of equation
Can you help me complete that equation using my file because I want try to run in DSS or Professional trial version first as consider to buy that software?
Re: How to solve this type of equation
I really wouldn't recommend Vensim for this task, unless it's a small part of a larger dynamic model. There will be a significant inefficiency, because arrays are static. You would have to create an array with the full dimension of "a" which would then be empty 50% of the time, and there would be a lot of overhead for something that's otherwise quite simple. You could do this in Python for free with just a few lines of code, for example.
I don't have time right now, but could work out an example later today.
I don't have time right now, but could work out an example later today.
/*
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: How to solve this type of equation
Did you able to solve it using Python?
Re: How to solve this type of equation
I haven't had a chance to work up a Vensim example.
It would be easy to solve in Python, but I think this isn't really the place to discuss it.
It would be easy to solve in Python, but I think this isn't really the place to discuss it.
/*
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
*/