random starting poi

16 views
Skip to first unread message

Suhad Faisal

unread,
Sep 19, 2014, 10:02:19 AM9/19/14
to
Hello 

I have a problem in my model that is 

each time the starting point of my agent is drawn randomly,  even when I made several trials to initiate it, so any help or comment please ! 

the model is attached with related files 


thanks in advance 

cheers
suhad

ProtoType19.9.gaml
alias2191258andjour4.csv
VoronoiVoronoi.shp

Alexis Drogoul

unread,
Sep 19, 2014, 11:38:21 PM9/19/14
to gama-p...@googlegroups.com
If you read the documentation, you will find out that all agents have an attribute called « location ». This is the one to initialize if you want to set the position of agents in the environment. The one of the only instance of aliasrep you create is *never* initialized.

More generally, in your case, you seem to mix a number of different things when creating your « tower » agents, for example. Why do you have posxtower, posytower as a global attribute ? Why do you initialize the « global » location rather than the location of these agents ? Why do you have so many useless attributes in your species, which are never used nor initialized ?

My guess, by reading your code, is that you still dont have understood the difference between the « global agent » (the « world ») and the other agents (instances of species) — and that you probably dont try too hard to read the documentation: for instance, if your « towers » are present in a shapefile, and if you create agents from them, their shape *and* location will be correctly initialized without further effort, so you dont need all this stuff (posxtower, posy tower, whatever).

Have you tried to follow the different tutorials ? That would help.

Alexis



Le 19 sept. 2014 à 21:02, Suhad Faisal <suha...@gmail.com> a écrit :

> Hello
>
> I have a problem in my model that is
>
> each time the starting point od my agent is drawn randomly, even when I made several trials to initiate it, so any help or comment please !
>
> the model is attached with related files
>
>
> thanks in advance
>
> cheers
> suhad
>
>
> --
> You received this message because you are subscribed to the Google Groups "GAMA" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to gama-platfor...@googlegroups.com.
> To post to this group, send email to gama-p...@googlegroups.com.
> Visit this group at http://groups.google.com/group/gama-platform.
> For more options, visit https://groups.google.com/d/optout.
> <ProtoType19.9.gaml><alias2191258andjour4.csv><VoronoiVoronoi.shp>

--
Senior Researcher, UMI UMMISCO 209, IRD & UPMC, France.
Invited Researcher, DREAM, Can Tho University, Viet Nam.
--
alexis....@gmail.com | http://tiny.cc/liqemw
[Vietnam] +84915088155 [France] +33608698845
--
GAMA: https://code.google.com/p/gama-platform/

Suhad Faisal

unread,
Sep 20, 2014, 5:43:27 AM9/20/14
to gama-p...@googlegroups.com
thank you Alexis for your reply and comments 

but indeed I defined these attributes for future extention in the development of my model, its not for the instant stage, and about the initialization I have several trials as a scratch code , I can't send all of them avoiding wasting others time. 



thank you  for reply and comments 

cheers 
suhad


On Sat, Sep 20, 2014 at 5:38 AM, Alexis Drogoul <alexis....@gmail.com> wrote:
If you read the documentation, you will find out that all agents have an attribute called << location >>. This is the one to initialize if you want to set the position of agents in the environment. The one of the only instance of aliasrep you create is *never* initialized.

More generally, in your case, you seem to mix a number of different things when creating your << tower >> agents, for example. Why do you have posxtower, posytower as a global attribute ? Why do you initialize the << global >> location rather than the location of these agents ? Why do you have so many useless attributes in your species, which are never used nor initialized ?

My guess, by reading your code, is that you still dont have understood the difference between the << global agent >> (the << world >>) and the other agents (instances of species) -- and that you probably dont try too hard to read the documentation: for instance, if your << towers >> are present in a shapefile, and if you create agents from them, their shape *and* location will be correctly initialized without further effort, so you dont need all this stuff (posxtower, posy tower, whatever).

--
You received this message because you are subscribed to a topic in the Google Groups "GAMA" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gama-platform/bYmLeAoaZ3c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gama-platfor...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages