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
Next revision Both sides next revision
tutorial:advanced_resources [2013/07/23 21:28]
juliana
tutorial:advanced_resources [2013/07/29 14:01]
juliana
Line 12: Line 12:
  
  
- [[ Varying parameters in a simulation]] ​ 
-  
  
  
  
-[[ Using subregions ​in a simulation ​model]]+<WRAP center round box 60%> 
 + [[ Varying parameters ​in a simulation]]
  
 + 
 + [[ Using subregions in a simulation model]]
 +  ​
 + 
 + [[ Using sojourn time ]]
  
 + 
 + [[ Using local saturation ]]
 +</​WRAP>​
  
-Using subregions in a simulation model 
- 
-Load the model: “simulate_deforestation_using_sub_regions.xml” from Examples\advanced\sub_regions\simulate_deforestation_using_sub_regions 
- 
-The Subregion set of functors are used to split a map into parts to process each subregion’s dataset separately, and then combine the results again (fig. 15). By making use of the subregion approach, you can define a sequence of operations that will be applied only to certain subregions or establish different parameters and coefficients for each subregion, modeling as a result the regional context that influences a particular phenomenon. 
- 
-[{{ :​tutorial:​advanced_3.jpg |Subregion scheme enables the application of different submodels to parts of a map}}] 
- 
- 
-In this model, we introduce subregions in a simulation to enable the use of different transition matrices and Weight of Evidence coefficients for each subregion of a map. 
- 
-{{ :​tutorial:​advanced_4.jpg |}} 
- 
-In order to this, you need to slightly modify the simulation model of lesson 7. First, a specific calibration for each subregion should be performed. In the example above, transition matrices and a set of weights of evidence coefficients were calculated for each one of the map subregions. See models for calibrating different subregions in   ​“Examples\advanced\sub_regions\calibration”. 
- 
-In the simulation model, one //Load Categorical Map// must be added. It will be responsible for loading the map with the subregions. ​ 
- 
-<note tip>​**TIP**:​ this must be a categorical map (in this example, a map of municipal limits). The area of each municipality is identified by its 6 digit code.  This code will identify the subregions and control the regionalization process.</​note>​ 
- 
-{{ :​tutorial:​advanced_6.1.jpg |}} 
- 
- 
-In this model, deforestation is simulated on an annual basis for each one of the municipalities. After that, the resulting maps are combined into a new land-use map that will be split again in the beginning of the next step. To ensure spatial continuity across subregions, some operations, such as the calculation of distance map to deforested cells using //Calc Distance Map//, are performed for the entire map.  
- 
-{{ :​tutorial:​advanced_7.1.jpg |}} 
- 
-A //Region Manager// is added outside of the main loop (//​Repeat//​). This container controls the creation and merging of subregions. 
- 
-{{ :​tutorial:​advanced_8.jpg |}} 
- 
-The container //For Each Category// also controls the subregion creation process. For each map category, //For Each Category// will repeat the sequence of functors within it. Make sure the Categorical Map “23267_municipalities.ers” is connected to //For Each Category// as well as to //Region Manager//. In this case, Step placed within the innermost container receives and passes on the subregions’ codes. Also any sequence of functors that affect each region should be put within this container. 
- 
-{{ :​tutorial:​advanced_9.jpg |}} 
- 
-The functors //​Regionalize Map// and //​Regionalize Categorical Map// spilt the map into regional maps. . All maps that are combined after these functors need to have the same dimensions. So make sure that they all are regionalized through these functors, as the example of distance maps and static variables. Note also, that you can set different transition matrices or Weights of Evidence files for the subregions by assigning the subregion’s code (in this case 6 digits) as a suffix to these files and placing //Load Table// and //Load Weights// inside //For Each Category// Container.  ​ 
- 
-<note tip>​**TIP**:​ you need also to set suffix digits to 6.</​note>​ 
- 
-{{ :​tutorial:​advanced_10.jpg |}} 
- 
-At the end of an iteration of //For Each Category//, a functor //Regional Categorical Map// stores the regional maps. Assign a **Global Map Name** to these maps. After //For Each Category// runs, the regional maps can be merged into an updated landscape map. The functor// Merge Regional Categorical Map// is in charge of merging the regional maps. Its **Global Map Name** must be the same as //Regional Categorical Map//.// Merge Regional Categorical Map// must be placed within// Region Manager// and, in order to ensure a proper sequence of processing, you need to establish a dependence effect between this functor and the //Regional Categorical Map//. A way  to do this is by placing //Merge Regional Categorical Map// within a //Group// and linking this //Group// to //For Each Category// using a functor //Int// as a link. //Int// simply passes an integer constant from //For Each Category// to //Group//, establishing as a result a time-dependence between the executions of both.  
- 
-{{ :​tutorial:​advanced_11.jpg |}} 
- 
-After the regional maps are merged, the model iterates and a new landscape map is fed back into// Mux Categorical Map// closing the loop. Therefore, the saved landscape map represents a mosaic of changed regional landscapes. 
- 
- 
-==== Using sojourn time ==== 
- 
-Load the model “simulate_deforestation_and_abandonment_using_sojourn_time.xml” from \Examples. The use of sojourn time implies that a specific transition or event will not occur unless a certain time has passed since a specific event has occurred. 
- 
-The concept of sojourn time can be implemented using a map that keeps track of the time since a particular event has occurred (for example, a transition from state i to j). For each cell, a clock will count the time past after a particular event has occurred. In the end of iteration, this map is updated, if there is no new event, the model simply adds one to the cell’s sojourn time, and if an event occurs, the clock is set to zero. 
- 
-[{{ :​tutorial:​advanced_12.jpg |In this case, sojourn time map keeps tracks of the time past after a cell has changed to a new state. All cells begin with 99 time units}}] 
- 
-The sojourn time can be used as a rule to constrain a transition from a state to the other only after a certain sojourn in a particular state. In this example, the sojourn time is used to influence the probabilities from deforested land (value 1) to abandon – regrowth (value 8). Land is only abandoned after 4 years in use: i.e. after deforestation has taken place (transition 2 to 1). 
- 
-The sojourn map is initialized with high values (e.g. 9999). By doing so, it’s possible to differentiate cells where a certain transition has never occurred from cells that have changed during the simulation. This might be useful for further analyses. 
- 
-{{ :​tutorial:​advanced_13.jpg |}} 
- 
-At the end of iteration, a new sojourn map is calculated by comparing the previous land-use map with the current one. Cells whose states have changed, the corresponding sojourn times are set to zero; otherwise they are incremented by one time unit.  
- 
-{{ :​tutorial:​advanced_14.jpg |}} 
- 
-The sojourn time concept is applied to constrain a change. An easy way to do this is by modifying the corresponding probability map. As these maps are stacked in a cube raster set, you need first to extract the layers from the cube raster set, so the //Calculate Map// will be able to manipulate them separately. ​ 
- 
-{{ :​tutorial:​advanced_15.jpg |}} 
- 
-After calculating the probability map using //Calc W. of E. Probability Map//, the layer of the transition from deforested to abandon (transition 1 to 8) undergoes a new calculation. This is a comparison of the sojourn time. If a deforested cell is older than 3 years, its probability is kept unchanged. If it is not, the probability to change to abandon is set to zero, impeding, as result, this transition to take place. ​ 
- 
-<note tip>​**TIP**:​ The transition functors (//​Patcher//​ and //​Expander//​) do not change cells with transition probabilities equal to zero</​note>​. 
- 
-{{ :​tutorial:​advanced_16.jpg |}} 
- 
-Then, the probability layers (the original layer with transition 2 to 1 and the new layer with transition 1 to 8) are put together again as a new cube raster dataset, which is passed on to the transition functions, //​Expander//​ and //​Patcher//​. ​ 
- 
-{{ :​tutorial:​advanced_17.jpg |}} 
  
-==== Using sojourn time and deterministic transitions ====+[[tutorial:​landscape_metrics_in_dinamica_ego| Next Lesson]]