Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lesson_19 [2019/08/30 23:59]
argemiro
lesson_19 [2020/02/19 14:12] (current)
argemiro [The Tool]
Line 1: Line 1:
-{{ :logo_guidebook1.jpg?400 |}}+{{ :logo_logo.png?400 |}}
 \\ \\
-=====LESSON 19: The wizard editor in Dinamica EGO=====  ​+=====The wizard editor in Dinamica EGO=====  ​
 \\ \\
 \\ \\
- 
 ==== What will you learn? ==== ==== What will you learn? ====
 +\\
   * Dinamica EGO wizard tools   * Dinamica EGO wizard tools
   * Creating Wizards   * Creating Wizards
   * Formatting Wizards ​   * Formatting Wizards ​
 \\ \\
-====== Wizards ​====== +==== Wizards ==== 
- +\\ 
-===== What is ===== +A Wizard is an easy way to create a presentation for a model developed in Dinamica EGO with formatted text, images and other graphical features. In a Wizard it is also possible alter the models'​ inputs to run an easy simulation without an advanced understanding of the Dinamica GUI and its functors. ​ 
- +\\ 
-A Wizard is an easy way to create a presentation for a model developed in Dinamica EGO with formatted ​ +A Wizard Tutorial is a sequence of pages containing formatted text, tables, images, diagrams, animations, embedded videos or any other internet browser compatible technology inserted by the author. Each page can contain general information about the model and the simulation inputs. Simulation inputs can be directly linked to script inputs, making it a fast and easy way to set parameters and run a simulation. 
-text, images and other graphical features. In a Wizard it is also possible alter the models'​inputs to run an easy simulation without an advanced understanding of the Dinamica GUI and its functors. A Wizard Tutorial is a  +\\ 
-sequence of pages containing formatted text, tables, images, diagrams, animations, embedded ​ +\\ 
-videos or any other internet browser compatible technology inserted by the author. Each page can contain general information ​ +{{ :​wizard:​wizard_presentation.png?​nolink&​900 |Wizard overview}} 
-about the model and the simulation inputs. Simulation inputs can be directly linked to script inputs, making +\\ 
-it a fast and easy way to set parameters and run a simulation. +{{ :​wizard:​wizard_model_correspondence.png?​nolink&​800 |Model-wizard correspondence}} 
- +\\ 
-[{{ :​wizard:​wizard_presentation.png?​nolink&​900 |Wizard overview}}] +An author ​can create his own Wizard Tutorial to present and explain its concepts and ideas. The Wizard Editor is a powerful tool to create text, format information and illustrations visually, include tables, and set inputs/​outputs. The author selects model script functors to include in the Wizard so not all functors are visible to Wizard users.  
-[{{ :​wizard:​wizard_model_correspondence.png?​nolink&​800 |Model-wizard correspondence}}] +\\ 
- +\\
-A model author ​creates their own Wizard Tutorial to present and explain its concepts and ideas. The Wizard Editor is a powerful tool to create text, format information and illustrations visually, include tables, and set inputs/​outputs. The author selects model script functors to include in the Wizard so not all functors are visible to Wizard users.  +
 {{ :​wizard:​editor1.png?​nolink&​700 |Wizard editor in use}} {{ :​wizard:​editor1.png?​nolink&​700 |Wizard editor in use}}
