设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8109|回复: 9

[求助] 用AGV模板发生了以下错误,请解!

  [复制链接]
发表于 2011-11-5 16:38:28 | 显示全部楼层 |阅读模式
问题在哪里?

本帖子中包含更多资源

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

x
 楼主| 发表于 2011-11-14 10:37:54 | 显示全部楼层
没有解决,再顶一下。
 楼主| 发表于 2011-11-17 11:03:27 | 显示全部楼层
/* called by:        entrance ctrl of the object 'track'
* r) v/ G' s# S0 Y: ~; K) G8 c*/  K+ A- D* H; v- P
is; N( ]$ o' o/ K) d4 u1 A1 L1 A
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 w  L! N* Q; l+ C) m' sdo
- d& ?- ^. ?: d: C+ B        Lan := rootfolder.Internal.Tools.AOLlanguage;, }- x, z5 `5 Q3 }
        if current = @.Destination -- else return' x& c3 G9 J# Z* O: X+ R0 G
        then2 Q. [# |2 w5 }1 Z$ h
                @.Destination := void;+ m: `1 O3 t' h9 d( J' {; L2 I
                if @.occupied then1 y; ]0 O7 c5 Y( I
                        part := @.cont;' B* w: j1 S% T, S# k3 y4 `
                        @.transpOrder := void;
1 h9 v- F: {+ S) Y+ x" m- [+ o, D1 o                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 {$ E# h2 W" J) z* h; k                                @,root.eventcontroller.simTime);( ^" F7 n* k! E# Z) [# h4 V
                        @.HasOrder := false;9 f$ x( ?! E1 e0 g+ c! B8 H6 j( H6 D
                        @.DrivingHome := true;0 G7 Q9 H# y1 k, y' M1 L. n
                        rgManager.tryToStartTransOrder;+ ]* D/ m4 b9 Q
                        if @.Destination = void
$ U  D9 ]4 X- u( r0 j" h7 A6 x6 U                        then -- no transport order for vehicle @' m3 @. A; S: A1 \+ l7 j
                                @.Destination :=+ o4 ]- f: m' l$ n( p2 P- e
                                rgManager.nearestFreeStation(@,track.~);% |5 b; O! ]7 R$ [+ K8 Y/ E. ]
                                newDirection(@);   8 q: g8 a! o+ o- Q/ n, P
                                if @.Destination /= void then
5 H" w. [# K2 U                                        @.Destination.NumReservation :=7 x) m; ~+ N  _9 J* f" e. X
                                        @.Destination.NumReservation + 1;
( V/ n" n% R, e0 P. W9 Q; \                                end;
6 E' G. A- `7 u* d: N                                @.CurrIcon := "drivingHome";/ E0 y# _! [- E
                                @.DrivingHome := true;
3 G' M0 B4 _+ ]9 B4 e$ I$ s2 I+ Y# |2 g                        end;3 u  p. N. w. S5 h
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station- k! r0 J0 S( w% l* q8 J
                        part := @.transpOrder;
+ E7 }1 R# s. U5 k" w# y7 J: O  \                        part.move(@);-- load part0 v( h9 Q3 W4 ^( |! \4 c" P$ L: d- J
                        @.CurrIcon := "load";- z% {% J+ Y+ t4 n9 Z/ L6 g7 b
                        GlobalDistObj := part.globDestination;* M% D7 n5 n2 I9 q7 a7 _) F7 n5 o) O
                        assignLObj := rgmanager.rgAssignL;5 c" X3 ?- d' i2 [1 i
                        row := assignLObj.getRowNo(GlobalDistObj);, P9 J. K! w6 Q  S6 D9 v
                        if Row = -1 then -- since 709 s  c% i  x# F& N# m
                                if lan=1 then
' G' D* Y$ r% R' F+ X                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; V2 ^$ Y( P3 g2 f& g$ N2 N3 l3 Y                                                to_str("in der Andockstation: \"",?.~.name,"\""));# R( N1 H% L6 W+ A4 h
                                else2 s1 \, \3 [- b  `
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# I, j, @$ k' a0 s; y" v7 T- ~# q
                                                to_str("in docking station: \"",?.~.name,"\""));                                6 s0 t& I6 Y. y- _
                                end;
+ F+ C/ _0 ?6 R                        else
0 Y7 Y& q/ t9 E                                @.Destination := assignLObj[1,row];
) {, H5 z# d: \/ Y- A+ K7 f. W                        end;                        9 u3 Y9 I% ^" O* n9 I7 I
                        newDirection(@);4 ^: k- |/ y' H! l1 V# l
                        @.HasOrder := true;1 C$ H* A$ F0 x! `0 ^( o) ]
                end;
9 W1 |) {" ^5 S0 C& X9 N. K        end;# x& W% a0 w% c! I8 n
end;        -- of the method
2 L. Y$ y5 l' I0 N4 _" w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- Q2 a2 K& W8 A* B
$ E% q2 K  y+ P9 y1 y; B) t这是AGV_putin中arrive的method。
8 p, k0 Z7 `2 i' O4 U. e4 I* ~- j7 Y- ?3 J
当到达物料速度越高时,这个报警更多,* N( n- t( O6 V3 V  X. |8 E" Z
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
: @6 L, M7 R: X0 G+ V* l: h程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 t. s; W5 B4 E( H% }+ W

5 h+ `7 V7 ~5 X3 Y另外一个小建议,就是move,所有的move都可以这样) a1 Z4 \1 o+ w! l: t( {% w/ P
if not move() then debug end
8 F& Y" D. y/ s$ j( x" m+ r3 c这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 e  T+ K, L, `
plant simulation中的free libraries有AGV模板,& I( l. G5 r3 a
里面也有案例。2 ~, `* b; Q: R% o  ?
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  c5 m$ ~0 w/ A( d. r. _

9 ^3 w$ A6 @& e+ [) y我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ U7 o! c; G' N/ b) m  I! V3 [1 T, ^6 f4 F9 |6 h% C$ o
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
0 j+ h. m" n( K+ g+ [# w这是AGV_putin中arrive的method。
% m( \6 f3 v8 q, m! m- m2 i$ N* Y. v
当到达物料速度越高时,这个报警更多,
2 @' ~% T3 ~0 W4 J. n
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-15 08:06 , Processed in 0.019949 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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