Hello,
I am making a single-screen Venapp (aside from an opening splash screen). It works as a "dashboard", where there are inputs and several graphs. The graphs show both a baseline scenario (which was run in sensitivity mode and does not change) and an alternate scenario that changes after a) the inputs are changed and b) the user presses the "Update" button.
It is working pretty well, but after each run the inputs are reset to their original values. This is annoying and disorienting for the user. Is there any way for me to make the input values persistent as the screen is reloaded?
Thanks in advance.
Here is the current command file, in full:
=============
!
:SCREEN OPENSCREEN
SCREENFONT,Times New Roman|10||0-0-0|-1--1--1
PIXELPOS,0
COMMAND,,,,,,,,"SPECIAL>LOADMODEL|NBIM_0.4.mdl"
COMMAND,,,,,,,,"SPECIAL>LOADTOOLSET|nbim_100912.vts"
TEXTONLY,"National Bioenergy Investment Model",32,18,,,|Arial|18|B|0-0-0,,"",
TEXTONLY,"NBIM 0.4 beta",41,29,0,0,|Arial Black|18||0-0-0,,,
TEXTONLY,"Copyright (c) 2009-2010 SEI and CIFOR",40,43,0,0,,,,
BUTTON,"Start",47,60,0,0,,,,MAINSCREEN
!
:SCREEN MAINSCREEN
SCREENFONT,Times New Roman|10||0-0-0|-1--1--1
PIXELPOS,1
COMMAND,,,,,,,,"SPECIAL>LOADRUN|Baseline"
COMMAND,,,,,,,,"SIMULATE>RUNNAME|Alternate"
COMMAND,,,,,,,,"MENU>RUN|O"
SWITCHVAR,"zoning for biofuel production",27,58,0,0,,,Agro-ecological zoning,
TEXTONLY,"Fiscal and Financial",504,13,0,0,|Arial|14||0-0-0,,,
COMMAND,"",10,26,0,0,,,SPECIAL>SETWBITEM|FDI,
TOOL,"FDI",504,38,240,170,,,"WORKBENCH>Sensitivity Graph",
COMMAND,"",10,26,,,,,"SPECIAL>SETWBITEM|avoided fuel imports and biofuel exports as percent GDP",
TOOL,"Tax on profits",748,37,240,170,,,WORKBENCH>Sensitivity Graph,
COMMAND,"",10,26,0,0,,,SPECIAL>SETWBITEM|tax revenue as percent GDP,
TOOL,"Net revenue",992,35,240,170,,,WORKBENCH>Sensitivity Graph,
TEXTONLY,"Social",504,220,0,0,|Arial|14||0-0-0,,,
COMMAND,"",10,26,0,0,,,SPECIAL>SETWBITEM|feedstock jobs as percent of rural population,
TOOL,"Job creation",504,245,240,170,,,WORKBENCH>Sensitivity Graph,
COMMAND,"",10,26,,,,,"SPECIAL>SETWBITEM|domestic ownership percent",
TOOL,"Landless population",748,244,240,170,,,WORKBENCH>Sensitivity Graph,
COMMAND,"",10,26,,,,,"SPECIAL>SETWBITEM|biofuel consumption as percent of hh and transport energy",
TOOL,"Food security",992,242,240,170,,,WORKBENCH>Sensitivity Graph,
TEXTONLY,"Environmental",504,426,0,0,|Arial|14||0-0-0,,,
COMMAND,"",10,26,0,0,,,SPECIAL>SETWBITEM|land under feedstock,
TOOL,"Land under feedstock",504,451,240,170,,,WORKBENCH>Sensitivity Graph,
COMMAND,"",10,26,,,,,"SPECIAL>SETWBITEM|rural woodfuel use",
TOOL,"Forest area",748,450,240,170,,,WORKBENCH>Sensitivity Graph,
COMMAND,"",10,26,,,,,"SPECIAL>SETWBITEM|urban charcoal use",
TOOL,"Carbon stocks",992,448,240,170,,,WORKBENCH>Sensitivity Graph,
BUTTON,"Update",426,319,0,0,,,,MAINSCREEN
TEXTONLY,"Blend ratios",32,156,0,0,,,,
MODVAR,"user biofuel blend percents[ethanol]",111,186,0,0,,,,
TEXTONLY,"%",183,191,0,0,,,,
TEXTONLY,"Ethanol",52,192,0,0,,,,
MODVAR,"user biofuel blend percents[biodiesel]",111,216,0,0,,,,
TEXTONLY,"%",182,221,0,0,,,,
TEXTONLY,"Biodiesel",52,220,0,0,,,,
MODVAR,"user tax on profit percents[domestic investor]",304,187,0,0,,,,
TEXTONLY,"%",376,192,0,0,,,,
TEXTONLY,"Domestic",245,193,0,0,,,,
MODVAR,"user tax on profit percents[foreign investor]",304,217,0,0,,,,
TEXTONLY,"%",375,222,0,0,,,,
TEXTONLY,"Foreign",243,224,0,0,,,,
TEXTONLY,"Tax on profits",235,155,0,0,,,,
RECTANGLE,"",32,176,186,86,,,,
RECTANGLE,"",229,175,182,88,,,,
TEXTONLY,"Minimum wage",32,106,0,0,,,,
MODVAR,"user minimum wage",119,100,0,0,,,,
TEXTONLY,"Tsh/cap/month",184,107,0,0,,,,
TEXTONLY,"Policies",27,21,,,|Arial|14||0-0-0,,"",
TEXTONLY,"Uncertainties",32,333,,,|Arial|14||0-0-0,,"",
=================
Inputs being reset in Venapp
-
- Super Administrator
- Posts: 4860
- Joined: Wed Mar 05, 2003 3:10 am
The only thing you can do is save a CIN file before the sim starts, and reload it as soon as the simulation is finished.
So something like
COMMAND,,,,,,,,"SPECIAL>LOADRUN|Baseline"
COMMAND,,,,,,,,"SIMULATE>RUNNAME|Alternate"
COMMAND,,,,,,,,"SIMULATE>RUNNAME|Alternate"
COMMAND,,,,,,,,"SIMULATE>WRITECIN|temp.cin"
COMMAND,,,,,,,,"MENU>RUN|O"
COMMAND,,,,,,,,"SIMULATE>READCIN|temp.cin"
So something like
COMMAND,,,,,,,,"SPECIAL>LOADRUN|Baseline"
COMMAND,,,,,,,,"SIMULATE>RUNNAME|Alternate"
COMMAND,,,,,,,,"SIMULATE>RUNNAME|Alternate"
COMMAND,,,,,,,,"SIMULATE>WRITECIN|temp.cin"
COMMAND,,,,,,,,"MENU>RUN|O"
COMMAND,,,,,,,,"SIMULATE>READCIN|temp.cin"