Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

problems to locate and visualize an agent in imported map

New Message Reply Date view Thread view Subject view Author view

Subject: problems to locate and visualize an agent in imported map
manuelka@cable.net.co
Date: Wed Feb 02 2005 - 22:56:17 CET

Hello Colleagues
I have problems to locate and visualize an agent into my spatial entity imported from a raster ASC format map. The tutorials only describe how to locate an agent into an “artificial” space create in Cormas, so I need help to located it in a imported map with his attribute “cover”, that I can visualize without problem on the Cormas space before programming the social entity.
I followed the following steps:

1- I create a social situated entity called “colono”

2 -In "instance" in “init” I write super init, in “initId” I write :
initId
self id: (self class CurrentId: self class CurrentId + 1)

3- in “control” I create a “step” with the following information: (following tutorial 1 and 2)

step
"The main method of the colono. It walk randomly; if it arrives on a cell in bosque, it burn it, if it arrives on a cell burn it leave strubble, if it arrives on a strubble cell, it cultivate grass”
self randomWalk.
self bosqueQuema
self quemaToRastrojo.
self rastrojoToPasto.
self perception: 4

and I create the respective methods of bosqueQuema, quemaToRastrojo….. like this:

bosqueQuema
self patch state = #bosque ifTrue: [self patch state: #quema]

4- I create a point of view of the “colono” and I assign a symbol to him.
5 -in the initial instantiation there is an accessing for theColonos and TheCells

6-In control I write:

step: t
self stepSynchronously: t.
self theColonos do: [:fm | fm step].
self updateData: t.

6-Finally in init
init
self initCells.
self initAgents.

initAgents
super initAgents.
"create the population"
self setRandomlyLocatedAgents: Colono n: 50

In the space I assigned povNum for the spatial entity and pov for the social entity. I swiched off cell delimitation. I opened simulation and I selected a method, init or initAgent, and a control, step in this case; and I did not visualize anything. Neither the map and the agents. Where is the problem?

Thank you very much for your help
Syncerely,

Manuela

New Message Reply Date view Thread view Subject view Author view
 

Back to home