Hi,
I am trying to simplify a model by including subscripts. The purpose of the model was to model people progressing from healthy to a level of care need. The subscripts I have in the model thus far are: none, low, medium, substantial and critical.
Rather than have 6 stocks, I have two. A healthy stock a a care stock. I would like the healthy stock to consist of those who are associated with the none subscript and the care stock to contain the other 4.
I am having trouble mapping the subscripts and defining the rate between the two stocks to control the flow between the none subscript and the other care subscripts.
A am trying to use something along the lines of:
[need,toNeed]
0,0.1,0.1,0.1,0.1
0,0,0,0,0
0,0,0,0,0
0,0,0,0,0
0,0,0,0,0
Where the top row of the matrix relates to those who are assigned the subscript none, and the rates in which they move to the other subscripts, low, medium, substantial, critical
Any advice or help would be appreciated.
Many thanks
Joe
Subscript mapping
Re: Subscript mapping
Hi,
I have resolved the issue myself I think see below.
using the matrix previously discussed. I now use the following equations.
health[need]= -sum(develop need[need,toNeed!])
Care[need]= sum(develop need[need!,toNeed])
If you have any other suggestions please let me know.
Many thanks
Joe
I have resolved the issue myself I think see below.
using the matrix previously discussed. I now use the following equations.
health[need]= -sum(develop need[need,toNeed!])
Care[need]= sum(develop need[need!,toNeed])
If you have any other suggestions please let me know.
Many thanks
Joe
Re: Subscript mapping
From your description, it sounds like you could do one of two things:
1. omit the "none" element from your array, and have stocks of healthy people (no subscript) and people needing care (subscripted by need = low, med, subst, crit)
2. have just one stock (people, subscripted by need = none, low, med, subst, crit)
This is actually a case where I would consider not using subscripts. Building an explicit chain of progression among the various health status levels is useful in that it provides a visual map of the process. Whether that's practical or not really depends on how sparse the matrix of possible transitions is. If, for example, it's dense, because all transitions are possible (e.g. someone could go from none to low, or none to crit, or ...), then I agree that subscripts would be very helpful. But if it's sparse (people only move from one state to an adjacent state in the chain), an explicit structure might work.
The simplest possible subscripted structure would be something like:
Need : none, care
Care : low, med, subst, crit
FromNeed <-> need
ToNeed <-> need
Population[Need] = INTEG( SUM( Changing need[FromNeed!,Need] ) - SUM( changing need[Need,ToNeed!] ), Init population[Need] )
Healthy population = Population[none]
Care population = SUM( Population[care!] )
Changing need[FromNeed,ToNeed] = Population[FromNeed]*Fractional transition rate[FromNeed,ToNeed]
Fractional transition rate[FromNeed,ToNeed] = {a matrix of possible transitions - often easiest to set up in a spreadsheet and import with GET XLS or paste as a TABBED ARRAY}
Tom
1. omit the "none" element from your array, and have stocks of healthy people (no subscript) and people needing care (subscripted by need = low, med, subst, crit)
2. have just one stock (people, subscripted by need = none, low, med, subst, crit)
This is actually a case where I would consider not using subscripts. Building an explicit chain of progression among the various health status levels is useful in that it provides a visual map of the process. Whether that's practical or not really depends on how sparse the matrix of possible transitions is. If, for example, it's dense, because all transitions are possible (e.g. someone could go from none to low, or none to crit, or ...), then I agree that subscripts would be very helpful. But if it's sparse (people only move from one state to an adjacent state in the chain), an explicit structure might work.
The simplest possible subscripted structure would be something like:
Need : none, care
Care : low, med, subst, crit
FromNeed <-> need
ToNeed <-> need
Population[Need] = INTEG( SUM( Changing need[FromNeed!,Need] ) - SUM( changing need[Need,ToNeed!] ), Init population[Need] )
Healthy population = Population[none]
Care population = SUM( Population[care!] )
Changing need[FromNeed,ToNeed] = Population[FromNeed]*Fractional transition rate[FromNeed,ToNeed]
Fractional transition rate[FromNeed,ToNeed] = {a matrix of possible transitions - often easiest to set up in a spreadsheet and import with GET XLS or paste as a TABBED ARRAY}
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
*/