Subject: RE : Space parameters...
From: BELEM Mahamadou (mabelem2003@yahoo.fr)
Date: Tue Jul 11 2006 - 15:47:00 CEST
In cormas, I'll like to set the properties of the space (number of rows and columns) dynamically according to parameters given by a user through an interface. Please, can you tell me how I can modify these properties (by default, it is 10*10 )?
self spaceModel
line: userLineParam
column: userColParam
shape: #squared
nbNeighbours: #four
boundaries: #closed
delimiter: true.
self spaceModel createCells.
self spaceModel prepareAndRefreshView.
You can insert the code in init method of your model.
On the other hand, I'll like to set the movements of different agents in my system according to the distance between them in each patch and betwwen patches. I can use the Pythagore theorem but I need to know how to access the coordonates of each agent in the space
To get the agent coordontes, you can do:
col:= agent patch numCol.
line := gent patch numLine.
or
agent patch lineCol.
This last method returns an array. The firts item corresponds to "line" and the second the colum number.
Best regards
Etienne Kouokam <kouokam@yahoo.com> a écrit : Hi all!
Etienne KOUOKAM
Laboratoire MAT (Modélisation et Applications thématiques)
Université de Yaoundé I
Département d'Informatique
B.P 8265 Yaoundé CAMEROUN
Tél. (+237) 505 24 01 / (+237) 200 09 16
************************************************************************
BELEM Mahamadou
Doctorant en Informatique
Institut de Recherche Pour le Dévloppement (IRD-Montpellier)
ENGREF 648, rue Jean-François Breton
BP 44494 - 34093 Montpellier Cedex 5 FRANCE
Cel: (33) 06 33 91 49 27
************************************************************************
"La différence entre la théorie et la pratique, c'est qu'en théorie
il n'y a pas de différence entre la théorie et la pratique, mais
qu'en pratique, il y en a une (Jan Van de Sneptscheut)"
************************************************************************
---------------------------------
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.