What PLE could do with cummulative values???

Use this forum to post Vensim related questions.
Post Reply
yanet288
Junior Member
Posts: 6
Joined: Sun Sep 16, 2012 3:46 pm
Vensim version: PLE+

What PLE could do with cummulative values???

Post by yanet288 »

Hi all
My question is related to whether or not I can modelling with the Free version of vensim (Vensim PLE) using a value that will feed later on the same variable

Here is the BIG question:
Is it possible to use one variable (stock - level) on Vensim PLE that could store the previous value of the variable and use it to estimate the next value, when I have already declared an initial value, for instance, the equation inside the stock - level is as follow:

Variable name: Aquifer Pollutant Load
Equation: =INTEG(Aquifer Pollutant Load - Pollutant Load OUT + New pollutant Load IN)
- initial value = 100

In order to get the second value of this variable "aquifer pollutant load", which in an excel spread sheet it will be = previous value of the variable "aquifer pollutant load" + new pollutant load IN - pollutant load OUT, which function/type of variable/equation/trick could allow me to accumulate always the previous value of the "aquifer pollutant load" in order to use it for the next simulation?

I have done it on Excel but it seems it could not be reproduced in vensim PLE. I have tried with the CUMULATE function but it indicates this function is not supported by vensim PLE.

Any suggestion/comments/advise are more than welcome!
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Re: What PLE could do with cummulative values???

Post by Administrator »

DELAY FIXED will do what you need. Just delay by one time step (or whatever time you need the previous value from).
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
tomfid
Administrator
Posts: 3994
Joined: Wed May 24, 2006 4:54 am

Re: What PLE could do with cummulative values???

Post by tomfid »

Typically you want to avoid this kind of discrete time formulation though. Much better to free yourself of the limits of Excel and rethink your model in continuous terms.
yanet288
Junior Member
Posts: 6
Joined: Sun Sep 16, 2012 3:46 pm
Vensim version: PLE+

Re: What PLE could do with cummulative values???

Post by yanet288 »

Administrator wrote:DELAY FIXED will do what you need. Just delay by one time step (or whatever time you need the previous value from).
Thank you for your advise
I have used the function DELAY FIXED as follow:
Aquifer concentration (aquifer accumulate, TIME STEP, INITIAL TIME)
but I do get the following error
ERROR: Floating point error computing - AQUIFER Concentration - at time = 14.000000.
Trying to save the results anyway
do you have any idea what I am doing wrong?
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Re: What PLE could do with cummulative values???

Post by Administrator »

Have a look at the numerical values using the table tool and see what is going wrong.

Most likely your levels are going too big.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559
tomfid
Administrator
Posts: 3994
Joined: Wed May 24, 2006 4:54 am

Re: What PLE could do with cummulative values???

Post by tomfid »

For an aquifer, it would be more typical to model it continuously, e.g.

water in aquifer = INTEG( recharge rate - withdrawal rate, initial water in aquifer )
Post Reply