- +\\ 
-So, if you are a model author, it is a good idea to create a wizard to make it easier for other users to understand +\\ 
-and run your model. +==== The Tool ==== 
- +\\ 
-<note tip> +The Wizard should be a logical sequence of pages, each using a graphical area to convey information and possibly ports linked to the model. This is a very clear idea that can be seen in the wizard editor. The following videos provide directions on using the wizard tool: 
-A Wizard example can be found within the Dinamica EGO examples files. They are usually installed in +\\
-the directory:​ +
- +
-C:\Documents and Settings\User Name\My Documents\Dinamica EGO\Dataset\Examples\run_lucc_northern_mato_grosso\run_roads_wizard +
-</​note>​ +
- +
-===== The Tool ===== +
- +
-It is important to present a extant hierarchy in a tutorial that guides the user through the model. ​The Wizard +
-should be a logical sequence of pages, each using a graphical area to convey information and possibly ports linked to the model. This is a very clear idea that can be seen in the wizard editor. The following videos provide directions on using the wizard tool: +
 {{youtube>​_Jc61ARsHuA?​medium}} {{youtube>​_Jc61ARsHuA?​medium}}
 +\\
 Here is how to run a Wizard in the current interface: Here is how to run a Wizard in the current interface:
 +\\
 {{youtube>​I7DPear5yao?​medium}} {{youtube>​I7DPear5yao?​medium}}
- +\\ 
-To open Wizart ​tool click on the edit bar in the menu: +To open the Wizard ​tool click on the edit bar in the menu: 
- +\\ 
-{{:wizard:​editor_menu.png?​nolink&​|Editor button in menu}} +{{wizard:​editor_menu.png?​nolink&​|Editor button in menu}} 
- +\\ 
-It has an intuitive interface that we are going to learn how to use through the examples. +It has an intuitive interface that we are going to learn how to use through the following ​examples. 
- +\\ 
-{{:wizard:​editor_interface.png?​nolink&​|Wizard editor intuitive interface}} +{{wizard:​editor_interface.png?​nolink&​|Wizard editor intuitive interface}} 
- +\\ 
-===== Examples ===== +=== Simple Wizard === 
- +\\ 
-==== Simple Wizard ​==== +Lets start with a quick example where we create a wizard for a script that performs only a simple map algebra operation. 
- +\\
-Lets start with a quick example where we create a wizard for a script that performs only a simple map +
-algebra operation. +
 We are going to need the functors: We are going to need the functors:
   * [[Load Map]]   * [[Load Map]]
Line 69: Line 54:
   * [[Number Map]]   * [[Number Map]]
   * [[Save Map]]   * [[Save Map]]
 +\\
 === Building the model === === Building the model ===
- +\\ 
-How we build the model: +Assemble ​the functors according to the following picture. 
 +\\ 
 +\\
 {{:​wizard:​model.png?​nolink&​|Simple model}} {{:​wizard:​model.png?​nolink&​|Simple model}}
- +\\ 
-In the [[Calculate Map]] we are going to perform a simple operation with the input that is filter the +\\ 
-values equals to **null**, set them to **1** and set **0** to the others. +In the [[Calculate Map]] we are going to perform a simple operation with the input that, for values equals to **null**, set them to **1** **0** to the others. 
 +\\ 
 +\\
 {{:​wizard:​expression.png?​nolink&​|Expression used to filter the input map null values}} {{:​wizard:​expression.png?​nolink&​|Expression used to filter the input map null values}}
 +\\ 
 +\\
 === Creating the Wizard === === Creating the Wizard ===
 +\\
 To create a wizard o need first to save your model. Save it with XML extension and open the wizard To create a wizard o need first to save your model. Save it with XML extension and open the wizard
 editor. ​ editor. ​
Line 219: Line 207:
  
 {{:​wizard:​run_wizard_button_toolbar.png?​nolink&​|Run wizard button in tool bar}} {{:​wizard:​run_wizard_button_toolbar.png?​nolink&​|Run wizard button in tool bar}}
