swarm-support
[Top][All Lists]
Advanced

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

Re: EZBin problem in 1.0.0 ?


From: cgl
Subject: Re: EZBin problem in 1.0.0 ?
Date: Tue, 4 Feb 1997 09:20:15 -0700

Rik...

I'm at home using a pre-1.0 version of Swarm, but I think that this is not
a 1.0 problem....

Here is how I interpret the instructions on using an EZGraph to write to a file:

This example is from Mousetraps, which uses an EZGraph...

------------------------------------------------

 // set up the EZGraph object

  triggerGraph = [EZGraph createBegin: [self getZone]];
  [triggerGraph setTitle: "Trigger data vs. time"];
  [triggerGraph setAxisLabelsX: "time" Y: "number triggered"];
  [triggerGraph setFileOutput: 1];
  triggerGraph = [triggerGraph createEnd] ;

  // Now, we create two observations to plot on mousetraps with time:
  //    1) The total number of traps triggered so far
  //    2) The current pending trigger events (number of ping-pong
  //           balls still "in the air")

  [triggerGraph createSequence: "Total.triggered"
                         withFeedFrom: [mousetrapModelSwarm getStats]
                          andSelector: M(getNumTriggered)] ;

  [triggerGraph createSequence: "Pending.triggers"
                         withFeedFrom: [mousetrapModelSwarm getStats]
                          andSelector: M(getNumBalls)] ;


------------------------------------------------------------

This results in two files being created "Total.triggered" and "Pending.triggers"
that will contain the data that was displayed in the Graphic version.

Notice that I setFileOutput: to 1 in the create phase. I'm not sure you
can switch this on and off - I'll do some more tests...

  But this should work for you....

Chris



reply via email to

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