swarm.analysis
Interface EZGraph

All Known Implementing Classes:
EZGraphImpl

public interface EZGraph
extends SwarmObjectS, SwarmObject, GUICompositeS, GUIComposite

A class for easily create graphs.. This class allows the user to easily create graphs of various quantities in the model s/he is investigating. The user first creates the EZGraph, and then creates "Sequences"; (lines) which will appear in the graph. The sequences are generated based on data provided by a single object or a collection of target objects, in reponse to a specified selector. One of the features of the EZGraph is that it will automatically generate average, total, min, max and count sequences without the user having to mess with Averagers amd other low-level classes.


Method Summary
 EZAverageSequence createAverageSequence$withFeedFrom$andSelector(String aName, Object aCollection, Selector aSel)
          The createAverageSequence method takes a collection of objects and generates a sequence based on the average over the responses of the entire object set (as opposed to a single object as in createSequence) The method returns an id which can be used later with -dropSequence.
 EZAverageSequence createCountSequence$withFeedFrom$andSelector(String aName, Object aCollection, Selector aSel)
          The createCountSequence method takes a collection of objects and generates a sequence based on the count over the responses of the entire object set (as opposed to a single object as in createSequence) The method returns an id which can be used later with -dropSequence.
 EZAverageSequence createMaxSequence$withFeedFrom$andSelector(String aName, Object aCollection, Selector aSel)
          The createMaxSequence method takes a collection of objects and generates a sequence based on the maximums over the responses of the entire object set (as opposed to a single object as in createSequence) The method returns an id which can be used later with -dropSequence.
 EZAverageSequence createMinSequence$withFeedFrom$andSelector(String aName, Object aCollection, Selector aSel)
          The createMinSequence method takes a collection of objects and generates a sequence based on the minimum over the responses of the entire object set (as opposed to a single object as in createSequence) The method returns an id which can be used later with -dropSequence.
 EZSequence createSequence$withFeedFrom$andSelector(String aName, Object anObj, Selector aSel)
          The createSequence method creates a sequence in the EZGraph based on the return value provided by the object anObj when sent the selector aSel.
 EZAverageSequence createTotalSequence$withFeedFrom$andSelector(String aName, Object aCollection, Selector aSel)
          The createTotalSequence method takes a collection of objects and generates a sequence based on the sum over the responses of the entire object set (as opposed to a single object as in createSequence) The method returns an id which can be used later with -dropSequence.
 Object dropSequence(Object aSeq)
          The dropSequence method drops a data sequence (line on the graph), e.g.
 String getFileName()
          Return the file name prefix string.
 String getTitle()
          Return the title string.
 Object outputGraph()
          the outputGraph method updates the graph with the data obtained from the last call to -update.
 Object outputToFile()
          the outputToFile method sends to the disk file data obtained from the last call to -update.
 Object setRangesXMin$Max(double xmin, double xmax)
          Fix the range of X values on the graph between some range.
 Object setRangesYMin$Max(double ymin, double ymax)
          Fix the range of Y values on the graph between some range.
 Object setScaleModeX$Y(boolean xs, boolean ys)
          Whether to autoscale every timestep or instead to jump scale.
 Object step()
          The step method combines -update, -outputGraph and -outputToFile.
 Object update()
          the -update method causes the underlying sequences to get the next set of data values.
 
Methods inherited from interface swarm.objectbase.SwarmObject
getCompleteProbeMap, getProbeForMessage, getProbeForVariable, getProbeMap
 
Methods inherited from interface swarm.simtoolsgui.GUIComposite
disableDestroyNotification, enableDestroyNotification$notificationMethod
 
Methods inherited from interface swarm.defobj.Drop
drop
 
Methods inherited from interface swarm.defobj.DefinedObject
compare, describe, describeID, getDisplayName, getTypeName, getZone, perform, perform$with, perform$with$with, perform$with$with$with, respondsTo, setDisplayName, xfprint, xfprintid, xprint, xprintid
 

