Time Subscript

Use this forum to post Vensim related questions.
Post Reply
vahidi
Junior Member
Posts: 3
Joined: Fri Jan 05, 2018 1:10 am
Vensim version: DSS

Time Subscript

Post by vahidi »

Hi,
How can I formulate time subscript for variables?

For example, how can I define the formula in the attached pic?

In that formula p is variable.

Thank for your attention.
Attachments
Interested formula
Interested formula
Untitled.png (3.17 KiB) Viewed 3116 times
tomfid
Administrator
Posts: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Time Subscript

Post by tomfid »

This looks like discrete time notation, and presumably the summation indicates some kind of state variable dynamics. Hard to say how to implement it without knowing what it's for.

Generically, your two choices are to implement it directly using a subscript to represent the elements of j, or to use a stock to represent the dynamics explicitly.

However, since l(t-1) is independent of j in the summation, this simplifies readily:

r(t) = 1/p * p * l(t-1) = l(t-1)

http://metasd.com/2017/11/discrete-time-stinks/
vahidi
Junior Member
Posts: 3
Joined: Fri Jan 05, 2018 1:10 am
Vensim version: DSS

Re: Time Subscript

Post by vahidi »

Thanks tomfid,

The correct argument is l(t-j) as shown below:
Untitled.png
Untitled.png (3.02 KiB) Viewed 3100 times
I want to model a simple lending system as shown below:
Untitled1.png
Untitled1.png (52.73 KiB) Viewed 3100 times
In this system, loans are made every year and have a redemption period (p). Although p is constant, I want to change it in different simulation runs.
Every year we must repay 1/p of the principal of each loan until full redemption. In fact, the r(t) is the amount of repayment each year that should be calculated by p and l.
vahidi
Junior Member
Posts: 3
Joined: Fri Jan 05, 2018 1:10 am
Vensim version: DSS

Time Subscript

Post by vahidi »

I want to model a simple lending system as shown below:
Untitled1.png
Untitled1.png (52.73 KiB) Viewed 3081 times
In this system, loans are made every year and have a redemption period (p). Although p is constant, I want to change it in different simulation runs.
Every year we must repay 1/p of the principal of each loan until full redemption. In fact, the r(t) is the amount of repayment each year that should be calculated by p and l.

How can I formulate time subscript for variables?

For example, how can I define the formula in the attached pic for the loan redemption?
Untitled.png
Untitled.png (3.02 KiB) Viewed 3081 times
Administrator
Super Administrator
Posts: 4573
Joined: Wed Mar 05, 2003 3:10 am

Re: Time Subscript

Post by Administrator »

If I'm understanding correctly, all you need is

Code: Select all

debt redemption = loan amount / loans redemption period
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: 3804
Joined: Wed May 24, 2006 4:54 am

Re: Time Subscript

Post by tomfid »

I've attached a model of a loan. It gets a little messy if you're interested in exact representation of compounding and payment periods, as you can see. This could be quite a bit simpler if you assumed continuous time and payments.
loan1.mdl
(6.2 KiB) Downloaded 241 times
Post Reply