Custom tables: operation with variables

Use this forum to post Vensim related questions.
Post Reply
apix
Senior Member
Posts: 64
Joined: Wed Mar 16, 2011 3:31 pm

Custom tables: operation with variables

Post by apix »

Hi,

I'd like to show the variation of value for a selected variable for the first two loaded runs.
Maybe I can use a custom table.
is it possible, in a custom table, to show the difference of values of two loaded runs for the selected variable?
Something like

Code: Select all

:VAR varname &*1 - varname & *2
Many thanks
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Custom tables: operation with variables

Post by Administrator »

Have you tried custom reports? They might do what you need (I haven't actually used them in years so am very rust on it).

http://www.vensim.com/documentation/ind ... ?24035.htm
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
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Custom tables: operation with variables

Post by tomfid »

I don't think it's possible to perform mathematical operations on the two runs.

An alternative, if these represent something like a "base" and "policy" scenario, is to subscript the entire model with a scenario dimension, e.g. scenario : base, policy, so that both runs happen at once. Then you can calculate differences, etc. directly.
apix
Senior Member
Posts: 64
Joined: Wed Mar 16, 2011 3:31 pm

Re: Custom tables: operation with variables

Post by apix »

Not about operations but custom tables....

If I use just

Code: Select all

:table table1
:comline Population
:var population
without specifying any dataset but loading more runs, only the values of the first run are shown.
I can't know if more runs will be loaded, thus I don't want to use che :DATASET dataset key.
What can I do?
Administrator
Super Administrator
Posts: 4590
Joined: Wed Mar 05, 2003 3:10 am

Re: Custom tables: operation with variables

Post by Administrator »

I don'd understand your question. Can you try and explain again?
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
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: Custom tables: operation with variables

Post by tomfid »

Generally, if you use the : DATASET key with a wildcard like *2 (for the second run), nothing will be shown if only one run is loaded, so you don't need to know in advance what is available.
Post Reply