swarm-support
[Top][All Lists]
Advanced

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

RE: [Swarm-Support] EZGraph


From: Li An
Subject: RE: [Swarm-Support] EZGraph
Date: Tue, 04 Feb 2003 17:10:50 -0500

Dear James,

Your suggestions are pretty helpful-- I successfully graphed those things as you suggested (with minor changes). Thank you very much.

Best regards,

Li


At 04:09 PM 2/4/2003 +0000, you wrote:
Dear Li An,
  I assume you're using the Java collections LinkedList rather than the
Swarm one. In this case the following example code should help you. What you
do is simply create a graph object and tell it to plot the results of
calling the size() method on your LinkedList. If you prefer to use the Swarm
LinkedList replace size() with getCount(). Don't forget to schedule the
step() method on the graph regularly.
  The main thing to remember is you can use an EZGraph to create a sequence
from pretty much any object using pretty much any method.
        James

LinkedList list = new LinkedList();
EZGraphImpl graph = new EZGraphImpl(getZone(), "List size", "Time", "Size",
listSizeGraph");
graph.createSequence$withFeedFrom$andSelector("list size", list, new
Selector(list.getClass(), "size", false));


---
Dr James A R Marshall
Complex Systems Modelling Group (COSMIC)
Department of Earth Science and Engineering
Imperial College London
Tel: +44 (0)20 7594 7493
Fax: +44 (0)20 7594 7444
Container World Project - http://www.ese.ic.ac.uk/research/containerworld/



-----Original Message-----
From: Li An [mailto:address@hidden
Sent: 04 February 2003 15:42
To: address@hidden
Subject: Re: [Swarm-Support] EZGraph


Sounds good. Does EZgraph have a method to graph what I get using
getSizeOfList (y-axis) over time (x-axis)?

At 08:57 AM 2/4/2003 -0600, you wrote:
>In the class where you have the list, write a method
>
>getSizeOfList
>
>and the plot the output of that method.  No need to average it, since it
>is just one thing being plotted.
>
>Li An wrote:
>>Dear Swarm colleagues,
>>I have a dynamically updated list (object of Java class called
>>LinkedList) containing objects (persons), and want to graph the size of
>>the list (rather than get the information (say, age) of individual
>>persons from the list) over time. Any suggestions on how to do this?
>>Thanks in advance.
>>Li
>
>
>--
>Paul E. Johnson                       email: address@hidden
>Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
>1541 Lilac Lane, Rm 504
>University of Kansas                  Office: (785) 864-9086
>Lawrence, Kansas 66044-3177           FAX: (785) 864-5700
>
>_______________________________________________
>Support mailing list
>address@hidden
>http://www.swarm.org/mailman/listinfo/support

Li An
Systems Modeling Lab
Department of Fisheries and Wildlife
Michigan State University
East Lansing, MI 48824
Phone (Work): 517-353-7981
Fax: 517-432-1699
http://www.msu.edu/~anli

_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support
_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support

Li An
Systems Modeling Lab
Department of Fisheries and Wildlife
Michigan State University
East Lansing, MI 48824
Phone (Work): 517-353-7981
Fax: 517-432-1699
http://www.msu.edu/~anli



reply via email to

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