设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9229|回复: 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'
$ g  \! @- e7 U3 s7 {8 v! e*/
' R2 v" J3 s0 X/ Q# Y8 cis
9 N# B( D% [9 @6 X- R: t# T3 ]        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" N1 u. Q, f* D) E4 [& y( h8 ]do, `( ~4 t# l' ^* y
        Lan := rootfolder.Internal.Tools.AOLlanguage;& T1 ^! l1 A1 ]' j5 |
        if current = @.Destination -- else return
- b5 N7 ^$ T; B4 T/ M        then
# u& ~7 q  y  [) y  ^% d/ \$ X' |2 ?                @.Destination := void;( B+ O% _5 M2 f6 N1 T6 v! ?0 D
                if @.occupied then" R- O2 |1 d0 }) ~: g5 l
                        part := @.cont;
  W  p! X& P6 ~8 X4 A                        @.transpOrder := void;
* y) u1 F: `: C" J7 D                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. R" A( c% J4 K3 }2 a
                                @,root.eventcontroller.simTime);
! K& z2 b0 ?0 F* |( ?/ t# P9 M                        @.HasOrder := false;
9 |! Y9 r. P0 o+ f* x7 o                        @.DrivingHome := true;
' B6 l7 x0 l! j. T7 e2 g) J2 f2 o5 z                        rgManager.tryToStartTransOrder;
9 S( Z  c+ Z1 S. f, t$ E. v9 E                        if @.Destination = void
" E) Z" ~8 s* r5 p- S  B                        then -- no transport order for vehicle @
1 g$ c% u2 D! L' ]9 N; x                                @.Destination :=
+ M; e0 `1 i, h( ]) R                                rgManager.nearestFreeStation(@,track.~);9 u' n3 N: w: h0 }+ t
                                newDirection(@);   
. b; O% a$ P' r% S) ?; j% t                                if @.Destination /= void then
! o1 D) y% i: z$ u                                        @.Destination.NumReservation :=
) j: |6 i4 T8 I                                        @.Destination.NumReservation + 1;" d, e) ?) A+ A! K, i; q
                                end;
# k+ N& a! ^6 V# q' s, v4 N. K                                @.CurrIcon := "drivingHome";# Z' w! ?8 P8 p, ?& s' Y% f( r
                                @.DrivingHome := true;
, M4 {* i* ^4 g7 h                        end;6 r9 z1 ]# N, a8 Y" f7 D; O
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ _9 |: K. @) u& K                        part := @.transpOrder;. r# c4 y& f; q8 U
                        part.move(@);-- load part! i. \- t* N* G- X5 I5 U8 E
                        @.CurrIcon := "load";
2 l# ]' k* _+ h* {3 M+ A! t                        GlobalDistObj := part.globDestination;
2 J* y3 ^5 X7 r; B5 @0 C                        assignLObj := rgmanager.rgAssignL;/ A) q- X# F6 o( }! i  }, s' M+ a' [
                        row := assignLObj.getRowNo(GlobalDistObj);8 B. y4 g) D9 o! M! c- `
                        if Row = -1 then -- since 704 y1 x" x3 \, J* d# ^3 y
                                if lan=1 then  }: ]' W& x, ~! w  b
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 w3 Y8 i' F) x. W( g; j' ^
                                                to_str("in der Andockstation: \"",?.~.name,"\""));0 j( b5 e1 N0 z8 A% c1 l# D- {
                                else. }  Z3 D$ f7 m# W4 H
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% u& Q4 J5 T# t  ]  K                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 P5 L7 W( Z* s$ z8 S/ [                                end;" f; D: l! E' c
                        else- z+ t/ f! c  X# W- S0 T/ E
                                @.Destination := assignLObj[1,row];% c9 E* H1 U) j- {) J0 x1 s/ |
                        end;                       
3 \# o3 P7 H8 q$ s# H                        newDirection(@);
) D" m' n5 J& \3 H                        @.HasOrder := true;
. `7 H6 H. O( i* L  a8 h                end;
: K* D/ }$ w* s' I5 _8 w        end;# s& i8 g8 U- U1 N+ [! n
end;        -- of the method. }; l# q- Y7 \0 f. w/ r& o
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
+ V. ~4 i8 `1 W) e, n3 Q# ]3 E: h
这是AGV_putin中arrive的method。
' d# c, L0 [/ P- }! H" m* M' c/ R3 a' M& s. U8 N6 K2 k) U
当到达物料速度越高时,这个报警更多,
: o$ N6 {% K. l9 m1 c可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# O; }/ A2 b! ]) B' b$ H
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?4 s% Q$ r) i, `3 L4 T

" t! Z* S" [; [1 O0 V# A/ f+ M' y另外一个小建议,就是move,所有的move都可以这样+ _4 e, n7 d1 D+ L# F
if not move() then debug end
- O) ^' U( f! n* q这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 F4 O3 o9 _5 _. n
plant simulation中的free libraries有AGV模板,
0 M9 Z7 K& U3 B& Q里面也有案例。. N: o( O  K0 t
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。! A9 i/ t& _! a- {& z

2 \- M9 U8 k, p, `我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 |$ B4 Q' P% A0 H4 c7 h
! K, E. k- o8 R9 j, U那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
- u. z& w' u" Z/ |% q+ T$ V5 y, j0 d这是AGV_putin中arrive的method。+ J5 z  `( J, M! `

/ {% i, z% |; _" v4 K当到达物料速度越高时,这个报警更多,

  q6 ~0 V% `+ p1 b8 l* {9 g. Z: L2 y另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-20 08:34 , Processed in 0.017900 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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