设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8562|回复: 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'% _, n4 `; ~/ j( b- W# O& J4 D2 E" m
*/1 B( E4 ^5 [% M. g. R5 b
is
- _' P6 j( V- x        part, GlobalDistObj, assignLObj:object;row,Lan:integer;& @8 c/ ?2 h* R- w0 |3 w2 K
do! d+ M! Q+ s2 C+ H% I
        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 j( i  P  V7 a5 Y        if current = @.Destination -- else return1 K' G0 F- q+ i  g! _
        then
' X( a1 E, f( h$ ^" E! l& {                @.Destination := void;
' l& {* t) h8 |7 x2 D                if @.occupied then
0 Z. U4 c7 a" g$ R4 I2 a                        part := @.cont;
% m6 X0 h8 S8 a                        @.transpOrder := void;
; e( U7 R( p! [7 h                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 p1 N9 ]. d  [- l0 H5 F, ]
                                @,root.eventcontroller.simTime);" P9 L, Y( t2 k: S
                        @.HasOrder := false;
! T3 H6 {3 ]/ f1 l& y9 l  \2 o: O                        @.DrivingHome := true;
6 |3 L% q# ?1 R: e' X                        rgManager.tryToStartTransOrder;
+ @% K' n, c1 |                        if @.Destination = void( y2 v( _  y& ?( w* Z( p
                        then -- no transport order for vehicle @: l( x8 C! a: a, J- g- z) {) D
                                @.Destination :=
$ V2 _6 }6 @) i" V* M. \                                rgManager.nearestFreeStation(@,track.~);
4 w* c; P* P. J# t& H9 x. C0 f9 t                                newDirection(@);   / E1 R: a; L) F8 a
                                if @.Destination /= void then9 a/ Q; y2 l0 j) |7 \) f' [1 B
                                        @.Destination.NumReservation :=) j2 j8 Y3 N- x8 u1 V  G9 ?
                                        @.Destination.NumReservation + 1;
5 W2 _2 D# [& E$ {                                end;
, i3 b" n. K( ~) J! N. h- r; o                                @.CurrIcon := "drivingHome";
6 b- b# b% ]3 F8 W5 Q                                @.DrivingHome := true;
8 }0 b* M" Z5 r1 S, N                        end;* O# U7 Y0 H5 X  Z: a, u/ }
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 X9 X& H4 |! T$ F. Y/ D5 k- g$ y                        part := @.transpOrder;
& y" I7 Q5 T2 l; `8 F                        part.move(@);-- load part5 s3 j& a* m4 U
                        @.CurrIcon := "load";2 X# b6 }  g& u1 S
                        GlobalDistObj := part.globDestination;3 m) W9 Z/ m3 V, o% t5 O
                        assignLObj := rgmanager.rgAssignL;
, x  a. }) \" [$ |: Y- Y                        row := assignLObj.getRowNo(GlobalDistObj);
! c1 e2 A. D$ i4 Q; I: i+ q                        if Row = -1 then -- since 708 k$ U; S# P1 U4 r  i+ e. ^$ T
                                if lan=1 then
0 H' y  B9 Y' T4 A9 t) m                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( u9 T, J7 P9 R& c* O; {                                                to_str("in der Andockstation: \"",?.~.name,"\""));1 \; |* c! V! ~0 i5 f. N  ?
                                else$ Q& o  X" i7 N' x% M! @: k' W
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( G5 K& \& X! d2 ^& [                                                to_str("in docking station: \"",?.~.name,"\""));                               
; A# v9 X9 e5 j                                end;
* W. v. T( x# B; _# n                        else
! o6 |' `2 }4 q                                @.Destination := assignLObj[1,row];
& U. `0 `# G& x+ L5 ~/ V                        end;                        & h- c  H, Z& e) `' I  B& b; r- M) v
                        newDirection(@);
" ?1 l: f  W) i( A$ s                        @.HasOrder := true;
" J# U# p! _$ x* M( C7 C5 p                end;8 }0 c: [5 ~9 F
        end;
  ]1 V5 l/ @8 z3 Z7 l6 _1 k# U$ vend;        -- of the method
; w4 O, _# j& e) I7 t# C
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
! p- P, A/ r8 ?' L
$ R. X6 K2 X; C; C1 U6 P这是AGV_putin中arrive的method。8 n6 l' t$ b$ j

2 p: W. N7 j1 Z! s7 [1 g* z当到达物料速度越高时,这个报警更多,; i/ Z' z" u, t
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ e6 n: l6 t: o6 l) W+ |! m程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?! C' W4 v- j. B) m: c9 H* T6 W8 \- }
8 y0 Y& a! Z8 {. R
另外一个小建议,就是move,所有的move都可以这样
% o$ \( k% o/ F% R% bif not move() then debug end
" u2 ]8 J% y& \0 H这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。* x/ P* j! |1 Z0 m' h/ T9 ^/ J
plant simulation中的free libraries有AGV模板,+ e3 M; R: ]1 U5 \
里面也有案例。
& o2 C8 j  w& F* D4 E: y我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。% H9 g& n8 b! C# y1 l5 k1 Q  U

  W$ w% n, W) \+ R8 m6 S7 J$ j: z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
, |  n+ S5 k7 F1 U) D+ P+ p9 F) }- c- R, L  m/ Y
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
+ Y- A+ `3 v/ B2 w" W* I这是AGV_putin中arrive的method。- ^! U- _/ h- L) |
0 q9 c5 k  ?7 T. j3 a) A
当到达物料速度越高时,这个报警更多,
1 h4 S6 B9 r, u- S. ~5 I
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 01:41 , Processed in 0.018238 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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