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_99 [2019/08/07 16:04]
argemiro
lesson_99 [2019/08/20 15:56] (current)
argemiro ↷ Page name changed from lesson_13 to lesson_99
Line 40: Line 40:
 \\ \\
 \\ \\
 +We can use this Submodel in an independent model. For demonstrate this, grab a “Load Table Functor” and place it on the sketch. Double click the Load Table Functor and open the IBGE_crop_information_complete.csv file.
 +\\
 +\\
 +Grab a “Reorder Table Column” and place it on the sketch to switch the order of the year and crop key columns. Connect the Load Table to Reorder Table Column. In the Functor Editor window insert the index of the column to be moved (“1”) and the new column index, similarly to previous exercise.
 +\\
 +\\
 +{{ :​imagem82.jpg?​400 |}}
 +\\
 +\\
 +Now, let's insert our previously created Submodel. First, click on the Submodels tab and from the library window grab a “Calc Most Productive year” Submodel and place it on the sketch. We want to calculate the most productive year for each crop; thus, we will use this Submodel 3 times, i.e. for the crops 1, 2 and 3.
 +\\
 +\\
 +{{ :​imagem83.png?​400 |}}
 +\\
 +\\
 +Now you need to save the results to a file. Grab three “Save Table” functors, place it on the sketch and connect to each Submodel (For the three crops). Open Save Map Functors, browse to the Guidebook Dinamica_4/​Models/​Set_2/​basics/​6_submodel and  write the name files (most_productive_year_for_crop_1.csv, ​ most_productive_year_for_crop_2.csv, ​ and most_productive_year_for_crop_3.csv).
 +\\
 +\\
 +The final model will look like this: 
 +
 +\\
 +\\
 +{{ :​imagem85.png?​400 |}}
 +\\
 +\\
 +Mark the eye button at the top of “Save Table” to view the results hereafter.\\
 +\\
 +Save and run the model! ​
 +\\
 +\\
 +Now, click on eye button of “Save Table” to see the result. These functors outputs are tables that looks like this:
 +\\
 +\\
 +{{ :​imagem86.png?​400 |}}
 +\\
 +\\
 +**What does this result say about the productivity for each crop along the analyzed period?**
 +\\
 +We can infer that 2009 was the most productive year for Crop 1 along the analyzed period, with a productivity of 80.25549 tons/ha. For the Crop 2, 2015 was the most productive year, with a productivity of 3.535804 tons/ha and 2011 was the most productive year for Crop 3, with a productivity of 3.121386 tons/ha.
 +\\
 +\\
 +
 +Congratulations! You have successfully completed this lesson! Now let’s move to the next ones!
 +
 +