Demo_Aggregates (old "TSE")

Test of Cormas aggregative spatial entities

Christophe Le Page, Pierre Bommel, Cirad

(See also the Demo_aggregates page)

This model introduces the functionning principles of Cormas aggregative spatial entities. In the inheritage tree of the Cormas generic spatial entities, the compound spatial entity "SpatialEntity_Set" is specialized in :

  • "SpatialEntityAggregate", whose components should be contiguous
  • "SpatialEntityNotConnex", whose components may not be contiguous.

The operations of aggregation-disintegration are based on the two attributes "components" of SpatialEntitySet (a collection of lower level spatial entities) and "theCSE" (Component of a Spatial Entity: register of belonging to higer level spatial entities).

The Demo_Aggregate model is a didactic model that allows to test two different ways to create spatial aggregates with Cormas.

In the first one (Spreading of 3 forests: initForests & stepForests), the components Groves (or Aggregate) are defined as sets of contiguous cells sharing a same condition. Each cell has either true (aggregation condition) or false as value of its "tree" attribute. The effective instanciations from the compound spatial entity "Grove" are submitted to an additional constraint about a minimum number (set to 25) of contiguous components verifying the aggregation condition (see #buildForests).

To let co-exist in the same model several spatial entities defined at different levels gives a great flexibility to write the dynamics of the model. Some of the processes are more easily described at the cellular level, as for some others, the aggregated level is more suitable. In this didactic and simplistic example,

  • each cell (Plot) has a fixed (very low) probability to switch its "tree" attribute value (newState).
  • At the level of the aggregates, a spreading process (expand) from the edges is written like this: a given number (corresponding to the hundredth of the total number of components of the forestry entity) of cells at the outside edge are going to be aggregated to the forest. In order to keep a high compacity to the forestry entities, a priority is given to the cells that are surrounded by the highest number of already aggregated cells.

A second level aggregate (FragmentedEntity) is also designed in this model. It is the collection of first level aggregates whose size is upper 50. We obtain a hierarchical aggregation, from the basic level to the second level aggregate :

First level point of view
(Cell => povTree)
Second level point of view
(Aggregate => povId)
Third level point of view
(FragmentedEntity => povTree)

 

In the second one (setSingletonAggregatesFromRandomSeeds  & swellForests), 30 "seed" cells are randomly chosen in the 50*50 spatial grid. 30 aggregates are intialized with one of these seeds as a single component. The iterative building process of the aggregates relies on the integration, among the cells belonging to the outside edge of each aggregate, of all the one that do not yet belong to another aggregate. There is two ways to build these aggregates from seeds:

  • a progressive one (init= setSingletonAggregatesFromRandomSeeds and control = swellForests:)

    Progressive swell (swellAggregates)

  • and a quick one : the space partition is completed in one step :
    • [init=setAggregatesFromRandomSeeds] It constructs 30 groves made of 80 (max) cells from 30 random seeds. The size of each aggregate should follow a size distribution (#(30 80)), be equal to : 80 for the 30 groves:
    •  

    • or the distribution can be sizeDistribution: #(#(1 800) #(5 30) #(4 3) #(20 10)) = 1 grove of 800 cells,  5 groves of 30 cells , 4 groves of 3 cells and 20 groves of 10 cells.
    • or [init=setAggregatesFifthFourth] It constructs a complete space partition by regular segmentation : 4 lines and 5 colomns

 

How to run this model

1. Spreading of 3 forests

1.1 From the Cormas main menu, load Files -> Load, select Demo_Aggregates.
1.2 From the Simulate button, select initForest  (for initialization) and swellForest (for the control).
1.3 The spatial grid will automatically open displaying the Grove delimitors pov.
1.4 Each click on the Forward button will activate the swell process: the 3 groves will expand on their surrounds.
1.4 Enter 30 in the Final time input field of the Simulation window.
1.5 Click on the Run button of the Simulation window.

2. Swelling from 10 seeds

The same process can be performed from 10 random seeds.
2.1 From the Cormas main menu, load Files -> Load, select Demo_Aggregates.
2.2 From the Simulate button, select setSingletonAggregatesFromRandomSeeds (for initialization) and swellForest (for the control). This will initialize a 50*50 grid and assign values (true or false) to the cell attribute #tree.

3. Two distinct growth dynamics

Here two processes are executed in parallel: an expansion of the forest from the groves + a random probability for the plots to switch from one state to the other (tree or not).
3.1 From the Simulate button, select initForest  (for initialization) and stepForests (for the control).
3.2 The spatial grid will automatically open displaying the Grove delimitors pov.
3.3 Each click on the Forward button will activate the swell process from the groves plus the newState of the plots.
3.4 Enter 300 in the Final time input field of the Simulation window.
3.5 Click on the Run button of the Simulation window..

 


Le Cirad Centre de coopération internationale en recherche agronomique pour le développement
Informations légales © Copyright Cirad 2001-2015 cormas-webmaster@cirad.fr