How to display subpecies but not the host

20 views
Skip to first unread message

José Fernandes

unread,
Feb 22, 2015, 2:54:01 PM2/22/15
to gama-p...@googlegroups.com
Hello,

I need to display the subspecies agents but not the host agent. How can it be done?

The host is just being used so I can have many sub agents of the same type.

Thanks!

Jose

Benoit Gaudou

unread,
Feb 22, 2015, 6:47:00 PM2/22/15
to gama-p...@googlegroups.com
Hello,

You can try to define an empty aspect for the host species (no draw statement in the aspect such as:
aspect empty {} ), and use this aspect to display the host species.

Cheers 

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.

José Fernandes

unread,
Feb 24, 2015, 12:25:56 PM2/24/15
to gama-p...@googlegroups.com
Hi Benoit!

Thanks, it worked.

Here is the code just for reference

    aspect empty{
        list
<codon> codons <- members of_species codon;
        loop i
from:0 to: length(codons) -1 step:1{
                 draw codons at i
;
       
}    
   
}

Patrick Taillandier

unread,
Feb 25, 2015, 11:04:07 PM2/25/15
to gama-p...@googlegroups.com
Hi,

Just a suggestion for the readability of your code: you can write:
aspect empty{
       
loop cod over: (members of_species codon){
             draw cod;
        
}    
    
}

Cheers,

Patrick

José Fernandes

unread,
Feb 26, 2015, 7:01:33 AM2/26/15
to gama-p...@googlegroups.com
Hi Patrick,

Much better, thanks!

José
Reply all
Reply to author
Forward
0 new messages