Skip to main content
Jump to: navigation, search

Difference between revisions of "Creating a STEM Scenario"

(New page: '''Note:''' Instructions below assume you have already created a new disease model of your own and already plugged it into the system. We will soon add directions for that step. In the run...)
 
(minor corrections)
Line 1: Line 1:
'''Note:''' Instructions below assume you have already created a new disease model of your own and already plugged it into the system. We will soon add directions for that step. In the run dialog one must add the user defined plug-ins for the user disease model (for example in '''…org.ohf.stem.diseasemodels.experimental .…''')
+
'''Note:''' Instructions below assume you have already created a new disease model of your own and already plugged it into the system. We will soon add directions for creating disease models.
 +
 +
To add your plugin to the STEM application, in the Eclipse IDE, go to '''Run->Run Dialog..->Plugins''' and make sure your  user defined plug-ins for the user disease model is checked.  
  
  
Line 9: Line 11:
 
'''Creating the Project'''
 
'''Creating the Project'''
  
1) Click on the Icon with many little squares and create new STEM project (ExperimentalDisease). See Figure 1.
+
1) Click on the Icon with many little squares (or new->STEM Project) and create new STEM project (ExperimentalDisease). See Figure 1.
  
 
[[Image:Newproject.jpg|600px]]
 
[[Image:Newproject.jpg|600px]]
Line 24: Line 26:
 
'''Creating a new Model'''  
 
'''Creating a new Model'''  
  
3) Click on blue triangle to create new model (for example, concatenate: CubaExperimentalDisease)  
+
3) Click on blue triangle (or New->Model) to create new model (for example, concatenate: CubaExperimentalDisease)  
  
 
4) Fill in any Dublin core data you want to add  
 
4) Fill in any Dublin core data you want to add  
Line 30: Line 32:
 
'''Adding a Disease to the Model'''  
 
'''Adding a Disease to the Model'''  
  
5) On the menu bar click ->new>new disease  
+
5) Click on the New Disease icon (black square with the health symbol) or on the menu bar click ->new>new disease  
  
 
6) This will launch the Dialog shown in Figure 3. Fill in the Name: (ExperimentalDisease)  
 
6) This will launch the Dialog shown in Figure 3. Fill in the Name: (ExperimentalDisease)  
Line 36: Line 38:
 
7) Fill in the Disease Name: You can use the same name you used in (6) (ExperimentalDisease)  
 
7) Fill in the Disease Name: You can use the same name you used in (6) (ExperimentalDisease)  
  
8) Select the DiseaseModel in the ComboBox: e.g., select "ExperimentalDiseaseModelImpl"  
+
8) Select the DiseaseModel in the ComboBox: e.g., select your Disease model.
 +
For our case we will use "PercolationDiseaseModelImpl"  
 
At this point you can also edit or set any of the disease parameters (i.e. Transmission Rate, Recovery Rate, etc).
 
At this point you can also edit or set any of the disease parameters (i.e. Transmission Rate, Recovery Rate, etc).
 
If you don't want to do it now it will also be editable any time after the scenario is created.  
 
If you don't want to do it now it will also be editable any time after the scenario is created.  
Line 113: Line 116:
 
28) Under country select Cuba  
 
28) Under country select Cuba  
  
29) Click on the Scenrio to open it in the Resource set  
+
29) Click on the Scenario to open it in the Resource set  
  
 
30) drag the CubaInfector from Decorators into the scenario (open it to see it)  
 
30) drag the CubaInfector from Decorators into the scenario (open it to see it)  
Line 120: Line 123:
  
  
''NOTE: The location code for the infector is automatically picked up. NOTE: In the case of infecting an entire country at admin 0 level resolution there is a bug. We chose Cuba in this example because there is no admin1 or admin2 data for Cuba. In most cases the following steps are not necessary. If you are infecting at the country level, admin 0, the following is necessary. The location code at admin 0 only should be three letters but a two letter code is used by default (which works for admin 1 and 2). Fix it manually by editing the infector with the property editor.''
+
32} Save your work at this point by hitting <ctrl>S  
 
+
32) Under target ISO key change CU to CUB
+
 
+
33) Under target URI change CU to CUB
+
save your work at this point by hitting <ctrl>S  
+
  
34) click on the scenario, right click and run
+
33) click on the scenario, right click and run

Revision as of 16:30, 18 December 2007

Note: Instructions below assume you have already created a new disease model of your own and already plugged it into the system. We will soon add directions for creating disease models.

To add your plugin to the STEM application, in the Eclipse IDE, go to Run->Run Dialog..->Plugins and make sure your user defined plug-ins for the user disease model is checked.


