全球FlexSim系统仿真中文论坛

搜索
查看: 8256|回复: 4
打印 上一主题 下一主题

一个flexsim树结构的小技巧

[复制链接]
跳转到指定楼层
1#
domcylai 发表于 2012-9-10 20:58:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
给大家分享一个小经验,算是自己学习的一个心得吧。* r7 w  J: }8 {" m4 s. |
2 _" r( u  a7 h
大家使用flexsim做对象指代,特别是在树中查找对象的时候有很多方法,现在我教大家一个:如图( }  @6 q1 O8 c: U9 G% r/ T* l
; ~# V- @1 @/ c5 H+ e1 E! `  Y
当看到一些节点,这些节点只有一串数值,且后面还注释这一串地址,那么我告诉大家其实这串数值就是地址所指向的节点的引用。那么我们可以使用tonode()函数来返回该节点,还能使用up()函数返回该节点上级的节点,还能使用ownerobject()函数返回该实体。" W+ O# G; D& w, R  g
4 L0 T7 @1 p0 {3 y0 N6 }
这么做的话,大大提高了建模速度。! i% U! u6 E7 t, U; m  Q
tonode() :   Assert type as a node pointer.' A+ N5 q2 v) ~% n- z) d1 i  F- r  p
up():    This command returns the node in the tree that contains thenode.
+ s# }+ ^  \2 N. ]  l9 uownerobject(): This command returns the node with object data attached to it that is the start of the sub-tree that thenode is in. In other words, it returns the object node that contains thenode. 4 Z, X& |& w- T" }* `% k5 g
/ Q5 ~3 ^9 R8 W- s
tonode() :   Assert type as a node pointer.# l- |4 i4 z0 ?" Q( P) B
up():    This command returns the node in the tree that contains thenode.
% F" H+ q* i3 E" ~* Nownerobject(): This command returns the node with object data attached to it that is the start of the sub-tree that thenode is in. In other words, it returns the object node that contains thenode.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
2#
CraneJan 发表于 2012-9-10 21:02:12 | 只看该作者
学习,呵呵
3#
雨花台 发表于 2012-9-10 21:05:26 | 只看该作者
MARK 下
4#
huangwei 发表于 2012-12-11 19:49:22 | 只看该作者
初学,学习
5#
a3348215 发表于 2013-4-4 09:39:50 | 只看该作者
学习一下!
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|全球FlexSim系统仿真中文论坛 ( 京ICP备14043114号-2 )

GMT+8, 2025-9-19 08:19 , Processed in 0.085916 second(s), 16 queries .

Powered by Discuz! X3.3© 2001-2013 Comsenz Inc.

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