Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

RE: Creating non moving agents

New Message Reply Date view Thread view Subject view Author view

Subject: RE: Creating non moving agents
From: Francois Bousquet (f.bousquet@cgiar.org)
Date: Tue May 11 2004 - 04:30:22 CEST

hello

First of all you could use a spatial inteface with only one cell. This is
not necessary for your model but could be useful for visualization ( you can
have point of views on the agents and colors associated to see if they
become rich or poor or anything else).
If your agents are communicating ones you can use the the visualization of
communication and do need to open a spatial inteface.

Anyhow the answer to your question:
add the following method to your model and call it as you used to call
setRandomlyLocatedAgents.

setNotLocatedAgents: className n: aNumber
 | a collec |
 aNumber
  timesRepeat:
   [a := className new.
   a init.
   collec := self perform: ('the' , className name asString , 's') asSymbol.
   collec add: a].

This is something you can add in the CormasModel class if you think you will
reuse it in another model. We may add it to the new version of Cormas.

Cheers
  -----Message d'origine-----
  De : owner-cormas@cirad.fr [mailto:owner-cormas@cirad.fr]De la part de
Pierre-Marcel GORAL
  Envoyé : lundi 10 mai 2004 16:12
  À : cormas@cirad.fr
  Objet : Creating non moving agents

          Hello everybody!

      Here I'm back with my economical model! I think I manage to implement
all the main classes & methods, but I've got one problem that doesn't allow
me to test this beloves first model (LOL).

      It's a very abstract one, so I don't need any Cell, nor my agents to
move. So I didn't deal with these parts of Cormas. But, in order to
initialize my model, I need to create agents, and I used without caution the
"setRandomlyLocatedAgents" in order to achieve these creations, because I
always use this one in my previous models, that were more biological, with
moving entities.

      So I don't know how to create my agents without this method, and it
creates errors, because it calls a "MoveTo" somewhere, and there are no
cells and moving routines in my model!

  It will be very nice of you if you could help me to deal with this error.

  Thanks for all!

  Nothing less to Final Fantasy !

  Pierre-Marcel GORAL

----------------------------------------------------------------------------

--
  Recevez par e-mail des émoticônes pour MSN Messenger. Cliquez-ici

--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.677 / Virus Database: 439 - Release Date: 04/05/04

New Message Reply Date view Thread view Subject view Author view
 

Back to home