Cohort models age monitoring

A place for Ventity software questions & answers
moudi
Senior Member
Posts: 59
Joined: Thu Nov 18, 2010 9:18 am

Cohort models age monitoring

Postby moudi » Thu Jun 29, 2017 3:54 pm

I wanted to implement a feature in a population cohort model where age classes can be monitored (e.g. 0-24, 25-34, etc.). For this reason I referred to the sample model "CohortPop+ageMonitorAlt" and used the construction presented there for "childbearing age". So an attribute "Age range 0 to 24" has been created which should receive the information about the age of the cohort. Together with the action "update age range", this attribute can be used to create a new subcollection (age range 0 to 24). So far it works fine.

However I tried to provide this attribute with several items (age 0 to 24, 25 to 34, etc.). This does not work. One solution would be to create a number of attributes for each age class... but this is not very attractive. Is there a better solution? I also tried to use an auxiliary with an if then else functionality, but here I cannot use/convert double to feed the attribute.

Test Group Cohort1m_attribute_age3.zip
(20.44 KiB) Downloaded 2 times

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

Re: Cohort models age monitoring

Postby tomfid » Thu Jun 29, 2017 4:37 pm

There isn't a good solution for this yet.

What I've done, for a very limited set of age classes, is to create an "age class" attribute, and use a command action to update it based on the nominal age of the cohort.

However, the "else if" syntax doesn't work for attribute initialization in attributes, so this requires creation of one action per class.

Sorry. We'll get there.
/*
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

*/

moudi
Senior Member
Posts: 59
Joined: Thu Nov 18, 2010 9:18 am

Re: Cohort models age monitoring

Postby moudi » Fri Jun 30, 2017 12:00 pm

Thank you. It's good to know where to look for a better solution :-) and where not!

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

Re: Cohort models age monitoring

Postby tomfid » Fri Jun 30, 2017 2:57 pm

Actually, I think we have a solution. I'll post ASAP.
/*
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

*/

LarryYeager
Junior Member
Posts: 4
Joined: Fri Oct 14, 2016 12:43 am
Vensim version: Ventity

Re: Cohort models age monitoring

Postby LarryYeager » Sun Jul 02, 2017 10:03 pm

Just added a feature that directly supports grouping attribute values within numeric ranges for a variable or expression. This will be part of Release 1.1, sometime next week.

moudi
Senior Member
Posts: 59
Joined: Thu Nov 18, 2010 9:18 am

Re: Cohort models age monitoring

Postby moudi » Tue Jul 04, 2017 5:45 am

Good. I'm looking forward to this!


Return to “Ventity”

Who is online

Users browsing this forum: No registered users and 1 guest