设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6297|回复: 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'
$ S# s* N1 P) i* T# f*/% e" R) S$ z+ b" m
is
; C4 C' j1 E5 d* \        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; [8 h; b0 l5 v" @
do, s% v6 h5 X1 X/ U# h- j( U2 L( a1 q, e
        Lan := rootfolder.Internal.Tools.AOLlanguage;
2 ^0 B! z1 |3 z- T4 d1 {        if current = @.Destination -- else return& V- P4 {% ^. S; P7 V8 F' c' n+ W+ Y
        then
0 L- W( e" x( D, x: }                @.Destination := void;0 V/ F) l* p* S  a: [: X
                if @.occupied then
  y/ ]  G7 y& @" u  `                        part := @.cont;
" s1 {5 y1 [" p8 X/ A* X. [4 T) n- o                        @.transpOrder := void;# z7 {5 m: Y: I* q
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,  y& _0 H2 c9 N' d0 K  G) Q
                                @,root.eventcontroller.simTime);
& x! v* L. i, h/ m' ]) L! G- w                        @.HasOrder := false;7 R- F/ d1 g" n4 k! T) r- ]; R3 h3 h
                        @.DrivingHome := true;6 t9 h8 \1 H3 b
                        rgManager.tryToStartTransOrder;
+ N3 P- l9 o1 R# Y: N                        if @.Destination = void0 a. |- N: b& s9 @' y" l3 r
                        then -- no transport order for vehicle @- V4 H* m% V5 k' U
                                @.Destination :=
- X$ }1 v, t4 U& r, l. z( f                                rgManager.nearestFreeStation(@,track.~);
+ c. o( A! j4 e  L                                newDirection(@);   
7 h1 b  j4 `# P" C8 g                                if @.Destination /= void then
8 p+ o( s9 k' ]: i9 V, s                                        @.Destination.NumReservation :=
5 f' p1 z  J9 l" H8 R                                        @.Destination.NumReservation + 1;
0 N0 u8 a/ P& J4 H                                end;
8 ]/ F% W  L! X9 z% ^. E                                @.CurrIcon := "drivingHome";
- A5 R6 L5 f+ M: ^                                @.DrivingHome := true;
7 Y6 k0 M; |4 U                        end;
4 W6 g4 o4 o' p                else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 B* I; M. h6 s1 c7 T1 p
                        part := @.transpOrder;/ c, K- g9 e, K( l' {
                        part.move(@);-- load part$ u$ e1 G- O8 K6 d% ^- m
                        @.CurrIcon := "load";9 i  |  X0 W+ z% H8 D' T2 W
                        GlobalDistObj := part.globDestination;
/ ]6 H0 \: _+ g; R                        assignLObj := rgmanager.rgAssignL;
3 H$ I, c& |8 B! z                        row := assignLObj.getRowNo(GlobalDistObj);
8 c7 l) o8 X0 j& ~                        if Row = -1 then -- since 70
2 _4 y/ x/ Y/ R0 s                                if lan=1 then
1 }1 h( S1 R- P# a                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( J, E7 M: k( T' |- l2 [& ?                                                to_str("in der Andockstation: \"",?.~.name,"\""));* A5 g9 n* a: s) X; |0 y3 ^( N
                                else
* h: J" d: g: D: u/ U, I                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& r* B9 w( O1 `* W4 T7 N                                                to_str("in docking station: \"",?.~.name,"\""));                               
- h0 L8 ~' q, L. q* {7 E                                end;$ A" ]$ Q) P2 E7 T
                        else. E$ E# X0 J9 j3 p0 ~' W0 B( L
                                @.Destination := assignLObj[1,row];& [! [% O9 P1 x4 ]
                        end;                        4 k9 |8 j7 B' `+ B9 e
                        newDirection(@);
, P  Q& q! Z' C. ]* i. ]% h                        @.HasOrder := true;
) t/ l  V# Y3 w                end;7 `# r$ l8 Q* a! b: F# y, \2 Q# x8 N
        end;
& S5 [3 w6 i: d7 {$ L  T: Xend;        -- of the method6 }0 N- I/ F+ ], A. ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; W/ a& p7 m' G4 O/ o' M% b( R4 k0 q& b3 H% N! G, p8 ~
这是AGV_putin中arrive的method。3 C3 Q5 o  N8 S

% @" `+ a  b+ f, x, G7 O6 z当到达物料速度越高时,这个报警更多,
+ W4 k7 g6 W3 s% t- e' ?* h5 z  {可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 s- I  s. Z! Q程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?5 }9 J$ Q+ \3 E) `
; f: H' C1 e0 \) W8 q- \3 Q
另外一个小建议,就是move,所有的move都可以这样
6 P4 I3 P5 z9 A$ U) {if not move() then debug end
" v1 W, W& `  R+ V) s3 J% ^: R: D这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
' Q; n7 k; L' K6 U0 P& H. I2 Tplant simulation中的free libraries有AGV模板,1 m, K$ P7 m9 _0 j% q
里面也有案例。0 V+ n0 c* j; E: q; T$ q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
$ m. R% W+ M, V0 Y7 k) }7 j' x/ p  I0 }$ z$ {
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 7 R0 l* C: N  m- [7 W5 u  @; b
) H# \% h$ m3 f6 w: O2 Z9 f
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
) t' P) t! h% q9 W) `9 D% ?这是AGV_putin中arrive的method。) Q" ^' R3 v8 s# v3 O2 h

9 |) ?/ v; S9 I' x当到达物料速度越高时,这个报警更多,
- S# m2 ~- N; w# P3 |9 z5 H  x' H
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-1-29 11:34 , Processed in 0.020672 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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