LESSON 13: Loop structures on Dinamica EGO

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.

For this, we learn how user a container to makes a set of functors, linked in a dataflow chain, iterate a number of times.
Let's go! 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:
- 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)
The creation of the model that will be inserted inside the repeat structure is very similar to the model explained in the previous exercise. The principally difference is that, now, the input map is produced for each iteration, calculate Map produces a map containing the remaining forest for each category.
Grab the container For from the Control tab and place it on the sketch. Drag the previously model into it. It will automatically resize to envelop Calculate Map.