Network extension heap related crash

108 views Asked by At

I have a network with approximately 4000 nodes approximately 50 of which only have a single link. When I run nw:weighted-path and nw:weighted-distance they both work perfectly, but when I try to use nw:mean-weighted-path-distance netlogo hangs (not responding), eventually leading to a heap failure. I've tried to reproduce it using the connect graph example and everything works well. I've doe this with the network extensions bundled with 5.1.0 and 5.2.0 I wonder if anyone else has come across this and if they got around it?

Edit 1 (code added)

I have links called highways and breeds called roads and origins that are all connected by highways

let road-set (turtle-set roads origins) 
nw:set-context road-set highways 
output-show nw:mean-weighted-path-length "my-highway-length"

edit 2 [using Netlogo 5.2] I get a GC overload error, as follows

java.lang.OutOfMemoryError: GC overhead limit exceeded
 at scala.collection.immutable.StreamIterator.<init>(Stream.scala:936)
 at scala.collection.immutable.Stream.iterator(Stream.scala:510)
 at scala.collection.TraversableLike$class.toIterator(TraversableLike.scala:606)
 at scala.collection.immutable.List.toIterator(List.scala:76)
 at scala.collection.TraversableOnce$FlattenOps$$anon$1.hasNext(TraversableOnce.scala:391)
 at scala.collection.Iterator$class.find(Iterator.scala:823)
 at scala.collection.TraversableOnce$FlattenOps$$anon$1.find(TraversableOnce.scala:388)
 at org.nlogo.extensions.nw.algorithms.PathFinder$class.org$nlogo$extensions$nw$algorithms$PathFinder$$expandBestTraversal(PathFinder.scala:64)
 at org.nlogo.extensions.nw.algorithms.PathFinder$$anonfun$distance$1.apply(PathFinder.scala:111)
 at org.nlogo.extensions.nw.algorithms.PathFinder$$anonfun$distance$1.apply(PathFinder.scala:110)
 at scala.Option.orElse(Option.scala:218)
 at org.nlogo.extensions.nw.algorithms.PathFinder$class.distance(PathFinder.scala:110)
 at org.nlogo.extensions.nw.GraphContext.distance(GraphContext.scala:14)
 at org.nlogo.extensions.nw.prim.MeanWeightedPathLength$$anonfun$2.apply(MeanPathLength.scala:32)
 at org.nlogo.extensions.nw.prim.MeanWeightedPathLength$$anonfun$2.apply(MeanPathLength.scala:32)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$$anonfun$meanPathLength$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$2.apply(MeanPathLength.scala:21)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$$anonfun$meanPathLength$1$$anonfun$apply$mcV$sp$1$$anonfun$apply$2.apply(MeanPathLength.scala:19)
 at scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:697)
 at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:130)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:696)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$$anonfun$meanPathLength$1$$anonfun$apply$mcV$sp$1.apply(MeanPathLength.scala:19)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$$anonfun$meanPathLength$1$$anonfun$apply$mcV$sp$1.apply(MeanPathLength.scala:18)
 at scala.collection.immutable.HashSet$HashSet1.foreach(HashSet.scala:130)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at scala.collection.immutable.HashSet$HashTrieSet.foreach(HashSet.scala:275)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$$anonfun$meanPathLength$1.apply$mcV$sp(MeanPathLength.scala:18)
 at scala.util.control.Breaks.breakable(Breaks.scala:39)
 at org.nlogo.extensions.nw.algorithms.MeanPathLength$.meanPathLength(MeanPathLength.scala:16)

NetLogo 5.2.0
main: org.nlogo.app.AppFrame
thread: AWT-EventQueue-0
Java HotSpot(TM) Server VM 1.6.0_45 (Sun Microsystems Inc.; 1.6.0_45-b06)
operating system: Windows 7 6.1 (x86 processor)
Scala version 2.9.2
JOGL: (3D View not initialized)
OpenGL Graphics: (3D View not initialized)
model: GIS Network v9.0 (markov - import-graph)

02:14:23.491 IconifiedEvent (org.nlogo.app.App) AWT-EventQueue-0
02:11:52.249 AddJobEvent (org.nlogo.window.ButtonWidget) AWT-EventQueue-0
02:11:52.155 InputBoxLoseFocusEvent (org.nlogo.window.ButtonWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.app.InterfacePanel$2 (org.nlogo.window.SliderWidget)) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.widget.SwitchWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.window.InputBoxWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.widget.SwitchWidget) AWT-EventQueue-0
02:11:52.124 InterfaceGlobalEvent (org.nlogo.window.ChooserWidget) AWT-EventQueue-0
0

There are 0 answers