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_13 [2020/02/11 16:48]
argemiro
lesson_13 [2020/02/13 20:06] (current)
danilo
Line 1: Line 1:
 {{ :​logo_logo.png?​400 |}} {{ :​logo_logo.png?​400 |}}
 \\ \\
-=====LESSON 13: Loop structures ​on Dinamica EGO=====  ​+=====LESSON 13: Loop structures ​introduction=====  ​
 \\ \\
 \\ \\
 ==== What will you learn? ==== ==== What will you learn? ====
- +\\ 
-* What are the main repetition structures present in Dinamica EGO \\ +  * The main iteration algorithms (containers) ​ 
-* What are the main auxiliary operators ​to control iterations in Dinamica EGO \\+  * Their main auxiliary operators ​
 \\  ​ \\  ​
-Dinamica EGO has several ​looping structures that can be used for various applications. Loops come in handy when you want to run the same code over and over again, each time with a different ​value. Loops can execute a block of code a number of times. In this lesson we will talk about different kinds of loops on Dinamica EGO and how to work with repetition structures.+\\ 
 +Dinamica EGO has several ​iteration control functors. These functors ​in the form of container allow to developing iteration including closed loops. For example, ​run model steps, each time with different ​values or using a dynamic data, such 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.
 \\ \\
 \\ \\
Line 18: Line 19:
 \\ \\
 \\ \\
-**Repeat:** This container makes a set of functors, linked in a dataflow chain, iterate a predetermined number of times.+**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 not met.+**For:** This container makes a set of functors linked in a dataflow chain iterate while a given condition is met.
 \\ \\
 \\ \\
Line 30: Line 31:
 \\ \\
 \\ \\
-**For each region:** This container creates and manages regions identified ​by a categorical map, whose classes represent regions. It manages both the 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. The container also calls the functors inside it to each region.+**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:​** ​Checks ​the condition at the starting ​of the loop and if the condition is satisfied the statement inside the loop is executed. +**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 statements in the body of the loop.+**Do while:** The condition is checked after the execution of all functors within ​the container and the container iterates until the condition remains true.
 \\ \\
 \\ \\
Line 45: Line 46:
 \\ \\
 \\ \\
-**Step:** This functor receives and passes on to the current ​model the step or iteration.+**Step:** This functor receives and passes on the current step or iteration.
 \\ \\
 \\ \\
-**Mux Map:** This functor ​makes a map dynamic, feeding ​it back with a map output from a model step. In the beginning of the first iteration, it reads a map input from the initial port.+**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 ​makes a table dynamic, feeding ​it back with a table output from a model step. In the beginning of the first iteration, it reads the table input from 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 ​initiates and feeds back a loop variable containing ​a value. In the beginning of the first iteration, it reads the input value from 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.
 \\ \\
 \\ \\