Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

Cormas help

New Message Reply Date view Thread view Subject view Author view

Subject: Cormas help
From: Jourdain, Damien (D.JOURDAIN@CGIAR.ORG)
Date: mer nov 28 2001 - 17:33:41 CET

Dear all,

I largely agree now that distance is dependent on the modeller's point of
view ... and thanks to Pierre to open my eyes on that. As Olivier, I would
think the idea of a set of distances, offered in the 2002 version at a
superior level could be interesting.

This brings me to "new dreams" about future version of Cormas you asked us
to express.
I have this feeling that an impressive number of methods "supposedly"
available to every users are hardly used by the user lambda (me for
example), just because he does not know they exist!

One already "working solution" is to ask this forum an "how to" question?
Given the number of persons unsubscribing each time a new question arise, I
doubt though it is viable on the long term!

Another solution would be to start an online documentation classified along
large notions.
For example, distance: what are the concepts involved, what are the methods
available and what are the difference between them, etc. I know the team of
developers is limited (but dynamic!), but this could greatly help.... and
you asked us to express our craziest dreams !!

Damien

-----Original Message-----
From: Olivier BARRETEAU [mailto:barreteau@montpellier.cemagref.fr]
Sent: Tuesday, November 27, 2001 10:10 AM
To: cormas@cines.fr
Subject: Re: "Real distance" between two cells.

I agree with Pierre that this notion is highly conceptual and dependent on
the modeller's point of view. The discreteness of space used with Cormas is
also to be taken in account.

But I think a set of distances (at least the existing #distCell, depending
on the chosen topology, but also Pythore's one and why not others according
to various needs and creations of Cormassers) should be proposed at the
superior level, and might be selected from within topology menu.

cheers

Olivier

A 19:53 23/11/01 +0100, Christophe Le Page a écrit :
>From a very practical point of view, an analysis of what is currently
 Thu 29 Nov 2001 10:04:14 +0100
available in Cormas2001:
>
>#distCenter: is useful when you just need relative measurements of
>distance, like when looking for shortest way. For instance when you
>need to let an agent move cell by cell from a departure cell to a distant
>destination cell, you can write something like:
>
>moveTowards: destinationCell
>| max step d |
> max := self patch distCenter: destinationCell.
> step := self patch.
> self patch neighbourhood do: [:c |
> d := a distCenter: destinationCell.
> d < max ifTrue: [max := d. step := c]].
> self leave.
> self moveTo: step
>
>!!! Note that this is only valid for closed boundaries conditions !!!
>
>#distCell: is based on a recursive neighbourhood algorithm, which makes
>it time-consuming but valid in both toroidal and closed boundaries
conditions,
>and robust when resizing the spatial grid window...
>
>But as Pierre has mentionned, this should be discussed to had better
>solutions in the next release !
>
>clp
>----- Original Message -----
>From: Pierre Bommel <bommel@cirad.fr>
>To: Jourdain, Damien <D.JOURDAIN@CGIAR.ORG>
>Cc: <cormas@cnusc.fr>
>Sent: Friday, November 23, 2001 7:18 PM
>Subject: Re: "Real distance" between two cells.
>
>
>> Hello Damien,
>>
>> Jourdain, Damien wrote:
>>
>> > Dear all,
>> >
>> > Correct me if I am wrong! There is no way to calculate a "real"
distance
>> > between two cells if we assume a certain scale for the environment. For
>> > example, if we consider a plot of 1ha, we can reasonably think that the
>> > distance between two adjacent point centers is 100 m.
>> >
>> > If I use the function distCenter: I have a distance between the two
cell
>> > centers, but I think the result is dependant on the way the grid is
>> > displayed (I do not get the same result with a grid taking half the
screen
>> > versus a grid taking all the screen).
>> Yes you are right : that's ugly ! This method will disappear in the next
>> version of Cormas2002 (very soon !). The model must be separate from the
>> display according to MVC architecture (M_odel separated from V_iew and
>> from C_ontroler).
>>
>> >
>> > If I use the function distCell: I have an integer result corresponding
to
>> > the number of cells , that just gives me an approximation of the real
>> > distance once those two cells are not on the same line or on the same
column
>> > in the grid.
>> I personnaly think that it's a conceptual problem: The elementary unit
>> of your model is the SpatialEntity_Element (the cell), so distCell:
>> should return a number equals to the shortest way to go from cellA to
>> cellB. For instance, the distance shouldn't be the same if the connexity
>> is 4 or 8: in the first case: D(a,b)=|Xa-Xb| + |Ya-Yb| and in the second
>> case: D(a,b)=max(|Xa-Xb|,|Ya-Yb|).
>> You can also use the Pythagore theorem to calculate a distance
>> (squareroot((Xa-Xb)square + (Ya-Yb)square) but this kind of distances
>> works for continuous spaces: for the moment, we only use discrete spaces
>> in Cormas, and there is no straightforward way for your agents to go
>> from A to B. In my personal point of view, it shouldn't be at a superior
>> level.
>> The problem must be debate if we use irregular spatial entities whithout
>> unit... let's talk !
>>
>> Cheers,
>>
>> 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