Support with Vensim non-function Cumulate and NPV

Use this forum to post Vensim related questions.
Post Reply
Quang Trung
Junior Member
Posts: 4
Joined: Tue May 10, 2011 2:42 am

Support with Vensim non-function Cumulate and NPV

Post 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
Last edited by Quang Trung on Tue May 10, 2011 6:53 am, edited 1 time in total.
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Re: Support with Vensim non-function Cumulate and NPV

Post by Administrator »

I don't understand what you are asking for here. Can you explain exactly what the problem is?
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
Quang Trung
Junior Member
Posts: 4
Joined: Tue May 10, 2011 2:42 am

Re: Support with Vensim non-function Cumulate and NPV

Post 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 ) ???
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Re: Support with Vensim non-function Cumulate and NPV

Post by Administrator »

I still don't understand what you are trying to do here.
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: Support with Vensim non-function Cumulate and NPV

Post 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
tomfid
Administrator
Posts: 3994
Joined: Wed May 24, 2006 4:54 am

Re: Support with Vensim non-function Cumulate and NPV

Post by tomfid »

Incidentally, CUMULATE is a special function that can be used only in data equations.

Tom
Quang Trung
Junior Member
Posts: 4
Joined: Tue May 10, 2011 2:42 am

Re: Support with Vensim non-function Cumulate and NPV

Post 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!!
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Re: Support with Vensim non-function Cumulate and NPV

Post by Administrator »

Am I right in saying you want to predict the value?

Will either of the following functions do?
http://www.vensim.com/documentation/ind ... ?22435.htm
http://www.vensim.com/documentation/ind ... ?22775.htm
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
Administrator
Super Administrator
Posts: 4838
Joined: Wed Mar 05, 2003 3:10 am

Re: Support with Vensim non-function Cumulate and NPV

Post 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.
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: Support with Vensim non-function Cumulate and NPV

Post 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
Post Reply