Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

Re: defineVisualState Question ?

New Message Reply Date view Thread view Subject view Author view

Subject: Re: defineVisualState Question ?
From: Christophe Le Page (lepage@cirad.fr)
Date: mer avr 11 2001 - 14:21:29 CEST

>
> When you ask to all the cells to do :
> defineVisualState; show
>
> does that mean that the model calculates all the point
> of view that you have define or does it calculate only
> the active one ?
>
It calculates only the active one. It is more convenient
not to send the messages "defineVisualState" and "show"
systematically to all the cells, but rather to add this instruction
at the end of any accessing methods enabling to change the
value of an attribute of the cell involved in a pov method.

If you consider the LandDynA model, the cell has two
attributes ("context" and "fertility") and two corresponding
pov methods ("povContext" and "povFertility").
The corresponding accessing methods have been completed
to look like this:

context: aValue
    context := aValue.
    self defineVisualState; show

fertility: aValue
    fertility := aValue.
    self defineVisualState; show

Then, the "povContext" method being the active point of view,
only the cells receiving a new value for their attribute "context"
will automatically do the calculation and will be automatically
refreshed on the spatial grid.

> Behind this question, I'm in fact asking my self :
> For a simulation in which you don't need to watch all
> the points of vue which are define in the model, will
> the model turn quicker if you keep only the one that
> you need by deleting in the model the other one ?
>
No. But you're right: behind that question is a more general question.
Is it possible to run a model with spatial entities without opening
the spatial grid ? At that time the answer is: No. Such a possibility
would increase the speed of a simulation. Ok, we add this request
to the stack of things to do for the next version of Cormas...

clp

New Message Reply Date view Thread view Subject view Author view
 

Back to home