Time Subscript

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

Time Subscript

Postby vahidi » Fri Jan 05, 2018 1:30 am

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
Untitled.png
Interested formula
Untitled.png (3.17 KiB) Viewed 76 times

tomfid
Administrator
Posts: 2052
Joined: Wed May 24, 2006 4:54 am
Location: Montana, USA
Contact:

Re: Time Subscript

Postby tomfid » Fri Jan 05, 2018 5:40 am

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/
/*
Advice to posters (it really helps us to help you)
viewtopic.php?f=2&t=4391

Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics

*/

vahidi
Junior Member
Posts: 3
Joined: Fri Jan 05, 2018 1:10 am
Vensim version: DSS

Re: Time Subscript

Postby vahidi » Fri Jan 05, 2018 11:29 pm

Thanks tomfid,

The correct argument is l(t-j) as shown below:

Untitled.png
Untitled.png (3.02 KiB) Viewed 60 times


I want to model a simple lending system as shown below:

Untitled1.png
Untitled1.png (52.73 KiB) Viewed 60 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

Postby vahidi » Tue Jan 09, 2018 2:05 pm

I want to model a simple lending system as shown below:

Untitled1.png
Untitled1.png (52.73 KiB) Viewed 41 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 41 times

Administrator
Super Administrator
Posts: 2867
Joined: Wed Mar 05, 2003 3:10 am

Re: Time Subscript

Postby Administrator » Tue Jan 09, 2018 2:13 pm

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/viewtopic.php?f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559

tomfid
Administrator
Posts: 2052
Joined: Wed May 24, 2006 4:54 am
Location: Montana, USA
Contact:

Re: Time Subscript

Postby tomfid » Tue Jan 09, 2018 11:55 pm

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 4 times
/*
Advice to posters (it really helps us to help you)
viewtopic.php?f=2&t=4391

Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics

*/


Return to “Vensim”

Who is online

Users browsing this forum: No registered users and 2 guests