Page 1 of 1

Custom tables: operation with variables

Posted: Wed Jun 19, 2013 11:12 am
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

Re: Custom tables: operation with variables

Posted: Wed Jun 19, 2013 1:28 pm
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

Re: Custom tables: operation with variables

Posted: Wed Jun 19, 2013 1:39 pm
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.

Re: Custom tables: operation with variables

Posted: Thu Jun 27, 2013 8:57 am
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?

Re: Custom tables: operation with variables

Posted: Thu Jun 27, 2013 1:01 pm
by Administrator
I don'd understand your question. Can you try and explain again?

Re: Custom tables: operation with variables

Posted: Thu Jun 27, 2013 8:38 pm
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.