Hi there. I am using Erik Pruyt's Casebook to teach myself
There is an exercise 14.11 on burglarity seasonality
I have time as a shadow variable (setting is months as time unit) going into seasonality of burglaries
(The rest of the model I have - italics is variables)
The instruction is that the variable % houses with opportunities for burglaries = seasonality of burglaries x (1-vigilance)
the % houses with opportunities is => 10% (0.1) and seasonality of burglaries should oscillate annually between 0.25 and 0.75 with peak at end of January (Month 1) and low in July (Month 7)
It seems I should use either SIN or MOD in defining seasonality of burglaries to do this but I just can't get it on my own
Any suggestions
Formula for modelling seasonality
-
- Junior Member
- Posts: 6
- Joined: Mon Aug 10, 2020 4:54 am
- Vensim version: PLE+
Re: Formula for modelling seasonality
You're on the right track.
One option for a controllable wave is:
COS( (time-phase)/period*2*pi )
where phase is the timing of the peak as a time relative to 0, not as an angle and pi=3.1415926.
A more general strategy is:
- use MODULO(time,period) to create a repeating index - for example, period might be 12 months in your case
- create a lookup that uses the index as an input - then you can have any repeating shape you want
Tom
One option for a controllable wave is:
COS( (time-phase)/period*2*pi )
where phase is the timing of the peak as a time relative to 0, not as an angle and pi=3.1415926.
A more general strategy is:
- use MODULO(time,period) to create a repeating index - for example, period might be 12 months in your case
- create a lookup that uses the index as an input - then you can have any repeating shape you want
Tom
/*
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
*/
-
- Junior Member
- Posts: 6
- Joined: Mon Aug 10, 2020 4:54 am
- Vensim version: PLE+
Re: Formula for modelling seasonality
Thanks Tom
I get the idea but seem to have still screwed something up there
Cheers for any further advice on mdl below
I get the idea but seem to have still screwed something up there
Cheers for any further advice on mdl below
- Attachments
-
- 1411HIC.mdl
- !411HIC Model with seasonality
- (10.84 KiB) Downloaded 154 times
Re: Formula for modelling seasonality
Two things:
- your time bounds are inconsistent (months from 2000-2100, which implies years)
- there are quite a few unit errors, some of which may be conceptual problems - the floating point error in "net increase" is probably a conceptual issue revealed by units
- your time bounds are inconsistent (months from 2000-2100, which implies years)
- there are quite a few unit errors, some of which may be conceptual problems - the floating point error in "net increase" is probably a conceptual issue revealed by units
/*
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
*/
-
- Junior Member
- Posts: 6
- Joined: Mon Aug 10, 2020 4:54 am
- Vensim version: PLE+
Re: Formula for modelling seasonality
Thanks .. I have been correcting. v. helpful
Re: Formula for modelling seasonality
Great. Feel free to keep asking questions ...
/*
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
*/