How to create animation to track a dynamic social network?

9 views
Skip to first unread message

licht

unread,
Jul 15, 2009, 6:40:24 PM7/15/09
to guess-discuss
First of all, I admit that I've read the instruction for "States and
Animations" :) But I still have a problem I cannot figure it out from
the manual. Basically, this is what I want and where my problem is.

I want to track communication activities of a group of people. Both
participants and activities change over time. So, I generated a series
of GDF files. Each file keeps a record of the social network at a
specific time. Now, I want to create a movie by showing the changing
social networks. I thought I could use "ss" and "ls" commands to do
this based on what the manual said.

Then, I met the following problem. After I use "ss" command to save
the graph from the first GDF file in the series, I cannot load the 2nd
GDF file. GUESS complains that some variables with the same name
already defined in the name space. Actually they do since some of the
same nodes will be loaded from the 2nd GDF file. So, how to solve this
problem? Or do I have some misunderstanding of how to use "States and
Animations" and there is a nice way to do this?

Thanks!

Gutemberg Vieira

unread,
Jul 16, 2009, 8:16:27 AM7/16/09
to guess-...@googlegroups.com
Hi,

I think you will be happier using the latest test version, it won't complain anymore. You can get it from http://graphexploration.cond.org/guess.zip

--
Gutemberg

licht

unread,
Jul 16, 2009, 4:05:59 PM7/16/09
to guess-discuss
Thanks, Gutemberg.

But it shows another problem. It seems to me that GUESS "remembers"
previously loaded graph. That is, if I first load a gdf and save it to
"state1"; then I load a 2nd gdf, the resulted graph is a joint graph
from previous one "state1" and this one. Say, in the 1st gdf, there is
an edge (v1->v2). But in the 2nd one, there is no edge between v1 and
v2 at all. However, in GUESS, when I load the 2nd gdf after the 1st
one, the edge (v1->v2) is still shown. But whenever I load a gdf, I
only want a graph as defined by the currently loaded gdf and I don't
want an "overlayed" graph. Any idea about this?

Thanks for your help!

On Jul 16, 5:16 am, Gutemberg Vieira <gutemberg.vie...@gmail.com>
wrote:
> Hi,
>
> I think you will be happier using the latest test version, it won't complain
> anymore. You can get it fromhttp://graphexploration.cond.org/guess.zip
> > Thanks!- Hide quoted text -
>
> - Show quoted text -

Eytan Adar

