Hello,
I am trying to create a variable that accounts for the number of the month as in the following table:
time step -> monthly counter
1-> 1
2 -> 2
3 -> 3
4 -> 4
5 -> 5
6 -> 6
7 -> 7
8 -> 8
9 -> 9
10 -> 10
11 -> 11
12 -> 12
13 -> 1
14 -> 2
15 -> 3
...
My simulation runs for 1200 months at time steps of 1 month. The lookup could work for small runs but I think it is not feasible for the length of my simulation
I am using Vensim PLE version.
Any advice?
Many thanks in advance
José
Monthly Counter
-
- Super Administrator
- Posts: 4573
- Joined: Wed Mar 05, 2003 3:10 am
Re: Monthly Counter
Can you use the MODULO function?
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
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Monthly Counter
Something like:
Month Index = Modulo(Time,One Month)+1 ~ dmnl
One Month == 1 ~ months
Month Index = Modulo(Time,One Month)+1 ~ dmnl
One Month == 1 ~ months
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: Monthly Counter
Thank you guys, I think it works with the MODULO function