Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

RE : updating cormas2001

New Message Reply Date view Thread view Subject view Author view

Subject: RE : updating cormas2001
From: Christophe Le Page (christophe.le_page@cirad.fr)
Date: Wed May 26 2004 - 16:45:47 CEST

Hello Jeljer,

For the first pb, you may use the general method to change
programmatically the topology of the spatial grid:
        self spaceModel
                initializeRegularX: 10
                Y: 10
                shape: #squared
                nbNeighbours: #eight
                boundaries: #closed
                delimiter: true.

For the second one, I cannot see clearly the interest of the 3 last
arguments:
- cellSurface should be directly accessible at the Cell level, as it
sounds like a cell characteristic
- an instance of cell can directly access the number of lines and
columns of the spatial grid to which it belongs. In Cell>>init for
instance, you can use "self spaceModel line" and "self spaceModel
column".

HTH,
clp

> -----Message d'origine-----
> De : owner-cormas@cirad.fr [mailto:owner-cormas@cirad.fr] De
> la part de Hoekstra, J. (Jeljer)
> Envoyé : mercredi 26 mai 2004 10:17
> À : cormas@cirad.fr
> Objet : updating cormas2001
>
>
> Dear all,
>
> I have update my cormas2001 model to the latest cormas
> version. This was quite simple. Good work cormas team!
>
> There is only one small problem left that I cannot fix. The
> method in which I automatically set the parameters for the
> grid (size etc.), Setupgrid does not work anymore. Also a
> related methods like setupcells, which also uses the
> spaceModel method causes an error.
>
> I'd like some help on how to make these methods work again in
> cormas2003 (or is it 2004 already). I have attached the methods below.
>
> Thanks for your help in advance,
>
> Cheers
>
> Jeljer
>
>
>
> setupgrid
>
> | pov |
>
> pov := Wad_Cell activePov.
>
> Wad_Cell activePov: nil.
>
> self gridSizeCol: 10 line: "change migrate!!" 10.
>
> Wad_Cell activePov: pov.
>
> self spaceModel clotureEspace: #closed.
>
> self spaceModel calculVoisins. " the neighbourhood has to be reset"
>
> self spaceModel interface cloturePatchChanged. " inform the
> interface to update"
>
> self spaceModel interface updateName.
>
> setupcells
>
> | arguments |
>
> arguments:= Array new:5.
>
> arguments at:1 put: self predator;
>
> at:2 put: self prey;
>
> at:3 put: self cellsurface;
>
> at:4 put: self spaceModel interface column value";
>
> at:5 put: self spaceModel interface line value".
>
> self initCells: #setup:and:on:gridcol:gridrow:
>
> withArguments: arguments.
>

New Message Reply Date view Thread view Subject view Author view
 

Back to home