Differences

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

Link to this comparison view

Both sides previous revision Previous revision
lesson_11 [2020/02/17 13:20]
pedrog
lesson_11 [2020/02/19 16:59]
argemiro
Line 11: Line 11:
 \\ \\
 Initially, we will learn how to create a submodel and next we will learn how to use it in a Model. ​ Initially, we will learn how to create a submodel and next we will learn how to use it in a Model. ​
-We will start with the model ''​5_calculate_lookup_table''​ located in ''​Guidebook_Dinamica_5/Models/​Set_2/​basics/​5_calculate_lookup_table''​. Using this model we will answer the following question: ​+We will start with the model ''​5_calculate_lookup_table''​ located in ''​\Guidebook_Dinamica_5\Models\creating_and_using_local_submodels''​. Using this model we will answer the following question: ​
 \\ \\
 \\ \\
Line 67: Line 67:
 {{ :​aaa5.png?​600 |}} {{ :​aaa5.png?​600 |}}
 \\ \\
-  * Create a new model script, 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 located in ''​Guidebook_Dinamica_5/​Models/​Set_2/​basics/​2_add_table_column_set_table_by_key/​IBGE_crop_information_complete.csv''​. 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 (0) and click OK.+  * Create a new model script, 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 located in ''​\Guidebook_Dinamica_5\Database\Tables''​. 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 (0) and click OK.
 \\ \\
 \\ \\
Line 80: Line 80:
 {{ :​aaa7.png?​600 |}} {{ :​aaa7.png?​600 |}}
 \\ \\
-  * To save the results to a file, grab three **Save Table** functors, place them on the sketch and connect to each Submodel (for the three crops). Open **Save Table** Functors, browse to the ''​Guidebook_Dinamica_5/Models/​Set_2/​basics/​6_submodel''​ and write the file names (e.g. most_productive_year_for_crop_1.csv, ​ most_productive_year_for_crop_2.csv and most_productive_year_for_crop_3.csv).+  * To save the results to a file, grab three **Save Table** functors, place them on the sketch and connect to each Submodel (for the three crops). Open **Save Table** Functors, browse to the ''​\Guidebook_Dinamica_5\Models\creating_and_using_local_submodels''​ and write the file names (e.g. most_productive_year_for_crop_1.csv, ​ most_productive_year_for_crop_2.csv and most_productive_year_for_crop_3.csv).
 \\ \\
 \\ \\