Method Detail

setRangesXMin$Max

public Object setRangesXMin$Max(double xmin,
                                double xmax)
Fix the range of X values on the graph between some range.

setRangesYMin$Max

public Object setRangesYMin$Max(double ymin,
                                double ymax)
Fix the range of Y values on the graph between some range.

setScaleModeX$Y

public Object setScaleModeX$Y(boolean xs,
                              boolean ys)
Whether to autoscale every timestep or instead to jump scale.

createSequence$withFeedFrom$andSelector

public EZSequence createSequence$withFeedFrom$andSelector(String aName,
                                                          Object anObj,
                                                          Selector aSel)
The createSequence method creates a sequence in the EZGraph based on the return value provided by the object anObj when sent the selector aSel. If file I/O is enabled, then the data will be sent to a file with the name aName, otherwise the aName argument is simply used as the legend for the graph element generated by EZGraph. The method returns an id which can be used later with -dropSequence.

createAverageSequence$withFeedFrom$andSelector

public EZAverageSequence createAverageSequence$withFeedFrom$andSelector(String aName,
                                                                        Object aCollection,
                                                                        Selector aSel)
The createAverageSequence method takes a collection of objects and generates a sequence based on the average over the responses of the entire object set (as opposed to a single object as in createSequence) The method returns an id which can be used later with -dropSequence.

createTotalSequence$withFeedFrom$andSelector

public EZAverageSequence createTotalSequence$withFeedFrom$andSelector(String aName,
                                                                      Object aCollection,
                                                                      Selector aSel)
The createTotalSequence method takes a collection of objects and generates a sequence based on the sum over the responses of the entire object set (as opposed to a single object as in createSequence) The method returns an id which can be used later with -dropSequence.

createMinSequence$withFeedFrom$andSelector

public EZAverageSequence createMinSequence$withFeedFrom$andSelector(String aName,
                                                                    Object aCollection,
                                                                    Selector aSel)
The createMinSequence method takes a collection of objects and generates a sequence based on the minimum over the responses of the entire object set (as opposed to a single object as in createSequence) The method returns an id which can be used later with -dropSequence.

createMaxSequence$withFeedFrom$andSelector

public EZAverageSequence createMaxSequence$withFeedFrom$andSelector(String aName,
                                                                    Object aCollection,
                                                                    Selector aSel)
The createMaxSequence method takes a collection of objects and generates a sequence based on the maximums over the responses of the entire object set (as opposed to a single object as in createSequence) The method returns an id which can be used later with -dropSequence.

createCountSequence$withFeedFrom$andSelector

public EZAverageSequence createCountSequence$withFeedFrom$andSelector(String aName,
                                                                      Object aCollection,
                                                                      Selector aSel)
The createCountSequence method takes a collection of objects and generates a sequence based on the count over the responses of the entire object set (as opposed to a single object as in createSequence) The method returns an id which can be used later with -dropSequence.

dropSequence

public Object dropSequence(Object aSeq)
The dropSequence method drops a data sequence (line on the graph), e.g. because the source object no longer exists. The aSeq parameter should be an id previously returned by one of the createSequence: methods. If the drop is successful, the method returns aSeq, otherwise it returns nil.

getTitle

public String getTitle()
Return the title string.

getFileName

public String getFileName()
Return the file name prefix string.

update

public Object update()
the -update method causes the underlying sequences to get the next set of data values. If a sequence has a single object attached rather than an Averager, nothing is done.

outputGraph

public Object outputGraph()
the outputGraph method updates the graph with the data obtained from the last call to -update. If setGraphics==0, nothing is done.

outputToFile

public Object outputToFile()
the outputToFile method sends to the disk file data obtained from the last call to -update. If setFileOutput==0, nothing is done.

step

public Object step()
The step method combines -update, -outputGraph and -outputToFile. If you want file output to occur at a different frequency than graph updates, schedule those methods separately instead of using -step.