Substitute YOUR_MODEL_NAME and YOUR_SCENARIO_NAME as appropriate. In this example, Project names and other NAMES are for a hypothetical user defined model based on percolation. Substitute your own name for the disease, model, and scenario accordingly. In this example, to make the documentation readable we will use for the scenario YOUR_SCENARIO_NAME="Cuba". For the disease model we will use YOUR_MODEL_NAME="ExperimentalDisease";


Creating the Project

1) Click on the Icon with many little squares (or new->STEM Project) and create new STEM project (ExperimentalDisease). See Figure 1.

Newproject.jpg

Figure 1: Creating a new STEM Project ("ExperimentalDisease").


ProjectDialog.jpg

Figure 2: The new project Dialog

2) Open the new project – you should see several folders including: decorators, graphs, etc.

Creating a new Model

3) Click on blue triangle (or New->Model) to create new model (for example, concatenate: CubaExperimentalDisease)

4) Fill in any Dublin core data you want to add

Adding a Disease to the Model

5) Click on the New Disease icon (black square with the health symbol) or on the menu bar click ->new>new disease

6) This will launch the Dialog shown in Figure 3. Fill in the Name: (ExperimentalDisease)

7) Fill in the Disease Name: You can use the same name you used in (6) (ExperimentalDisease)

8) Select the DiseaseModel in the ComboBox: e.g., select your Disease model. For our case we will use "PercolationDiseaseModelImpl" At this point you can also edit or set any of the disease parameters (i.e. Transmission Rate, Recovery Rate, etc). If you don't want to do it now it will also be editable any time after the scenario is created.


DiseaseDialog.jpg

Figure 3: The new Disease Dialog

9) Fill in any Dublin core data you want to add

10) Click finish

11) Under decorators you should see ExperimentalDisease.standard

12) Double click on MODELS in the project explorer. You should see "CubaExperimentalDisease" in the Resource Set.

13) DRAG your new disease (e.g., CubaExperimentalDisease.Standard) from decorators (in the project explorer window) into the model "CubaExperimentalDisease" in the Rescource Set window. Expand the "CubaExperimentalDisease" in the Resource Set window to see that it worked. See Figure 4.


Dragdiseasetomodel.jpg

Figure 4. Drag the Disease Model (decorator) into the Model in the Resource Set.


Adding the Geographical data to the Model

14) To add the geography data for Cuba to the Model, at the bottom panel under the Models tab, click on >STEM>Geography>Political>Country>CUB>CUB (0) full infrastructure The models tab is shown selected in the bottom of Figure 1 above. It is also identified by a blue triangle.

15) Drag this up to the Model "CubaExperimentalDisease" in the Resource set window

save your work at this point by hitting <ctrl>S

Create a Scenario and add your model to it

16) click on the purple diamond icon to create new scenario

17) give it a name (you might want more than one so index it, for example, as "ExperimentalDisease1")

18) Fill in any Dublin core data you want to add

19) click finish

20) From the Project Explorer window, under Models, Drag the new model ("cuba.model") into the new Scenario in the Resource Set. Expand the scenario so you can see that it worked.

Add a sequencer to the Scenario

21) Go to Sequencers on the bottom window - expand fully

22) drag Sequential Sequencer 2006 into the Scenario in the Resource Set. Make sure you have a properties Editor Window open

23) click on >Window>other>General>Properties to open the properties view. Open the Disease in the Properties Editor – get ready to Create an Infector

24) To create an infector you first need to make sure you know the exact ‘Disease Name’ used in step 7 above. To be sure check it as follows. In the Project Explorer, Under Decorators, double click on ExperimentalDisease.standard The new disease will be visible in the resource set. Expand the file node an you should see “ExperimentalDisease model human”. Click on “ExperimentalDisease Disease model human” In the bottom window click on the properties tab to show the disease in the properties editor view.


PropEditor.jpg

Figure 5: In the Resource Set the new Scenario is expanded showing that it now contains a model which contains a disease (decorator). The disease contains a Dublin Core. Double Clicking on the Disease in the Resource Set opens an editor at the bottom of the screen. Click on the Properties Tab (shown selected) to see the Properties Editor. Here you can also change any of the disease parameters at any time.

25) This is the view where you can see, edit, and change any disease parameter. Find and confirm the disease name ("ExperimentalDisease" in this case).

Creating and adding an Infector

26) Click on the new infector icon (black square with the health symbol and the letter I)

27) Name it (e.g., "CubaInfector"), under DiseaseName: "ExperimentalDisease"

28) Under country select Cuba

29) Click on the Scenario to open it in the Resource set

30) drag the CubaInfector from Decorators into the scenario (open it to see it)

31) In the resource set click on the infector SI Infector ExperimentalDisease to edit it. Your disease model may be SI, SIR, SIER, etc but in all cases you only need an SI infector (as this base class will add infectious people to seed any model.


32} Save your work at this point by hitting <ctrl>S

33) click on the scenario, right click and run

Back to the top