设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8258|回复: 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'4 ~  b6 k7 h% w/ j* @
*/9 D8 T2 r* x/ g( m
is7 B5 [* h. w7 ]) i6 ]* k) k
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. z* v% c9 s& cdo
+ x" Q% P( l! m8 c& g; n        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 [) {8 O6 J( Q2 I7 V$ l( [        if current = @.Destination -- else return
, Z3 g% ]' L2 ?5 y2 ]4 R        then' j6 y$ {) b6 i/ |) ?, y2 y( d
                @.Destination := void;
: f/ O) V3 Q7 D5 @                if @.occupied then
- q, x6 A. U  u5 t) q9 i                        part := @.cont;6 Q+ u3 J* Z; @) U, ^4 G$ J
                        @.transpOrder := void;
: `' |( j6 J& B                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 S8 H3 P. t, K' q/ I                                @,root.eventcontroller.simTime);1 F1 u& q/ j6 F& X' N& g
                        @.HasOrder := false;  X1 o* W1 v9 s  e% I/ `# p
                        @.DrivingHome := true;, O1 x( O/ z/ ^4 O; p; i
                        rgManager.tryToStartTransOrder;
$ \+ o& p# n  }" {; i                        if @.Destination = void
7 w$ O$ c0 v  v! S2 T. W                        then -- no transport order for vehicle @
' s  L' {, s( `; D  E) U3 }( P) z                                @.Destination :=9 t; z$ y) X: h8 u2 W8 [# T9 f
                                rgManager.nearestFreeStation(@,track.~);
+ J) \/ e4 k% m/ O/ x                                newDirection(@);   # c3 ]' S5 |( j
                                if @.Destination /= void then8 Y- O/ F1 H2 I  k
                                        @.Destination.NumReservation :=; {# @+ e: X5 q9 Q; d& S+ g! x
                                        @.Destination.NumReservation + 1;
0 G, w" e; z: K6 X8 N% D                                end;
) [4 @/ l; L6 T( S- H7 Q( n( r/ W                                @.CurrIcon := "drivingHome";
( j+ x; a5 o" q5 u3 J3 c8 V& l                                @.DrivingHome := true;9 Y/ C3 s% ]5 h: [* H) V
                        end;8 ^+ m5 S" K5 m+ S
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 \  }: @) T2 _  Q  z$ b) N7 t                        part := @.transpOrder;# T2 S. z7 P) U6 N+ {( n+ b
                        part.move(@);-- load part/ A0 E0 ]5 R+ O$ h8 p
                        @.CurrIcon := "load";6 W3 U% v6 E/ l# ^6 y1 [. q- R8 O
                        GlobalDistObj := part.globDestination;
) J& W. ~" b3 R/ j                        assignLObj := rgmanager.rgAssignL;/ s7 }" k, t! l8 E
                        row := assignLObj.getRowNo(GlobalDistObj);
9 U8 a! D) n2 O0 O% M( |- R9 G                        if Row = -1 then -- since 70% k2 ~- z, ^2 Z. Q$ B# C
                                if lan=1 then' z- K% T6 L$ w/ y$ O, ]5 d
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 F* [+ o$ R+ Y( ~' s- n6 b, h: r
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
1 E0 w5 X# y9 B( n# s                                else; y* |7 g% k% x, H) P: o
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, c% g, v+ X3 X/ c, J& s( w; e
                                                to_str("in docking station: \"",?.~.name,"\""));                               
/ ~1 N5 S: K4 J4 a6 K) r* q                                end;8 m! B5 j5 g0 l# _7 ^# E) @7 N8 |
                        else2 j$ o3 p1 g- `) j
                                @.Destination := assignLObj[1,row];2 K. ?/ V$ ?4 N, |
                        end;                        ( _3 H5 m0 Y4 G
                        newDirection(@);; v9 q0 G8 G0 j. i0 Q
                        @.HasOrder := true;
; b4 ^7 `1 g$ f# _                end;
3 N3 A1 x* _% x. S        end;" u. j2 ]- o6 `; p! f1 l3 N
end;        -- of the method5 Q/ [: K/ d" {, F  P
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 H8 ^' N' G$ b/ z( e6 S
( p& A0 N; V" ~$ J, L8 q
这是AGV_putin中arrive的method。& e" v) ]( w( C9 U

$ O, ?' \  N3 _* W当到达物料速度越高时,这个报警更多,
4 y- h/ S- G: d: t可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 A! F% K7 Z, m; R# c# y& \程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" U& N3 M3 M8 m& s# E: g) L4 [

" q: t% p; N2 F另外一个小建议,就是move,所有的move都可以这样
( |1 a/ [8 l" Iif not move() then debug end, a$ @1 l. W9 E4 Z" n
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。6 i$ ?$ l1 G  E1 T' J. ]/ a
plant simulation中的free libraries有AGV模板,7 ?% V0 ^7 l. t, [' A" B1 j
里面也有案例。! `$ K/ h* M) b  K: P# L
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 O0 Y2 Q% |( F) @7 m9 b+ ?
# t; R/ j  U: U2 t6 M! a我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, u4 L9 H$ H1 K4 ?: t. @
, j( s% c% m! {5 {9 C8 `那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
* |. U; D7 Y/ }  f. A这是AGV_putin中arrive的method。# L- s, B. [0 q1 e4 a8 I2 N2 ]) B% n

; j* m: q! [0 }4 ?; A当到达物料速度越高时,这个报警更多,

$ ~/ Q% x0 h( c9 I另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-23 17:38 , Processed in 0.023885 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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