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
Last revision Both sides next revision
lesson_13 [2019/08/20 16:02]
argemiro created
lesson_13 [2020/02/12 13:25]
britaldo [What will you learn?]
Line 1: Line 1:
-{{ :logo_guidebook1.jpg?400 |}}+{{ :logo_logo.png?400 |}}
 \\ \\
-=====LESSON 13: Dinamica EGO data structures and file format=====  ​+=====LESSON 13: Loop structures on Dinamica EGO=====  ​
 \\ \\
 \\ \\
- 
 ==== What will you learn? ==== ==== What will you learn? ====
- 
-  * We will learn an important function for working with large databases and operations that require successive calculations:​ How to work with Repetition structures, or loops. 
 \\ \\
 +  * The main iteration algorithms (containers) ​
 +  * Their main auxiliary operators ​
 +\\  ​
 \\ \\
-For this, we learn how user a container to makes a set of functorslinked in dataflow chainiterate ​a number of times.+Dinamica EGO has several iteration control functors. These functors in the form of container ​allow to developing iteration including closed loops. For examplerun model steps, each time with different values or using dynamic datasuch as a map that is updated during the iteration execution. Iteration algorithm can execute a block of code a number of times. In this lesson we show types of iteration algorithms and how to work with them.
 \\ \\
 \\ \\
-**Let'​s go!** +===Container operators that repeat ​the functions ​within ​them===
-The intent of this exercise is to calculate ​the CO2 content from biomass forest year from year (2000 to 2006) within ​expanded protected areas in Amazonia, i.e., How much CO2 exists in protected areas that have expanded from 2000 to 2006?+
 \\ \\
 \\ \\
-We will use+{{ :b.png?800 |}} 
-The protected areas map in the year 2000 (Guidebook Dinamica_4/​Database/​Protected_areas/​protected_areas_2000.tif+\\ 
- +\\ 
-The Legal Amazon Biomass ​map (Guidebook Dinamica_4/​Database/​biomass/​biomass.tif) +**Repeat:** This container makes a set of functors linked ​in a dataflow chain iterate a predetermined number of times. 
- +\\ 
 +\\ 
 +**For:** This container makes a set of functors linked in a dataflow chain iterate while a given condition is met. 
 +\\ 
 +\\ 
 +**For each:** This container executes ​the contained functors once per each element of a given lookup table. 
 +\\ 
 +\\ 
 +**For each category:** This container executes the contained functors once per each class or category of a categorical map specified as input. 
 +\\ 
 +\\ 
 +**For each region:** This container creates and manages regions identified in a categorical map, whose classes represent regions (for example, a country, state, etc). It manages both processes of splitting a map into several maps, each one comprising a region, and the subsequent merging of all regional maps in a mosaic, that is a new map, after a sequence of processing of the regional maps. The container also iterates the functors inside it for each region. 
 +\\ 
 +\\ 
 +**While:** the condition is checked at the beginning of the iteration and if the condition is true, he container iterates.  
 +\\ 
 +\\ 
 +**Do while:​** ​The condition is checked after the execution of all functors within the container and the container iterates until the condition remains true. 
 +\\ 
 +\\ 
 +===Auxiliary operators to control iterations:​=== 
 +\\ 
 +\\ 
 +{{ :a.png?600 |}} 
 +\\ 
 +\\ 
 +**Step:** This functor receives and passes on the current step or iteration. 
 +\\ 
 +\\ 
 +**Mux Map:** This functor enables a map to become dynamic, feeding back a new map output from the model iteration. In the beginning of the first iteration, it reads the map input to the initial port
 +\\ 
 +\\ 
 +**Mux Table:** This functor enables a table to become dynamic, feeding back a new table output from the model iteration. In the beginning of the first iteration, it reads the table input to the initial port. 
 +\\ 
 +\\ 
 +**Mux Value:** This functor enables a value to become dynamic, feeding back a new value output from the model iteration. In the beginning of the first iteration, it reads the input value to the initial port. 
 +\\ 
 +\\ 
 +\\ 
 +\\ 
 +===Congratulations,​ you have successfully completed this lesson!=== 
 +\\ 
 +\\ 
 +☞[[:​lesson_14 | Next Lesson]] 
 +\\ 
 +☞[[:​guidebook_start| Back to Guidebook Start]]