Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

Re: save environment

New Message Reply Date view Thread view Subject view Author view

Subject: Re: save environment
From: Christophe Le Page (lepage@cirad.fr)
Date: mar nov 20 2001 - 18:29:01 CET

Hello Joelle,

Good to see that at least one trainee from the Wageningen session
is still working with Cormas ;->>

The method you are looking for is named #writeEnvFile:attributes:
and has to be sent to the "space" attribute of your model. So, to do
what you need, add the following instruction in the "step:t" method
of your model:

 t = 10 ifTrue: [
    self space
        writeEnvFile: ((Cormas mapsPath: self class name), 'filename' , t printString , '.env') asFilename
        attributes: #('attributeName1' 'attributeName2')]

Bises,
clp

----- Original Message -----
From: Joelle Noailly <noailly@tinbergen.nl>
To: <cormas@cnusc.fr>
Sent: Tuesday, November 20, 2001 4:49 PM
Subject: save environment

> Hello,
>
> I would like to be able to program the 'save environment' function
> (which save the spatial grid and puts it
> into a .env file in the maps folder).
> For instance, after a certain number of runs (n), I want to call a
> method that says :
> ' save the environment and send it to a file called 'name', n
> printString (.env) into the map folder'. In
> other words, something like initFile and updateFile but for environment
> files (image) instead of data files.
>
> Does such a method exist? Is it possible to ask Cormas to save the
> environment after a certain number
> of runs or time steps?
>
> Thank you in advance for help.
> Joelle Noailly

New Message Reply Date view Thread view Subject view Author view
 

Back to home