Page 1 of 1

Multiple sensitivity graphs in a single Venapp screen?

Posted: Mon Sep 13, 2010 11:58 am
by erickber
Hello,

I am trying to create a single-screen Venapp for an interactive session where the user: 1) sets values for an "alternate" scenario; 2) runs the model and view the results for several indicators compared to a "baseline" scenario. The (fixed) baseline has been run in sensitivity mode so that the user can see if the alternate falls outside of the sensitivity bounds of the baseline.

I thought that the following code should have let me do this -- some tests had indicated that it should -- but instead each of the graphs is showing the same variable (the last variable, "tax revenue as percent GDP"):

!
:SCREEN SCREEN1
SCREENFONT,Times New Roman|10||0-0-0|-1--1--1
PIXELPOS,1
COMMAND,,,,,,,,"SPECIAL>LOADMODEL|NBIM_0.4.mdl"
COMMAND,,,,,,,,"SIMULATE>RUNNAME|Alternate"
COMMAND,,,,,,,,"SPECIAL>LOADRUN|Baseline"
COMMAND,,,,,,,,"SPECIAL>LOADTOOLSET|nbim_100912.vts"
RUNNAME,"*1",49,532,0,0,,,,
TEXTONLY,"Fiscal and Financial",419,6,0,0,|Arial|14||0-0-0,,,
COMMAND,"",10,10,,,,,"SPECIAL>SETWBITEM|FDI",
TOOL,"FDI",419,31,222,156,,,"WORKBENCH>Sensitivity Graph",
COMMAND,"",,,,,,,"SPECIAL>SETWBITEM|tax from profits",
TOOL,"Tax on profits",652,31,222,156,,,"WORKBENCH>Sensitivity Graph",
COMMAND,"",,,,,,,"SPECIAL>SETWBITEM|tax revenue as percent GDP",
TOOL,"Net revenue",886,31,222,156,,,"WORKBENCH>Sensitivity Graph",
!

Is there something I am doing wrong? And is there a way to do what I'm trying to achieve?

Thanks,
Eric

Posted: Mon Sep 13, 2010 8:22 pm
by erickber
OK, I don't understand this... I run the Venapp now and it works -- the correct variables show up. Does anyone understand this behavior?

Thanks,
Eric

Posted: Tue Sep 14, 2010 10:14 am
by bob@vensim.com
This should build the screen just fine, but will then exhibit the behavior you describe if the screen is refreshed. This can happen becase of a SPECIAL>REFRESH command, or the completion of a simulation. To get the correct display you will need to reenter the screen in either of these cases. One implication is that SyntheSim will not work well - for that you might look at custom graphs with sensitivity bounds.

Posted: Tue Sep 14, 2010 12:17 pm
by erickber
Thanks!

Posted: Tue Sep 14, 2010 12:19 pm
by erickber
Another question... when I reenter the screen everything runs fine and the graphs are updated (thanks again). But... my controls (SWITCHVARs, MODVARs, etc.) are reset to their original values. Is there any way to change that behavior?

Posted: Wed Sep 15, 2010 9:37 am
by bob@vensim.com
In the sample you provided LOADMODEL was in the screen definition and this will reset everything. You need to put that into an earlier screen before shifting to the screen with controls.