【问题标题】:How to import adjacency matrix for network in netlogo如何在 netlogo 中为网络导入邻接矩阵
【发布时间】:2016-05-17 07:51:18
【问题描述】:

例如,我有一个邻接矩阵

0 1 0 1 0 1

1 1 1 1 1 0

0 1 1 0 1 1

0 1 1 1 0 1

0 0 0 1 0 1

0 1 0 1 0 1

矩阵是 6x6 矩阵,因为我有 6 个代理。

我想将此矩阵导入netlogo

有人可以帮忙吗?

【问题讨论】:

  • 矩阵是 6x6 矩阵,因为我有 6 个代理

标签: matrix social-networking netlogo adjacency-matrix


【解决方案1】:

您可以使用内置 nw 扩展中的nw:load-matrix

你这样使用它:

nw:load-matrix "/path/to/matrix/file" turtles directed-links

其中directed-links 是有向链接品种(我在这里指定了有向链接,因为从您的邻接矩阵来看,您正在处理有向网络)。

【讨论】:

    猜你喜欢
    • 2010-12-13
    • 1970-01-01
    • 1970-01-01
    • 2021-01-23
    • 2020-02-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多