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
using_different_parameters_for_patcher_and_expander_based_on_the_current_sub-region_year [2017/02/24 03:07]
hermann [Using different parameters for Patcher and Expander based on the current sub-region OR year]
using_different_parameters_for_patcher_and_expander_based_on_the_current_sub-region_year [2017/02/24 03:15]
hermann [Using different parameters for Patcher and Expander based on the current sub-region AND year]
Line 13: Line 13:
 However, there are several problems will the use of SelectXXXX: However, there are several problems will the use of SelectXXXX:
  
- * You have to predefine your parameters in your model: So if you want to add parameters for more regions OR years, you have to make changes to your model.+  ​* You have to predefine your parameters in your model: So if you want to add parameters for more regions OR years, you have to make changes to your model.
  
- * You can not defined a different parameter for each year AND sub-region: You can not nest different SelectXXXX.+  ​* You can not defined a different parameter for each year AND sub-region: You can not nest different SelectXXXX.
  
 ====== Using different parameters for Patcher and Expander based on the current sub-region AND year ====== ====== Using different parameters for Patcher and Expander based on the current sub-region AND year ======
  
-It is possible to overcome all the limitations of SelectXXXX using tables. All parameters ​[except ​images] can be converted to tables and from tables. And since tables can be stored as CSV files, this gives us a very effective way to reading and storing ​parameters ​from disk.+It is possible to overcome all the limitations of SelectXXXX using tables. All parameters ​(except ​[[Map Type|maps]] and [[Categorical Map Type|categorical maps]]can be converted to tables and from tables. And since tables can be stored as CSV files, this gives us a very effective way of reading ​from and saving ​parameters ​to disk.
  
 <note tip> <note tip>
Line 43: Line 43:
 </​code>​ </​code>​
  
-To confirm that a table can be converted to a Transition Function Parameter Matrix, create a CSV file using the text above [you can also use Excel], load the table using a [[Load Table]] and  connect the [[Load Table]] to the [[Allocate Transitions]] submodel.+To confirm that a table can be converted to a Transition Function Parameter Matrix, create a CSV file using the text above (you can also use Excel), load the table using a [[Load Table]] and  connect the [[Load Table]] to the [[Allocate Transitions]] submodel.
  
 However, just reading parameters from CSV files are not very useful. So let's try convert the  example model to use tables to replace the SelectXXXX containers. However, just reading parameters from CSV files are not very useful. So let's try convert the  example model to use tables to replace the SelectXXXX containers.
Line 92: Line 92:
 | 3 | 2 | 6 | 10 | 3 | 2 |  | 3 | 2 | 6 | 10 | 3 | 2 | 
  
 +Here is the corresponding CSV file:
 +
 +<​code>​
 Year*, From*, To*, Mean_Patch_Size,​ Patch_Size_Variance,​ Patch_Isometry, ​ Year*, From*, To*, Mean_Patch_Size,​ Patch_Size_Variance,​ Patch_Isometry, ​
 1, 1, 3, 50, 10, 1,  1, 1, 3, 50, 10, 1, 
Line 99: Line 102:
 3, 2, 1, 20, 3, 1.5,  3, 2, 1, 20, 3, 1.5, 
 3, 2, 6, 10, 3, 2,  3, 2, 6, 10, 3, 2, 
 +</​code>​
  
 The model ??? contains the changes to use tables instead of SelectXXXX. The model ??? contains the changes to use tables instead of SelectXXXX.