Page 1 of 1
Support with Vensim non-function Cumulate and NPV
Posted: Tue May 10, 2011 2:50 am
by Quang Trung
Dear All,
Now I use the Vensim for free license, because I am student in Viet Nam.
With free license , Vensim hasn't the "cumulate and NPV " function
My simulation has :
Variable a : = Pulse Train ( 1,20,1,20)*1
c : = Integ(a,0)
It mean that at the month 20th, the C = 20
how to set up the variable b=0.02*c ( the value b is constant , the c in this formular has the value 20 at the month 20 ) ???
Please help me solve this problem !!
Thanks and Best Regards
Re: Support with Vensim non-function Cumulate and NPV
Posted: Tue May 10, 2011 6:41 am
by Administrator
I don't understand what you are asking for here. Can you explain exactly what the problem is?
Re: Support with Vensim non-function Cumulate and NPV
Posted: Tue May 10, 2011 6:49 am
by Quang Trung
My simulation has :
Variable a : = Pulse Train ( 1,20,1,20)*1
c : = Integ(a,0)
It mean that at the month 20th, the C = 20
how to set up the variable b=0.02*c ( the value b is constant , the c in this formular has the value 20 at the month 20 ) ???
Re: Support with Vensim non-function Cumulate and NPV
Posted: Tue May 10, 2011 7:24 am
by Administrator
I still don't understand what you are trying to do here.
Re: Support with Vensim non-function Cumulate and NPV
Posted: Tue May 10, 2011 3:47 pm
by tomfid
Pulse Train ( 1,20,1,20)*1 is going to return a constant value of 1 from time 1 to time 20, because the width of each pulse is greater than the interval between pulses. (It's PULSE TRAIN(start,width,time between,end).)
Your integration for c will therefore be a steadily-increasing ramp with slope = 1. If your TIME STEP is 1, it will reach 19 at time 20 (due to the discrete lag in integration with a large time step).
You can just write an equation b=.02*c.
What are you trying to accomplish with these equations? What is the interpretation of a, b, c? It may help you to define units and make your equations dimensionally consistent.
Tom
Re: Support with Vensim non-function Cumulate and NPV
Posted: Tue May 10, 2011 4:26 pm
by tomfid
Incidentally, CUMULATE is a special function that can be used only in data equations.
Tom
Re: Support with Vensim non-function Cumulate and NPV
Posted: Thu May 12, 2011 2:32 am
by Quang Trung
tomfid wrote:
You can just write an equation b=.02*c.
Tom
Thanks Tom
The problem is at the first time ( time = 1) the value c is 1 , at the time = 20 the value c is 19
In financial , when you want predict at the first time 1 the value b = 0.02 * sumtotal c ( at the time =20 ) , how to set up the function ??
You know with the equation b=0.02*c , it mean that the value change from 0.02 to 0.4 . But I want the value b have 0.4 at the first time. Please help me!!
Re: Support with Vensim non-function Cumulate and NPV
Posted: Thu May 12, 2011 9:10 am
by Administrator
Re: Support with Vensim non-function Cumulate and NPV
Posted: Thu May 12, 2011 9:12 am
by Administrator
As Tom suggested, it would really help if you explained exactly what you are trying to do. a, b, c, 0.02 and 0.04 do not give us any information about what you are trying to model.
Re: Support with Vensim non-function Cumulate and NPV
Posted: Thu May 12, 2011 1:43 pm
by tomfid
Vensim supports only causal models, where values at a given time depend only on values up to that point in time. If you need to refer to a value in the future, you either need a multi-model strategy, or an algebraic expression that solves for the expectation of the future value.
In your case, since you have (simplifying a bit)
y = k*INTEG(1,0)
you can integrate to yield
y = k*(t-1)
in order to create your expectation at time t.
I'd recommend working through the User Guide to get a better feel for the tool.
Tom