MASON-INTEREST-L Archives

August 2006

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Alessandro Perrone <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Tue, 29 Aug 2006 09:57:45 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
Hi Gabriel and all
  Thank a lot for the hints. I'll try to program the starting graphs 
once I come back home from work.
I'll keep this list informed of my progresses.
Regards.
					ALE
>As for mean happiness, all it takes is a method in HeatBugs
>
>public double getMeanHappiness(){
>//go voer all bugs and compute the avg
>}
>
>then HeatbugsWithUI will have this new metric in the model tab. Presso n
>the magnifying glass button near it, and you're in business.
>
>If you don't want to change HeatBugs, extend it:
>public class MyHeatBugs extends Heatbugs
>{
>//offer the constructors Heatbugs was offering
>//add public double getMeanHappiness()
>//(assuming you hav access to HeatBug[] bugs, which is package protected
>//so you should have MyHeatBugs in sim.app.heatbugs )
>}
>
>You also need a different main() function
>
>     public static void main(String[] args)
>         {
>         HeatBugsWithUI heatbugs = new HeatBugsWithUI(new
>MyHeatBugs(System.currentTimeMillis()));
>         Console c = new Console(heatbugs);
>         c.setVisible(true);
>         }
>
>Of course, this would be enough if our bugs had anything to
>resemble [un]happiness. So before you can have a happiness graph, you
>kinda need to define/implement it at the bug level.
>

-- 
----
Questa e-mail ed i suoi eventuali allegati contengono informazioni
riservate o confidenziali. Se avete ricevuto questa comunicazione per
errore, siete pregati di non utilizzarne il contenuto e di non
portarlo a conoscenza di alcuno. Grazie per la collaborazione.
This message is intended only for the use of the individual or entity
to which it is addressed, and may contain confidential information.
If you received this in error, please contact the sender and delete
the material from all computers.

ATOM RSS1 RSS2