设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6082|回复: 2

[求助] 求助高手解决一个link的问题

[复制链接]
发表于 2009-7-29 12:49:54 | 显示全部楼层 |阅读模式
哪位高手指点一下4 D1 R) f% j; [3 x2 t; n
在小于某一距离值 而create-links-with 产生的links中,在程序运行下一个tick中如何去除已经产生的但距离又大于上述某一距离值的links,同时保留符合条件的其他links。补充一句,个体是随机运动的。
 楼主| 发表于 2009-8-6 16:41:54 | 显示全部楼层
怎么没有人帮忙解决一下啊
发表于 2009-9-10 15:35:03 | 显示全部楼层
这里,我假设node3和turtle j之间的距离大于值dummy,我就让node3和turtle j之间的距离为值dummy
& @  m5 x+ ^5 ]0 ~$ R2 i' Y1 \# @if dummy < (item j [distance-from-other-turtles] of node3)" `- K/ T+ l+ _0 Y, S1 X
        [
" c8 Z; n+ M/ s* u: P& |4 o          ask node3 [
8 @7 x2 D: B4 a, }7 o; a8 x6 [            set distance-from-other-turtles replace-item j distance-from-other-turtles dummy
% m1 U+ S" F1 C; ~8 S                    ]7 h# p* u) K( o* W4 O/ W% r8 U
        ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2026-7-5 07:40 , Processed in 0.014732 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表