swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with Averager...?


From: SCHREIBER,DARREN MATTHEW
Subject: Help with Averager...?
Date: Mon, 31 Jul 2000 16:06:21 -0700 (PDT)

I am creating a tool to generate text output from a single run of my
housing model.  When I run this method at the end of the run, it gives me
a sensible value for the utility, but zeros for the housing cost and the
frequency of movement variables.  I use EZGraph with similar commands and
the values with that appear correct.

My guess is that I may not be able to setProbedSelector again once the
averagingTool is created.  But, I have been able to successfuly change the
setCollection after creation... so that would seem incompatible with my
best guess about what's wrong.

Here's the most pertinent code, thanks for your aid:

  averagingTool = [Averager createBegin: [self getZone]];
  [averagingTool setCollection: agentList];
  [averagingTool setProbedSelector: M(getUtility)];
  averagingTool = [averagingTool createEnd];

  [averagingTool update];
  printf("%2.3f,", [averagingTool getAverage]); // avUtilAll

  [averagingTool setCollection: agentList];
  [averagingTool setProbedSelector: M(getHousingCost)];
  [averagingTool update];
  printf("%2.3f,", [averagingTool getAverage]); // housCostAll
  
  [averagingTool setProbedSelector: M(getIMoved)];
  [averagingTool update];
  printf("%2.3f,", [averagingTool getAverage]); // freqMoveAll




                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]