agent doesn't move

38 views
Skip to first unread message

Suhad Faisal

unread,
Oct 13, 2014, 10:12:25 AM10/13/14
to gama-p...@googlegroups.com
Hello 

in this model the agent doesn't move, inspite of all spatial data are unified with the same coordination system
NTF Lambert Zone II, but still the projection has un error, however the data manipulation is going well as appear in the console, but I miss something.

I need to find the blemish 

thanks in advance 

Sincerely
Suhad
alias519_TableToExcel.csv
VoronoiVoronoi.dbf
VoronoiVoronoi.shp
VoronoiVoronoi.shx
VoronoiVoronoi.qpj
ProtoType 77.10.gaml
alias519.cpg
alias519.dbf
alias519.prj
alias519.sbn
alias519.sbx
alias519.shp
alias519.shx
VoronoiVoronoi.prj

Benoit Gaudou

unread,
Oct 13, 2014, 10:31:45 AM10/13/14
to gama-p...@googlegroups.com
Hi,

I do not know your case but : 
- in your code, only 1 agent alias is created. I do not know if it is what expected, but if we want to create 1 agent per line, just write : 

global

{

file init_data <- csv_file('../includes/alias519_TableToExcel.csv', ';');

file vorono <- file('../includes/VoronoiVoronoi.shp');

geometry shape <- envelope(vorono);

init

{

create voronoo from: vorono;

create alias from: init_data header: true with: [location::{float(get("pos_x")),float(get("pos_y"))}];

} // init

} // global


- The second point is that all your alias agents are outside of the shape of the world. Just have a look at their coordinates.


Benoit


--
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.

Suhad Faisal

unread,
Oct 13, 2014, 10:44:42 AM10/13/14
to gama-p...@googlegroups.com
Thank you Benoit 

yes you are right I try to draw the trajectory of one agent 

but the strange thing, that all coordintes of my agent belong to the coordinates world 
 (i.e. the alias is moving among 190 points only, which are the whole points of my world).

best regards

cheers
Suhad

Benoit Gaudou

unread,
Oct 13, 2014, 10:47:41 AM10/13/14
to gama-p...@googlegroups.com
Hi, 

The shape of the world is : 
polygon ([{0.0,58049.0,0.0},{56754.0,58049.0,0.0},{56754.0,0.0,0.0},{0.0,0.0,0.0},{0.0,58049.0,0.0}])

whereas the location of a random alias is :
{497600.0,2494510.0,0.0} 
which is definitely out of the shape.

Benoit

Suhad Faisal

unread,
Oct 13, 2014, 11:06:50 AM10/13/14
to gama-p...@googlegroups.com

yes you are right 

bu even when I changed the wolrd with the same coordinates of the same file as below the problem stays as it is , in spite that I unified the world and the agent with the same file, as you can see in the files attached formerly  


global 
{    matrix<int>  init_data <-matrix<int>(csv_file('../includes/alias519_TableToExcel.csv', ';'));
file               vorono    <- file ('../includes/alias519.shp');
        geometry     shape     <-envelope(vorono);
init 
{ create voronoo    from: vorono ;
        create alias  from: init_data header:true
        [location::[int(read('pos_x')),int(read('pos_y'))]]; 
        
       } // init
         } // global


regards 

Suhad

Benoit Gaudou

unread,
Oct 13, 2014, 11:18:04 AM10/13/14
to gama-p...@googlegroups.com
In this second you can also see that the coordinates of the world are : 
polygon ([{0.0,17096.0,0.0},{12542.0,17096.0,0.0},{12542.0,0.0,0.0},{0.0,0.0,0.0},{0.0,17096.0,0.0}])

and thus agents created from the csv file are outside of this shape ... 

Benoit

Suhad Faisal

unread,
Oct 13, 2014, 11:22:50 AM10/13/14
to gama-p...@googlegroups.com
Thank you very much 

cheers
suhad

--
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/V41J1feBKCk/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