Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

Re: run n times button

New Message Reply Date view Thread view Subject view Author view

Subject: Re: run n times button
From: francois bousquet (bousquet@cirad.fr)
Date: mer mai 02 2001 - 09:20:34 CEST

Run n times was designed to run several simulations on the same init. When
you select your initialisation method Cormas consider this initialisation
method as the active initialisation method.
This init is activated before the "evolve" method, thus ignoring the n
value.
For your application what you should do I suppose is:
- keep an intilisation method which will be run for each n, iindependent of
the value of n.
- create an new method in "Prepare and schedule"to initialize you parameters
depending on n value, let's say "initparameters: x"
- in your evolve method start with the first instruction
    t= 0 ifTrue: [ self initparameters :n].

To test my answer I have implemented an example based on the Pursuit model .
It is attached.

----- Original Message -----
From: "J. Hoekstra" <jhoekstra@econ.vu.nl>
To: <cormas@cnusc.fr>
Sent: Tuesday, May 01, 2001 5:08 PM
Subject: run n times button

> Dear all,
>
> I am planning to run my model several times with several begin conditions
> and/or several different parameter values. The run n times button seems to
be
> designed to do this. However when using the button, Cormas calls the same
init
> message n times, independent of the value of n. Cormas does not accept an
> init:n message as the initialization method because n does not have a
value
> yet, when init:n is called the first time.
>
> How can I run a model n times, each run with a different initialization
> depending on n?
>
> greetings,
> Jeljer
>
>
>
> ------------------------------------------------------------------
> Jeljer Hoekstra
> Dept. of Spatial Economics (Vakgroep Ruimtelijke Economie)
> Free University (Vrije Universiteit)
> De Boelelaan 1105
> 1081 HV Amsterdam
> The Netherlands
>
> Phone: +31 20 4446168
> Fax: +31 20 4446004
>
> ------------------------------------------------------------------

New Message Reply Date view Thread view Subject view Author view
 

Back to home