- 
-==== Conway'​s Game of Life Wizard ==== 
- 
-The [[wp>​Conway'​s Game of Life]] is a cellular automaton zero-player game where a initial state is 
-defined and interactions between the cells results in a new state for each game iteration. Some simple 
-rules are used to decide if a cell will born, stay alive or die. This automaton was a base for many 
-studies in [[wp>​Artificial Life]]. 
- 
-A Dinamica EGO implementation for this game is available in the installation directories:​ 
- 
-C:​\Documents and Settings\User Name\My Documents\Dinamica EGO\Dataset\Examples\game_of_life 
- 
-To create a Wizard Tutorial for this model, stay tuned with the concepts discussed in this tutorial ​ 
-until now. We are going to be faster now. 
- 
-==== Open the model ==== 
- 
-Open the model 
- 
-C:​\Documents and Settings\User Name\My Documents\Dinamica EGO\Dataset\Examples\game_of_life\Run\game_of_life.xml 
- 
-in the Dinamica EGO interface. Take a look at the functors, the comments inside it and understand what 
-each one is doing there. 
- 
-{{:​wizard:​gof_model.png?​nolink&​|Game of life Dinamica EGO model}} 
- 
-== The Wizard == 
- 
-Open the wizard editor and create a page. Take a look at the Wikipedia'​s page for the  
-[[wp>​Conway'​s Game of Life]] copy some information from there and paste it in the page. 
- 
-{{:​wizard:​gof_page1.png?​nolink&​|Game of Life wizard first page}} 
- 
-Now, import the wizard in a file within the model. In the directory **game_of_life**,​ create a directory called ​ 
-**wizard** and save the file **wizard_gof.egow**. ​ 
- 
-{{:​wizard:​gof.png|}} ​ 
- 
-<note tip>​Always save the wizard after some modification and before closing the Wizard Editor. </​note>​ 
- 
-== Using Images == 
- 
-Lets add an image in this firts page to illustrate the game in action. Wikipedia offers a good example in the 
-following URL: 
- 
-http://​upload.wikimedia.org/​wikipedia/​commons/​e/​e5/​Gospers_glider_gun.gif 
- 
-Lets download that image to use it in our wizard. I usually right click the image and select the //Save image as...// 
-option. It is very important to save the images used in a subdirectory whithin the wizard file. This way  
-portability is easier. Create a folder called **images** inside the **wizard** folder and put your images there. 
- 
-{{:​wizard:​images_folder.png?​nolink&​|Folder for images}} 
- 
- 
-<note warning>​Save the images used in your wizard in a folder whithin the wizard file to facilitate portability.</​note>​ 
- 
-== Inserting Images == 
- 
-It is easy to add an image to a wizard page. In the Page Editor you can find an icon for it: 
- 
-{{:​wizard:​insert_image_icon.png?​nolink&​|Insert image icon}} 
- 
-An interface to set the image properties will open up. If you have some trouble to fully visualize it you can resize 
-the Page Editor window. 
- 
-{{:​wizard:​image_properties.png?​nolink&​|Image properties window}} 
- 
-As you can see, there are two tabs of properties: **General** ​ and **Apperance**. In the **General** 
-tab there is a field for the image **URL**. You should insert there the //​absolute//​ path to the image file in you 
-computer. In this example the absolute path is: 
- 
-C:​\Documents and Settings\Administrador\Meus documentos\Dinamica EGO\Dataset\Examples\game_of_life\wizard\images\Gospers_glider_gun.gif 
- 
-This is why it is important to keep the images in a file within the wizard file. Dinamica Wizard automatically find the  
-image even if you change computers since you keep that directory structure. 
- 
- 
-You can change the image size in the **Width** and **Height** fields or set a tooltip in the **Alternative Text** 
-field. In the **Link** tab you can set an URL to redirect the user when he clicks the image. 
- 
-In then Page Editor we have centralized the image. 
- 
-{{:​wizard:​image_added.png?​nolink&​|Image added}} 
- 
-== A Second Page == 
- 
-Now that we have a very good first page, lets create a second one to explain the game rules. I will user the information 
-in http://​en.wikipedia.org/​wiki/​Conway%27s_Game_of_Life#​Rules to create a table that relates number of neighbours and 
-cell state. 
- 
-== Tables == 
- 
-You can create a table through the table icon in the Page Editor: 
- 
-{{:​wizard:​table_icon.png?​nolink&​|Table icon}} 
- 
-You can choose rows and columns of your design table. 
- 
- 
-{{:​wizard:​table_properties.png?​nolink&​|Table properties window}} 
- 
-These fields are very intuitive. We are going to create a table with 5 rows and 3 columns to write down the game rules. 
- 
-{{:​wizard:​table_blank.png?​nolink&​|A blank 5x3 table}} 
- 
-I have divided the rules in number of neighbours, cell state and reason. After creating a table you can write and format 
-the text on it. 
- 
-{{:​wizard:​gof_page2.png?​nolink&​|Second page}} 
- 
-== A Little Modification ==  
- 
-Remember to save you wizard often. Close the Wizard Editor after save and lets make a little modification in the model. 
-In the first [[Calculate Map]] that //generates the initial '​seed'//,​ add a [[Number Value]] and link a [[Real value]] to 
-its **Value** port and set the **Value Number** to **1**. Edit the Real value alias, using the "​Comment Editor"​ editor, and 
-change it to "​Percentage of living cells"​. 
- 
-{{:​wizard:​model_mod.png?​900|}} 
- 
-Edit this **Calculate Map** expression to set a cell as alive based on the **v1** value and not by **0.3**. 
- 
-{{:​wizard:​exp.png?​nolink&​|New expression}} 
- 
-Now we can control the percentage of living cells in the initial state through the value in the [[Real value]] functor. 
- 
-== The Wizard Inputs == 
- 
-In the Wizard Editor, create a third page to receive the inputs and add the Real value. 
- 
-{{:​wizard:​page3.png?​nolink&​700|Third page}} 
- 
-Set an intuitive title and description. 
- 
-{{:​wizard:​input_percent.png?​nolink&​|Percent title and description}} 
- 
-Now the user will be able to set this parameter through the wizard. 
- 
-{{:​wizard:​page3_view1.png?​nolink&​|Third page visualization}} 
- 
-Try to add more inputs. 
- 
-== Finishing == 
- 
-Run the wizard and the model. 
- 
-{{:​wizard:​test_page3.png?​nolink&​700|Testing the wizard}} {{:​wizard:​run_page3.png?​700|}} 
- 
-You have finished the wizard construction for the Conway'​s Game of Life model! You learned some new features and 
-are ready to create your own wizard tutorials for your models. 
- 
-===== Other Features ===== 
- 
-==== Youtube videos ==== 
- 
-It is easy to embed Youtube videos in your wizard. Go to [[http://​www.youtube.com|Youtube'​s]] page and choose a video. 
-I have choosed this one: 
- 
-https://​youtu.be/​uUtQZ41LSLk 
- 
-Click on the **Share** button. 
- 
-{{:​wizard:​share1.png?​nolink&​|Youtube video share button}} 
- 
-Click on the embed button: {{:​wizard:​embed_button.png?​nolink&​|Embed}} 
- 
-Select and copy the code in the text box. 
- 
-{{:​wizard:​code_selection.png?​nolink&​|Selected code}} 
- 
-Edit the page you want to put the video and click the ** HTML Source** button. 
- 
-{{:​wizard:​source_button.png?​700|}} 
- 
-Paste the code you have copied in the body of the text. 
- 
-{{:​wizard:​code_pasted.png?​nolink&​|Code pasted}} 
- 
-Clicking ok and testing the wizard you can see the video there. 
- 
-{{:​wizard:​test_video.png?​nolink&​700|Test video}} 
- 
-<note important>​Internet connection is required to watch youtube videos in a wizard.</​note>​ 
 \\ \\
 \\ \\
-Congratulations,​ you have successfully completed this lesson! Now let’s move to the **next lesson:​** ​[[lesson_20|LESSON 20Dinamica EGO and R Coupling]]+\\ 
 +[[lesson_20|Next: R Coupling]] 
 +\\ 
 +☞[[:​guidebook_start| Back to Guidebook Start]]