Multiple sensitivity graphs in a single Venapp screen?

Use this forum to post Vensim related questions.
Post Reply
erickber
Junior Member
Posts: 12
Joined: Fri Aug 13, 2010 4:35 pm

Multiple sensitivity graphs in a single Venapp screen?

Post 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
erickber
Junior Member
Posts: 12
Joined: Fri Aug 13, 2010 4:35 pm

Post 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
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
erickber
Junior Member
Posts: 12
Joined: Fri Aug 13, 2010 4:35 pm

Post by erickber »

Thanks!
erickber
Junior Member
Posts: 12
Joined: Fri Aug 13, 2010 4:35 pm

Post 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?
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post 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.
Post Reply