I'm trying to reproduce a relatively simple world population model in Vensim. This is my first full model so I'm running into lots of issues, most of which I've been able to figure out, but this one is so simple it has me stumped. This model is somewhat like the rabbit models in the tutorials. I have a process that generates population projections based on a carrying capacity (CC) function. Also included in my model for comparison purposes is a table of population estimates from the UN, starting at 0 AD and going to 2100. I want to produce a simple custom graph that includes CC, population, and this table of UN pop estimates.
The attachment 'view-snippet' shows the variables and the output table as they now appear on my main view.
'pop data' is a standalone variable defined in the variable dialog attachment 'pop-data-lookup-variable'. This is the UN data.
The custom table was created as shown in the attachment 'table-definition'.
What I expected was for 'pop data' to show up on the graphic just like CC and population, but instead it gets translated in the graph as a variable ranging from 1 to 100, so it fails to show up on the graphic at all. That's clear on the 'Test output' version of the graphic. I wanted to attach that, but it appears I'm limited to 3 attachments, so you'll have to take my word for it.
I don't really want to do anything with this UN pop data table other than compare it to my simulation results in a custom graph like this one. It's not an input to anything. So what am I doing wrong to make it convert itself from its actual units to this 1-to-100 version?
Thanks!
trouble with a lookup variable
trouble with a lookup variable
- Attachments
-
- pop-data-lookup-variable.jpg (374.05 KiB) Viewed 1885 times
-
- table-definition.jpg (211.66 KiB) Viewed 1885 times
-
- view-snippit.jpg (136.36 KiB) Viewed 1885 times
Re: trouble with a lookup variable
the units in the pop-data-lookup-variable.jpg image should be 'people' not 'people/Year'. I forgot to change it back before I captured the image.
-
- Super Administrator
- Posts: 4680
- Joined: Wed Mar 05, 2003 3:10 am
Re: trouble with a lookup variable
Try renaming "pop data" to "pop data lookup" (just so it's clear it's a lookup table).
Now add a new variable,
pop data = pop data lookup ( time )
Now run the model and graph pop data, it should show what you want.
Now add a new variable,
pop data = pop data lookup ( time )
Now run the model and graph pop data, it should show what you want.
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: trouble with a lookup variable
Thank you! That fixed it.
- Attachments
-
- view-snippit-fixed.jpg (178.41 KiB) Viewed 1879 times
-
- Super Administrator
- Posts: 4680
- Joined: Wed Mar 05, 2003 3:10 am
Re: trouble with a lookup variable
Creating a lookup is not enough to make it appear on a graph, you have to use it in an equation to generate the results.
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