![]() |
|
|
|
Test Spatial Entities : TSETest of Cormas aggregative spatial entitiesChristophe Le Page, Pierre Bommel, Cirad 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 :
The operations of aggregation-disintegration are based on the two attributes "components" (a collection of lower level spatial entities) and "theCSE" (a register of belonging to higer level spatial entities). The TSE 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),
the components (Aggregate) are defined as sets of contiguous cells sharing
a same condition. Each cell has either #tree (aggregation condition) or
#empty as value of its "context" attribute. The effective instanciations
from the compound spatial entity "Aggregate" are submitted to
an additional constraint about a minimum number (set to 15) of contiguous
components verifying the aggregation condition. 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 has a fixed (very low) probability to switch its "context"
attribute value (newContext). 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.
In the second one (Swelling from 10 seeds), 10 "seed" cells are randomly chosen in the 50*50 spatial grid. 10 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:
How to run this model1. Spreading of 3 forests1.1 From the Cormas main menu, load Files -> Load . Select TSE and
choose SpreadForest.st version of TSE. 2. Swelling from 10 seeds2.1 From the Cormas main menu, load Files -> Load . Select TSE and
choose SwellFromSeeds.st version of TSE.
From the spatial grid menu, use Tools -> Load an environment, select
10seeds.env and validate. This will initialize
a 50*50 grid and assign values (true or false) to the cell attribute seed 3. Save and load your environment3.1 From the Cormas main menu, load Files -> Load . Select TSE and
choose Save-Load-Aggregates.st version of
TSE.
|