设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10038|回复: 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'2 B; d( g# Q5 Z+ m) L2 K8 c
*/+ @3 w* w" W* `3 Y# }
is
2 E1 n' G4 F6 Q        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( [' _7 F2 Q" t- r' f- Kdo
) E9 h" t. c1 S6 H) d        Lan := rootfolder.Internal.Tools.AOLlanguage;3 F2 n/ l# |0 d
        if current = @.Destination -- else return. P, o8 V( |- ^5 @
        then
3 J9 F, s" h# J+ I4 Y* K) G                @.Destination := void;. y- p% F7 G2 j. h
                if @.occupied then5 S& ?/ I% `+ q) s1 r
                        part := @.cont;
4 q$ ^( A2 H* O$ {2 p- G                        @.transpOrder := void;% |' l, y6 k7 j; z& {) i5 J/ F1 Z
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ ~" l7 [4 e9 [/ R) c1 z5 u
                                @,root.eventcontroller.simTime);
/ j* b& E1 y3 b" B1 k# o                        @.HasOrder := false;. e6 J7 H0 g" I  O% R6 o" |- e
                        @.DrivingHome := true;
; w* W6 n2 r* q( x8 y                        rgManager.tryToStartTransOrder;5 M; Z( L, S2 L! `$ F3 D( N
                        if @.Destination = void
: v3 L; k1 T8 t( T: |. \; N0 P                        then -- no transport order for vehicle @9 K' x9 c' r9 m- c  g  c
                                @.Destination :=+ I' M+ w+ i9 |, X; ]3 j6 z; l/ P
                                rgManager.nearestFreeStation(@,track.~);
% N4 D7 w2 K/ F. b7 {$ F                                newDirection(@);   
( D+ D( r5 v$ ^* `% z* Z" \8 K                                if @.Destination /= void then
9 ~. Y4 V% L9 f7 z8 d( g                                        @.Destination.NumReservation :=
5 ^7 ^4 L& D+ t, e- P/ F                                        @.Destination.NumReservation + 1;. t+ I  B, G2 b! `
                                end;) d5 q1 H- |: x" Z6 i6 Z
                                @.CurrIcon := "drivingHome";
3 `0 y  z4 l4 ?3 C' ~" T, `                                @.DrivingHome := true;& B4 V& M3 `# I0 i, y- ]2 Q, E  ?
                        end;
, Z' f* E! b" U* R9 G+ k6 `& P                else -- the vehicle @ is empty, both vehicle and part are in the same dock station. ~# Q) v4 q, v
                        part := @.transpOrder;
9 ]4 k3 ~5 }+ D0 K0 g( Q0 Q& k                        part.move(@);-- load part
8 Y7 g4 _# U5 w/ a7 Y+ ^                        @.CurrIcon := "load";* O% d9 L& E1 |5 I& P
                        GlobalDistObj := part.globDestination;9 v: F4 s6 O5 L- v* P; Q! f- o
                        assignLObj := rgmanager.rgAssignL;. h* O' u% h$ Q
                        row := assignLObj.getRowNo(GlobalDistObj);! A9 H8 {3 [+ z+ }7 r3 ^
                        if Row = -1 then -- since 708 S* O  S& P; B! l( o
                                if lan=1 then
) A$ U7 v4 R6 w3 F& j7 L, g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% K' E1 `" @8 E' Y1 m                                                to_str("in der Andockstation: \"",?.~.name,"\""));
0 N6 [4 }2 H1 N' e; g5 x                                else3 m" \7 T# }2 L4 F0 j) P9 ^6 c
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) @9 `, W- m2 S5 m1 Q
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% b4 T6 j6 M2 y% m6 B. m+ d                                end;
$ V3 h# W2 [: k3 }8 j$ _9 W                        else
. R4 J/ Z5 j! v' l8 o& ?                                @.Destination := assignLObj[1,row];
: B2 O" ~6 y( T- Y# K9 k! ]                        end;                       
6 l0 ~/ _7 t% {' Q4 ?! e# p                        newDirection(@);4 }% ^0 S7 N; m4 Q$ z% Y* }+ D
                        @.HasOrder := true;
1 s3 J' O! p9 q; i7 X4 M/ q9 e                end;& s5 E9 G0 U2 g! w4 {4 f
        end;2 Z9 f& m( ~+ V% E/ D
end;        -- of the method8 z1 P  E5 k/ x2 _
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 $ {3 e0 ^. t0 j) z; I

- Z1 u  o; v$ f5 B" T) B这是AGV_putin中arrive的method。3 z$ g' G9 |5 x) J
& Y5 a  h; D1 I7 l
当到达物料速度越高时,这个报警更多,
: U- v0 b4 ]5 [3 g- C6 Z2 t$ ?; A可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 M7 `# ]5 G* q0 {
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?% b! q9 k: ~9 m+ y
1 P, }: @# {1 {" R! c& {% ^
另外一个小建议,就是move,所有的move都可以这样  S% w, _( `, f3 k& H& o
if not move() then debug end+ W: p" t5 P- D( @
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 L1 I* I9 X/ X3 Y7 T
plant simulation中的free libraries有AGV模板,, W0 q5 v* ?& G* X
里面也有案例。
: X) a+ `- O. j2 A# W+ G我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
2 _7 t1 _! w* i: L7 E
3 P8 e" ^1 R/ @! n4 Q我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
: D5 i9 c/ d! S7 i5 D8 y, ?9 H+ X/ x
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 6 A5 |# Z5 d, e/ e$ t
这是AGV_putin中arrive的method。
1 [3 ]6 }' f3 j3 Z+ y- V
1 i; B0 e  F. O# U. A* n6 i当到达物料速度越高时,这个报警更多,

  b- D) C0 |8 e7 ~" E另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-9 06:05 , Processed in 0.019742 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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