Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

Re: Accessing values stored for visualization in the probes protocol

New Message Reply Date view Thread view Subject view Author view

Subject: Re: Accessing values stored for visualization in the probes protocol
From: Pierre Bommel (bommel@cirad.fr)
Date: Wed May 10 2006 - 03:58:16 CEST

Olá Cesar,
The probes' values are stored in the attribute 'data' of CormasModel.
data is a Dictionary organised as following :
The first key represents the name of a class.
The global data are collected at the level of your model. Then, the key
that corresponds to your model is associated to another Dictionary that
stores a list of values for each probe name.
For the individual probes, the first key is for the class name of the
target entity. For each entity class, a dictionary is associated. For
each probe name, It stores a third level dictionary (!) that contains a
collection of values associated to each entity ID.
Example :
Dictionary (
        #ECEC->Dictionary (
                        #plantEnergy->List (3697.23 3812.01 3926.48 ...) the list is
ordered by time steps.
                        #restrainedSize->List (10 10 10 ...)
                        #unrestrainedSize->List (10 17 18 ...) )
        #UnrestrainedForager->Dictionary (
                        #energy->Dictionary (1->OrderedCollection (50 57.4039 62.7375
69.2118 75.1388 ...) the key is for the ID of the instance
                                                        2->OrderedCollection (50 56.5568 63.8645 70.0508 72.4861 ...)
                                                        ...
                                                        20->OrderedCollection (0 0 0 0 0 0 0 0 50 56.945 64.5173) ) )
        #RestrainedForager->Dictionary (
                        #energy->Dictionary (1->OrderedCollection (50 52.8599 55.506 57.4795
60.0251 62.6905 ...)
                                                        ...
                                                          10->OrderedCollection (50 52.6727 55.6326 ...) ) ) )
For the local probes, the energy value at time T is 0 if the agent is
not yet alive or if it is already dead. For example, the
UnrestrainedForager number 20 has been created at t=9.
Até logo Cesar,

        Pierre

Le 9 mai 06, à 17:43, Cesar Rabak a écrit :

> We're working in a model that we wish to show moving averages of
> certain values and it ocurred to me that CORMAS ought to store the
> probes' values for each step.
>
> Is there a way to access this data structure so we don't have to do a
> double storing of values?
>
> TIA
> --
> Cesar Rabak
> GNU/Linux User 52247.
> Get counted: http://counter.li.org/
>
>
        Pierre Bommel - CIRAD - UR Green
        Universidade de Brasília - Centro de Desenvolvimento Sustentável
        SHIS QI 26, Conjunto 15, Casa 18
        71670-150
        Brasília 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