网络扩展堆相关崩溃

时间:2015-06-11 04:27:12

标签: netlogo

我有一个大约有4000个节点的网络,其中大约50个节点只有一个链接。当我运行nw:weighted-path和nw:weighted-distance时它们都能很好地工作,但是当我尝试使用nw时:mean-weighted-path-distance netlogo挂起(没有响应),最终导致堆失败。我尝试使用连接图示例重现它,一切运行良好。我已经使用与5.1.0和5.2.0捆绑在一起的网络扩展来实现这一点 我想知道是否有其他人遇到过这个以及他们是否能够解决这个问题?

编辑1(已添加代码)

我有称为公路和品种的链接,称为道路和起源,均由高速公路连接

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

编辑2 [使用Netlogo 5.2]我收到GC过载错误,如下所示

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 个答案:

没有答案