Trouble with dynamic edge weights

Evolution and dynamics on networks in Gephi: UI, data formats, algorithms...
Post Reply
gusveitch
Posts: 2
Joined: 27 Jul 2016 04:43

Trouble with dynamic edge weights

Post by gusveitch » 27 Jul 2016 05:23

I am trying to create a dynamic graph by importing spreadsheets. I have succeeded in making the topology dynamic (nodes and edges turning on/off), but am having trouble using dynamic attributes, especially edge weights. (I'm having problems with dynamic node attributes too, but those can wait).

I believe I have imported the data correctly. A typical entry in the edges CSV looks like this (minus quotemarks):

Source,Target,timeset,Weight,Type
SourceName,TargetName,<[2010-01-01,2010-04-01]>,<[2010-01-01,0.0];[2010-04-01,0.0]>,Undirected

I made the weight column dynamic before importing, and during the import I checked that the timeset and weight columns were assigned the right data types (TimestampSet and TimestampDoubleMap respectively). The edge table in the data laboratory populates successfully.

The trouble starts when I switch to the Overview screen to view the graph. Sometimes Gephi simply freezes at this point, showing nothing except the message "Initializing..." where the graph should be. Other times a graph appears, but the program freezes (sometimes terminally) when I manipulate the timeline or run a layout. Typically, the following error message appears:

Unexpected exception. The weight is dynamic, call getWeight(timestamp) or getWeight(interval) instead.

The same error occurs if I try to export to a GEFX file, the output of which is always missing the list of edges.

If I make the edge weights static, the graph is usually stable, and I can run layouts and use the timeline. But really I want the edge weights to be dynamic. I have successfully created and filtered dynamic edge weights in a very simple made-up graph, but even then the program crashed when I tried to run various layouts including Force Atlas 2.

Am I expecting too much? Is Gephi not able to handle dynamic edge weights properly yet? Or am I doing something wrong? Or do I perhaps need to create my graph as a GEFX file (something I have no experience doing) rather than importing it from spreadsheets?

Thanks for any help you can offer.

User avatar
eduramiba
Gephi Code Manager
Posts: 942
Joined: 22 Mar 2010 15:30
Location: Madrid, Spain

Re: Trouble with dynamic edge weights

Post by eduramiba » 27 Jul 2016 08:45

Hi,
I think this is a bug we need to fix. Please check the workaround here: https://github.com/gephi/gephi/issues/1426

gusveitch
Posts: 2
Joined: 27 Jul 2016 04:43

Re: Trouble with dynamic edge weights

Post by gusveitch » 27 Jul 2016 13:51

The workaround enabled me to open the graph and see the edge weights change as I moved the timeline. But as soon as I tried to run Force Atlas 2, it froze and I got the same error message as before. The error also still occurred when I saved a new GEXF file, and the resulting file still contained no edges. So the workaround seems to fix only part of the problem -- or only one of two different problems, whichever is the case.

I look forward to the bug being fixed, and I welcome any advice about other options or workarounds in the meantime. Thanks!!

henisz
Posts: 5
Joined: 26 Apr 2017 06:43

Re: Trouble with dynamic edge weights

Post by henisz » 03 May 2017 03:19

Is this bug still present? When I try to layout a graph with dynamic edge weights, I get the following error

java.lang.IllegalStateException: The weight is dynamic, call getWeight(timestamp) or getWeight(interval) instead
at org.gephi.graph.impl.EdgeImpl.getWeight(EdgeImpl.java:87)
at org.gephi.layout.plugin.forceAtlas2.ForceAtlas2.goAlgo(ForceAtlas2.java:199)
at org.gephi.layout.LayoutControllerImpl$LayoutRun.run(LayoutControllerImpl.java:184)
[catch] at org.gephi.utils.longtask.api.LongTaskExecutor$RunningLongTask.run(LongTaskExecutor.java:274)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

User avatar
eduramiba
Gephi Code Manager
Posts: 942
Joined: 22 Mar 2010 15:30
Location: Madrid, Spain

Re: Trouble with dynamic edge weights

Post by eduramiba » 03 May 2017 12:28


Post Reply