Setting up scenarios consists of letting people pick a name for the scenario, changing model Constants and Lookups, and actually making the simulation. The actual order in which things happens is flexible. You can, for example, wait until just before the simulation starts to choose a name for the run. The architecture we are using here first gets a run name and a basis for the simulation, then goes to a menu that allows the user to move to other screens and change Constants and Lookups or start the simulation.
:SCREEN SETUPSCENARIO
TEXTONLY,"Scenario Setup",50,5,0,0,C|Arial|24|B|0-0-255,
BUTTON,"Scenario based on model constants",50,32,50,6,C,Ss,\
SIMULATE>READRUNCHG&\
SIMULATE>RUNNAME|?Name the new scenario,SETUPSIM
BUTTON,"Modify and rerun an existing scenario",50,42,50,6,C,Mm,\
SIMULATE>RUNNAME|?Select the scenario to modify|E&\
SIMULATE>READRUNCHG|!,SETUPSIM
BUTTON,"Scenario based on an existing scenario",50,52,50,6,C,Ss,\
SIMULATE>READRUNCHG|?Select scenario for basis&\
SIMULATE>RUNNAME|?Name the new scenario,SETUPSIM
BUTTON,"Scenario based on changes (.cin) file",50,62,50,6,C,Ss,\
SIMULATE>READCIN|?Choose a changes file&\
SIMULATE>RUNNAME|?Name the new scenario,SETUPSIM
BUTTON,"Exit to Main Menu",50,90,40,6,C,EeXx,,MAIN
This screen just offers the four most obvious options for starting up a scenario. The inclusion of .cin files may be confusing to some users and you might want to leave it out. Since there are only a small number of buttons on this screen it may be possible to incorporate them into the main menu. There is a complexity tradeoff between the number of screens and the amount of stuff on a single screen. Which works better depends on who will be using it.
:SCREEN SETUPSIM
TEXTONLY,"Set Up the Model",50,5,0,0,C|Arial|24|B|0-0-255,
TEXTONLY,"Simulate the Model",75,52,0,0,C|Arial|24|B|0-0-255,
TEXTONLY,"Save Setup",25,52,0,0,C|Arial|24|B|0-0-255,
BUTTON,"Change model assumptions",25,20,40,6,C,,,INPUT1
BUTTON,"Modify policy options",25,30,40,6,C,,,INPUT2
BUTTON,"Make changes to other constants",75,20,40,6,C,,SIMULATE>GETCNSTCHG
BUTTON,"Make changes to other lookup tables",75,30,40,6,C,,SIMULATE>GETTABCHG
BUTTON,"Save setup as changes file (.cin)",25,65,40,10,C,,\
SIMULATE>WRITECIN|?Name the changes file,
BUTTON,"SIMULATE",75,65,40,10,C,,,RUNNING
!BUTTON,"GAME",75,65,40,10,C,,,STARTGAME
BUTTON,"Exit to Main Menu",50,90,40,6,C,,,MAIN
This screen has four options for changing Constants and Lookups. One of these is for model assumptions (INPUT1) and another for policy settings (INPUT2). This is a useful way to categorize changes, though it is not always appropriate to give users access to basic assumptions. This screen also allows the user to go in and change any Constants or Lookups in the Model using the GETCNSTCHG and GETTABCHG commands. These commands are useful when you developing an application and want to experiment with what will be included, or if you want to give people complete access to the model. In general, however, you will probably not want to include them in finished applications.
The "SIMULATE" button shifts to the RUNNING screen which starts the simulation. It would also be possible to start a game based on the changes made. The "GAME" button is commented out in the above screen but could be used in place of or as well as the "SIMULATE" button.
:SCREEN INPUT1
TEXTONLY,"Scenario Assumptions",50,5,0,0,C|Arial|24|B|0-0-255,
TEXTONLY,"Birth Rate",15,15,0,0,L
LISTVAR,"birth rate normal",60,15,20,0,,[0|0.1]\
Very low (0.005) = 0.005|Low (0.02) = 0.02|Medium (0.04) = 0.04|\
High (0.06) = 0.06|Very high (0.1) = 0.1
TEXTONLY,"Capital Agriculture Fraction Adjustment Time",15,25,0,0,L
RADIO1VAR,"capital agriculture fraction adjustment time",60,25,8,0,,[8],Low
RADIOVAR,"capital agriculture fraction adjustment time",70,25,8,0,,[15],Medium
RADIOVAR,"capital agriculture fraction adjustment time",80,25,8,0,,[30],High
TEXTONLY,"Natural Resource Extraction Table Function",15,35,0,0,L
MODTABLE,"natural resource extraction mult tab",60,35,0,0,L,
TEXTONLY,"Initial Natural Resources",15,45,0,0,L
MODVAR,"natural resources initial",60,45,20,0,L,|[9e10|9e12]
TEXTONLY,"Initial Pollution Level",15,55,0,0,L
MODVAR,"pollution initial",60,55,20,0,L,|[2e7|2e9]
BUTTON,"Record changes and return to Modeling Choices",20,70,50,5,L,Rr,,SETUPSIM
BUTTON,"Return to Modeling Choices (cancel changes)",\
20,80,50,5,L,EeXx,CANCEL,SETUPSIM
This screen allows the user to set the assumptions for the model. This screen makes use of LISTVAR, RADIOVAR and MODVAR to set values. Notice the use of the CANCEL command to back out without keeping settings.
:SCREEN INPUT2
TEXTONLY,"Scenario Policy Options",50,5,0,0,C|Arial|24|B|0-0-255,
TEXTONLY,"Rate of Capital Investment",20,22,0,0,L
TEXTONLY,"Pollution Per Capita",20,37,0,0,L
TEXTONLY,"Natural Resource Utilization",20,52,0,0,L
SLIDEVAR,"capital investment rate normal c",50,20,15,10,H,[0|0.2|.01]
SLIDEVAR,"pollution per capita normal c",50,35,15,10,H,[.05|2|.025]
SLIDEVAR,"natural resource utilization normal",50,50,15,10,H,[.05|2|.025]
BUTTON,"Record changes and return to Modeling Choices",20,70,50,5,L,Rr,,SETUPSIM
BUTTON,"Return to Modeling Choices (cancel changes)",\
20,80,50,5,L,EeXx,CANCEL,SETUPSIM
This screen allows the user to set some policies. The screen uses SLIDEVAR controls to allow the user to change things. Again there is a CANCEL command to back out.