Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

Re: More doubts

New Message Reply Date view Thread view Subject view Author view

Subject: Re: More doubts
From: Pierre Bommel (bommel@cirad.fr)
Date: Thu Mar 20 2003 - 10:20:51 CET

Hello Diana,

> I have more doubts about my implementation in Cormas.
> Again, I have problems with Aggregation method. Where
> can I get more informations about it?

For the moment, the only document available on this subject has been written in french. I will send it to you personnaly.

> I'm sending a file with my definitions and problems.

> CormasNS.Models.JogoMan1 defineClass: #Municipe
>

> inicialize Municipe:
> init
> myTerritory := OrderedCollection new.
> self name: ''

The attribut myTerritory seems useless. I suppose you want that your aggregate knows its components, no ? In this case, this is the attribut "components", defined at the level of SpatialEntitySet.

> create a method in the scheduler:
>
> "There are three types of municipe (variable of Spatial Entity Cell): munA, munB and munC"
>
> "This method must do three aggregations and put each aggregation in variable myTerritory of Spatial Entity Municipe, that it was defined how OrderedCollection. But, the last aggregation is stored only. Why? Must I create a method to add each aggreation? Is it possible?"
>
> buildMunicipeTerritory
>
> self spaceModel
> setAggregates: Municipe
> from: Cell
> verifying: [:c | c municipe = #munA].
> self theMunicipes do: [:c | c myTerritory: self theMunicipes].

this last instruction should be remove.

The method can be :
buildMunicipeTerritory
     self spaceModel
          setAggregates: Municipe
          from: Cell
          attribute: #municipe.
It will construct the Municipe aggregates from the values of attribut municipe of Cell.

Now, if you want that each cell knows its municipe, you can add a method in Cell class :
municipe
    ^self theCSE at: #Municipe

Best regards,

    Pierre

--
***********************************
  Pierre Bommel
  CIRAD TA 60/15
  73, rue Jean-François Breton
  34398 Montpellier cedex 5 France
  Phone: +33 (0)4 67 59 38 53
  Fax: +33 (0)4 67 59 38 27
  http://cormas.cirad.fr
***********************************

New Message Reply Date view Thread view Subject view Author view
 

Back to home