设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7236|回复: 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'
7 v0 K. y& o+ W4 ~*/8 j  Z* t0 n- [3 G4 Q) S) E
is
5 f' {# g: v2 o. W& ?# q        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ `" y3 J4 Y/ c# N7 ydo
7 D% b1 _  F' W9 w5 X3 L4 L3 b  t        Lan := rootfolder.Internal.Tools.AOLlanguage;4 B1 n. R& ]! ]! j. C
        if current = @.Destination -- else return4 H" {# S% N4 x: L4 K$ G
        then
. P3 @+ I% n/ ?! [                @.Destination := void;  _$ T$ X) z7 ]4 |# n% l& c% o' J
                if @.occupied then, Y" d( K7 p& z2 q" Y& [
                        part := @.cont;
9 _% |6 H* O9 N2 i; d                        @.transpOrder := void;0 J% H/ A4 T" K7 t0 W( w* m/ O/ Q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 d# ?' U; O7 d' p, _" u& {
                                @,root.eventcontroller.simTime);
) Q  k: v7 }' F& d8 k, \                        @.HasOrder := false;( m! Y3 a) m( e9 ^/ n' `
                        @.DrivingHome := true;
" s5 K& _+ Y" G" F* E                        rgManager.tryToStartTransOrder;: ^$ f2 x$ V2 e% @0 v
                        if @.Destination = void
4 y& t6 w4 E0 @# r& |5 j2 \                        then -- no transport order for vehicle @
) X7 k, R0 h3 _1 W1 ^                                @.Destination :=
- g" g8 m) m: T9 C4 B+ h6 l: P                                rgManager.nearestFreeStation(@,track.~);
7 w# M# S3 q1 |8 r                                newDirection(@);   % z) n) c1 g+ o5 F7 W& s
                                if @.Destination /= void then" g6 H) l  n/ e1 c) T9 C( n/ E
                                        @.Destination.NumReservation :=
8 q# p, ^1 ?1 K7 {. j/ J                                        @.Destination.NumReservation + 1;
2 d4 _* ]( v( L& b9 R                                end;
3 d8 s3 E3 L  z) V# _1 k/ |0 ?+ k                                @.CurrIcon := "drivingHome";
: k) U  U* O+ q" D2 C3 r                                @.DrivingHome := true;
, q/ Q" Z2 H  P                        end;% B* B( {' k+ B; L3 S) G) A( b
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station, n  K! l( N5 S1 z
                        part := @.transpOrder;
8 b& O: V4 l" h2 E! C                        part.move(@);-- load part
2 I# ]; u) P/ R" P* O                        @.CurrIcon := "load";4 s1 f: ]3 }% z* {& F7 L
                        GlobalDistObj := part.globDestination;+ v+ |2 ^6 o# O
                        assignLObj := rgmanager.rgAssignL;! r# r1 |/ s8 k3 x
                        row := assignLObj.getRowNo(GlobalDistObj);/ K0 q/ I1 w* t0 n: s  J
                        if Row = -1 then -- since 70) X" m- `/ U/ T" d. S: X
                                if lan=1 then
( L5 J$ h  l1 @& I                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 |4 n) d! ^3 |- j5 K4 z, \                                                to_str("in der Andockstation: \"",?.~.name,"\""));
# f6 H, b4 x3 n; L: K9 v! F' V                                else
% f7 C1 g# L. ]& F; e- Y                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 g  e( R. Q. b2 L6 g. M* B+ _- m. {
                                                to_str("in docking station: \"",?.~.name,"\""));                                5 r7 F5 D' }$ ^3 A
                                end;# {3 Q: [" r$ t" x' l
                        else
. n5 B$ C, A0 O6 |8 F                                @.Destination := assignLObj[1,row];
0 d, j1 [$ J/ W- C9 ?% V$ `5 R                        end;                        + R0 K% g8 B2 D1 _. ?2 u
                        newDirection(@);
7 i/ W9 t. t8 r) |                        @.HasOrder := true;9 g! |2 r- K4 ]! q7 ~3 b9 E
                end;
8 U) `" j9 m/ z* I        end;/ I* f  Y8 K1 q; ]! ~2 O/ ]
end;        -- of the method7 F$ `# l7 ^4 C4 x9 U* d, M0 [
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ o& s8 C' u" Y7 ]" q
! s2 i. q- `& X/ J这是AGV_putin中arrive的method。
5 F; b# S' x" q$ c; a: L: p5 R: i: Z" K( N; ]# B' o$ q
当到达物料速度越高时,这个报警更多,5 j, p( L( l1 t# o6 f
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
% g; U& A. d- o+ g+ c, D程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?7 g6 v) p! e3 C/ `+ g
; {) t7 ^( V, l1 C
另外一个小建议,就是move,所有的move都可以这样; E3 W( U% j6 _2 W
if not move() then debug end* M6 _( B) @. H" F3 h, G
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* b( [# o* M2 D/ K8 E
plant simulation中的free libraries有AGV模板,
) ~7 p4 f: L/ x2 w- x) v* m5 J' [里面也有案例。
8 K) Z; i& F4 [# Q我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 ?9 g& _6 [/ E, m/ q8 k

  ?6 P4 w/ M' C# F& ^我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
- ~$ {2 z: q6 @4 v* v6 q6 \* b; |& D* B* U% ?+ d7 _1 m
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
" S4 q* M% o0 K. h# u. B这是AGV_putin中arrive的method。/ _6 E) a+ v# Q) @$ d4 n
: d: V( n' z$ F
当到达物料速度越高时,这个报警更多,

0 D# G+ |2 N0 G2 ?( g另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-29 18:53 , Processed in 0.024678 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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