Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

Re: comment concevoir un modele avec differents pas de temps

New Message Reply Date view Thread view Subject view Author view

Subject: Re: comment concevoir un modele avec differents pas de temps
From: Pierre Bommel (bommel@cirad.fr)
Date: Thu Apr 06 2006 - 17:28:14 CEST

Bonjour,
I reply in english because this question may interest people.
                How designing a model with various steps of time ?
There is 2 solutions to simulate various time step : (A) the main step
is the minimum step required by your entities (Water for ex), (B) the
main step represents the longest period needed (Crop for ex).
Let say that the different steps for your entities are :
        - 1 day for the Water,
        - 1 month for the Farmer,
        - 6 month for the Crop.
You can assigne variable classes call StepDuration for each Entity.
        Water stepDuration := 1 (day)
        Farmer stepDuration := 30 (day)
        Crop stepDuration := 178 (day)

  - Solution A : main step = 1 DAY
In the main step of your model, you can write :

   step: t "t = 1 DAY"
        self stepEntities: self theWaters.
        (t \\ Farmer stepDuration = 0) ifTrue: [self stepEntities: self
theFarmers].
        (t \\ Crop stepDuration = 0) ifTrue: [self stepEntities: self
theCrops].

  - Solution B : main step = 6 MONTH
Then in the main step of your model, you can write :

   step: t "t = 6 MONTH"
        (178 / Water stepDuration rounded) timesRepeat: [self stepEntities:
self theWaters].
        (178 / Farmer stepDuration rounded) timesRepeat: [self stepEntities:
self theFarmers].
        self stepEntities: self theCrops.

 From far, I prefere The first solution, because the updateEntities
method is automatically called at the end of the step to clean up the
collections of entities. For instance, if some Water instances are
created during the water step, the new instances will be collected only
at the end of the time step. This should be a problem. Nevertheless, if
you prefer this solution, you will have to add this :
   step: t "t = 6 MONTH"
        (178 / Water stepDuration rounded) timesRepeat: [self stepEntities:
self theWaters. self updateEntities].
        (178 / Farmer stepDuration rounded) timesRepeat: [self stepEntities:
self theFarmers. self updateEntities].
        self stepEntities: self theCrops.

J'espère que ça t'aidera. Bon stage !

        Pierre

Le 6 avr. 06, à 06:27, toukabri fredj a écrit :

> bonjour;
> je suis un stagiare en train de faire un modele multi agents sous la
> plateforme Cormas qui consite a simuler les strategies agricoles et
> l'usages de l'eau en milieu aride le probleme et que je veux que la
> simulation permette de visualiser
> l'evolution biomassique ( croissance des cultures ), l'evolution de
> l'eau de ruisselement de l'impluvium jusqu'aux surfaces cultivées
> aussi bien que l'evolution de la tresorerie des acteurs (agriculteurs)
> donc il me faut 3 pas de temps est c'est ca le probleme
> toukebri fredj IRD Tunisie.
>
> _______________________________________________________________
> Get the FREE email that has everyone talking at
> http://www.mail2world.com
> Unlimited Email Storage – POP3 – Calendar – SMS – Translator – Much
> More!
        Pierre Bommel - CIRAD - UR Green
        Universidade de Brasília - Centro de Desenvolvimento Sustentável
        SHIS QI 26, Conjunto 15, Casa 18
        71670-150
        Brasilia DF
        tel: (00 55 61) 3367 3405
        http://www.cirad.fr/ur/green

New Message Reply Date view Thread view Subject view Author view
 

Back to home