Differences

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

Link to this comparison view

Both sides previous revision Previous revision
tutorial:building_a_simple_model [2017/01/17 18:06]
isabella
tutorial:building_a_simple_model [2017/01/25 17:37] (current)
francisco [What will you learn?]
Line 17: Line 17:
 Thus a model in Dinamica EGO is represented by a sequence of functors, whose execution takes place from left to right. A simple model consists of a functor that loads the data, for example, a map, another functor that performs some calculation as well as one that writes the result into a file. Note that the functors are connected to each other through arrows. In order to do so, they must exchange compatible data via their outputs and inputs. Dinamica EGO input parameters and data, as well as the outputs from a functor, are called ports. Hence functors are connected via compatible input and output ports. Let’s start designing your first model in Dinamica EGO.\\ Thus a model in Dinamica EGO is represented by a sequence of functors, whose execution takes place from left to right. A simple model consists of a functor that loads the data, for example, a map, another functor that performs some calculation as well as one that writes the result into a file. Note that the functors are connected to each other through arrows. In order to do so, they must exchange compatible data via their outputs and inputs. Dinamica EGO input parameters and data, as well as the outputs from a functor, are called ports. Hence functors are connected via compatible input and output ports. Let’s start designing your first model in Dinamica EGO.\\
  
-From the library window grab and place on the sketch the //[[:Load Map]]// and //[[:Save Map]]// functors, which are located in the Input/​Output tab.  Now grab the container //​[[:​Calculate Map]]// from the Map Algebra tab. Remember that a container is a special type of functor that can envelope supplementary functors or even a sequence of functors. The containers differ from a functor by its title bar.+From the library window grab and place on the sketch the //[[:Load Map]]// and //[[:Save Map]]// functors, which are located in the Input/​Output tab.  Now grab the container //​[[:​Calculate Map]]// from the Map Algebra tab. container is a special type of functor that can envelope supplementary functors or even a sequence of functors. The containers differ from a functor by its action ​bar.
  
-<note tip>​**TIP**:​ By clicking on the left top of the container ​icon, you can close and open it.</​note> ​+<note tip>​**TIP**:​ By clicking on the left top of the container ​action bar, you can close and open it.</​note> ​
  
 You should have something like this:{{ :​tutorial:​simple_model_1.5.jpg |}}\\ You should have something like this:{{ :​tutorial:​simple_model_1.5.jpg |}}\\
Line 86: Line 86:
 \\ \\
 \\ \\
-Open the //[[:Load Map]]// functor and load the file ''​amazon_states.tif''​ from folder lesson1 ​(do not write the quotation marks). You do not need to worry about the other options, they are not needed for now. +Open the //[[:Load Map]]// functor and load the file ''​amazon_states.tif''​ from folder lesson1. You do not need to worry about the other options, they are not needed for now. 
  
 {{ :​tutorial:​simple_model_7.jpg?​nolink |}} {{ :​tutorial:​simple_model_7.jpg?​nolink |}}
Line 99: Line 99:
  
 In the Advanced tab there is an option to set the file name **Suffix Digits**. Although the default is 2, this parameter will be ignored since there is only one iteration.\\ **Use Compression** is only applicable for geotiff and img format. In the Advanced tab there is an option to set the file name **Suffix Digits**. Although the default is 2, this parameter will be ignored since there is only one iteration.\\ **Use Compression** is only applicable for geotiff and img format.
-The input map is a categorical map; its values do not represent quantities, but are identifiers to map classes, thus representing categorical data as follows:+The input map is a categorical map; its values do not represent quantities, but they are identifiers to map classes, thus representing categorical data as follows:
  
 ^ Key  ^ State  ^              ​ ^ Key  ^ State  ^              ​
Line 112: Line 112:
 | 9  | Mato Grosso ​ | | 9  | Mato Grosso ​ |
  
-Close the //​[[:​Calculate Map]]// container by clicking on its bar. The model should look like this:\\+Minimize ​the //​[[:​Calculate Map]]// container by clicking on its bar. The model should look like this:\\
 \\ \\
 \\ \\
Line 118: Line 118:
 \\ \\
 \\ \\
-Save the model as ''​my_model''​ in lesson1 folder, click on check model script integrity to check out whether the model is ready to run, and if it is, run the model by clicking on the run model script button on the top toolbar and open the result on the Map Viewer. The output map depicts only the Mato Grosso state.{{ :​tutorial:​mato_grosso_state.1.jpg |}}+Save the model as ''​my_model''​ in lesson1 folder, run the model by clicking on the run model script button on the top toolbar and open the result on the Map Viewer. The output map depicts only the Mato Grosso state.{{ :​tutorial:​mato_grosso_state.1.jpg |}}
  
 __Congratulations,​ you have successfully completed this lesson!__ Now let’s move to the next ones! __Congratulations,​ you have successfully completed this lesson!__ Now let’s move to the next ones!
  
 [[tutorial:​incorporating_iterations_into_a_model|Next Lesson]] [[tutorial:​incorporating_iterations_into_a_model|Next Lesson]]