unread,
Jul 16, 2009, 4:20:24 PM7/16/09
to guess-...@googlegroups.com
you can remove all the nodes/edges before loading the new state... the
GDF load is additive (loads on top of what's there). _However_
removed nodes/edges are remembered, so as long as you call them the
same thing GUESS will "undelete" the correct nodes/edges when you load
the new GDF.

So again: load up the first GDF, save state, remove everything, load
second GDF, save state, etc.
when you're done: you can now morph/load states

-E

licht

unread,
Jul 16, 2009, 9:38:19 PM7/16/09
to guess-discuss
Eytan, thank you, a great tool!

I will try what you said later. But here's a quick question. What is
the best way to remove everything from currently loaded GDF?

Thanks!

On Jul 16, 1:20 pm, Eytan Adar <eytana...@gmail.com> wrote:
> you can remove all the nodes/edges before loading the new state... the
> GDF load is additive (loads on top of what's there).  _However_
> removed nodes/edges are remembered, so as long as you call them the
> same thing GUESS will "undelete" the correct nodes/edges when you load
> the new GDF.
>
> So again:  load up the first GDF, save state, remove everything, load
> second GDF, save state, etc.
> when you're done: you can now morph/load states
>
> -E
>

Eytan Adar

unread,
Jul 17, 2009, 12:58:54 AM7/17/09
to guess-...@googlegroups.com
remove(g.nodes)

licht

unread,
Jul 17, 2009, 2:08:27 AM7/17/09
to guess-discuss
Exception was thrown when a call to morph() is made. Please help me
check what was wrong. Thanks!

I have the following 2 small GDF files.

"state1.gdf"
nodedef>name,color
v1,red
v2,green
v3,blue
v4,yellow

edgedef>node1,node2,directed
v1,v2,true
v1,v3,true
v1,v4,true

"state2.gdf"
nodedef>name,color
v1,red
v2,green
v3,blue
v4,yellow

edgedef>node1,node2,directed
v1,v2,true
v1,v3,true
v2,v4,true

So, you can see if we move from State1 to State2, the edge (v1->v4) is
dropped and a new edge (v2->v4) is added.

Here's what I did in guess.

- load state1.gdf when starting GUESS
- ss("s1")
- remove(g.nodes)
- import state2.gdf
- ss("s2")
- remove(g.nodes)
- startMovie(20, "a.mov")
- ls("s1")
- morph("s2", 5000)
-------HERE an exception was thrown as follows:
Traceback (innermost last):
File "<string>", line 1, in ?
File "<iostream>", line 383, in morph
edu.uci.ics.jung.exceptions.ConstraintViolationException: Predicate
org.apache.commons.collections.functors.NotPredicate rejected v1->v2:
org.apache.commons.collections.functors.NotPredicate@13f85de

at edu.uci.ics.jung.graph.impl.AbstractArchetypeGraph.checkConstraints
(AbstractArchetypeGraph.java:305)
at edu.uci.ics.jung.graph.impl.AbstractSparseGraph.addEdge
(AbstractSparseGraph.java:118)
at com.hp.hpl.guess.Graph.addEdgeNoCheck(Graph.java:289)
at com.hp.hpl.guess.Graph.addEdge(Graph.java:251)
at com.hp.hpl.guess.piccolo.Morpher.morph(Morpher.java:116)
at com.hp.hpl.guess.piccolo.Morpher.morph(Morpher.java:39)
at com.hp.hpl.guess.Graph.morph(Graph.java:2112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.python.core.PyReflectedFunction.__call__
(PyReflectedFunction.java:160)
at org.python.core.PyMethod.__call__(PyMethod.java:96)
at org.python.core.PyObject.__call__(PyObject.java:287)
at org.python.core.PyInstance.invoke(PyInstance.java:317)
at org.python.pycode._pyx16.morph$86(<iostream>:383)
at org.python.pycode._pyx16.call_function(<iostream>)
at org.python.core.PyTableCode.call(PyTableCode.java:209)
at org.python.core.PyTableCode.call(PyTableCode.java:280)
at org.python.core.PyFunction.__call__(PyFunction.java:176)
at org.python.pycode._pyx157.f$0(<string>:1)
at org.python.pycode._pyx157.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java:209)
at org.python.core.PyCode.call(PyCode.java:14)
at org.python.core.Py.runCode(Py.java:1136)
at org.python.core.__builtin__.eval(__builtin__.java:270)
at org.python.core.__builtin__.eval(__builtin__.java:274)
at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:127)
at com.hp.hpl.guess.RealInterpreter.eval(RealInterpreter.java:90)
at com.hp.hpl.guess.ui.TextPaneJythonConsole$InternalTextPane
$ConsoleDocument.insertString(TextPaneJythonConsole.java:1659)
at javax.swing.text.AbstractDocument.replace(Unknown Source)
at javax.swing.JTextPane.replaceSelection(Unknown Source)
at javax.swing.JTextPane.replaceSelection(Unknown Source)
at javax.swing.text.StyledEditorKit
$StyledInsertBreakAction.actionPerformed(Unknown Source)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown
Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown
Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown
Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

edu.uci.ics.jung.exceptions.ConstraintViolationException:
edu.uci.ics.jung.exceptions.ConstraintViolationException: Predicate
org.apache.commons.collections.functors.NotPredicate rejected v1->v2:
org.apache.commons.collections.functors.NotPredicate@13f85de

at org.python.core.Py.JavaError(Py.java:325)
at org.python.core.Py.JavaError(Py.java:312)
at org.python.core.PyReflectedFunction.__call__
(PyReflectedFunction.java:163)
at org.python.core.PyMethod.__call__(PyMethod.java:96)
at org.python.core.PyObject.__call__(PyObject.java:287)
at org.python.core.PyInstance.invoke(PyInstance.java:317)
at org.python.pycode._pyx16.morph$86(<iostream>:383)
at org.python.pycode._pyx16.call_function(<iostream>)
at org.python.core.PyTableCode.call(PyTableCode.java:209)
at org.python.core.PyTableCode.call(PyTableCode.java:280)
at org.python.core.PyFunction.__call__(PyFunction.java:176)
at org.python.pycode._pyx157.f$0(<string>:1)
at org.python.pycode._pyx157.call_function(<string>)
at org.python.core.PyTableCode.call(PyTableCode.java:209)
at org.python.core.PyCode.call(PyCode.java:14)
at org.python.core.Py.runCode(Py.java:1136)
at org.python.core.__builtin__.eval(__builtin__.java:270)
at org.python.core.__builtin__.eval(__builtin__.java:274)
at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:127)
at com.hp.hpl.guess.RealInterpreter.eval(RealInterpreter.java:90)
at com.hp.hpl.guess.ui.TextPaneJythonConsole$InternalTextPane
$ConsoleDocument.insertString(TextPaneJythonConsole.java:1659)
at javax.swing.text.AbstractDocument.replace(Unknown Source)
at javax.swing.JTextPane.replaceSelection(Unknown Source)
at javax.swing.JTextPane.replaceSelection(Unknown Source)
at javax.swing.text.StyledEditorKit
$StyledInsertBreakAction.actionPerformed(Unknown Source)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown
Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown
Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown
Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


GUESS version: 1.0.4beta/20090601-1016

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

However, if I remove all edges in state2.gdf so that only nodes are
left, then repeat the above sequence, morph() will success and the
movie will record the fadeout of 3 edges.

Thanks!


On Jul 16, 9:58 pm, Eytan Adar <eytana...@gmail.com> wrote:
> remove(g.nodes)
>

Gutemberg Vieira

unread,
Jul 17, 2009, 9:55:14 AM7/17/09
to guess-...@googlegroups.com
Hi,
 
Trying to reproduce your example I noticed that, in my case, after removing nodes from state1.gdf and loading state2.gdf, the node v1 and its edges are not created. Did this happen with you?
 
--
Gutemberg

Eytan Adar

unread,
Jul 17, 2009, 11:35:33 AM7/17/09
to guess-...@googlegroups.com
hmmm... probably a bug, but you can try running guess with the -m
command line option (allowing multiple edges).

-E

licht

unread,
Jul 20, 2009, 12:45:08 AM7/20/09
to guess-discuss
No, that didn't happen to me. Both gdfs loaded and correct graphs were
shown.

On Jul 17, 6:55 am, Gutemberg Vieira <gutemberg.vie...@gmail.com>
wrote:
> Hi,
>
> Trying to reproduce your example I noticed that, in my case, after removing
> nodes from state1.gdf and loading state2.gdf, the node v1 and its edges are
> not created. Did this happen with you?
>
> --
> Gutemberg
>
> ...
>
> read more »

licht

unread,
Jul 20, 2009, 12:46:45 AM7/20/09
to guess-discuss
Now it's working with -m argument and the movie can be created
correctly.

Thanks!


On Jul 17, 8:35 am, Eytan Adar <eytana...@gmail.com> wrote:
> hmmm... probably a bug, but you can try running guess with the -m
> command line option (allowing multiple edges).
>
> -E
>
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages