设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6566|回复: 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'
9 f; P( a- h3 `4 v8 l*/, J* j- n) {% E$ n, a
is3 Z* _' ?+ m4 s, P& q
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ ?( G; {. F6 f# o9 G! Qdo
+ R, E+ q1 t  D5 o. a) t        Lan := rootfolder.Internal.Tools.AOLlanguage;5 M4 K3 H, U% ?. c) s
        if current = @.Destination -- else return7 Z' _9 x4 N  C; A; e7 b
        then" Y; K5 {& d8 z# v: Z' a# j
                @.Destination := void;
+ O. d2 i' h2 E: D2 i                if @.occupied then
! w$ n8 h# w) d                        part := @.cont;
8 W) L( h0 O  t: q4 A+ P4 v                        @.transpOrder := void;
% y3 l8 y2 @0 W: \# k, @                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; ]% m* [: R2 `6 U( V& q
                                @,root.eventcontroller.simTime);
% O- M6 Z7 }$ {                        @.HasOrder := false;: w# G& Y8 b5 l
                        @.DrivingHome := true;
3 W$ Z7 h1 y6 q9 q# a1 N" D                        rgManager.tryToStartTransOrder;
( m. q  P) f6 l5 |: a0 F! D                        if @.Destination = void
4 c8 ~! d) _' Y- x- d                        then -- no transport order for vehicle @
1 p# d# o( g. Z3 `, d: s; i8 i                                @.Destination :=
! I9 |7 H8 ?# C8 c3 f                                rgManager.nearestFreeStation(@,track.~);, R( |, x0 U% P2 V5 y9 k$ P
                                newDirection(@);   
1 ^! O$ Q& E0 a/ P  j0 g                                if @.Destination /= void then* n2 A) y' T  C) l; e
                                        @.Destination.NumReservation :=. P! G  R5 G( r/ V
                                        @.Destination.NumReservation + 1;( y/ s1 C5 f, v, T# ]& o
                                end;4 p7 d0 E' {6 X* E& v. H! W
                                @.CurrIcon := "drivingHome";
9 |0 u2 ?6 a/ `  N7 J( P: g9 }                                @.DrivingHome := true;3 z+ K: R5 x. j) Z: n$ P2 `
                        end;; ?0 K3 d; k4 G* C5 e- k$ k" W1 G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 l4 {, h# d+ z" V: m                        part := @.transpOrder;  O0 Q8 |9 q! X; E, C: f& J
                        part.move(@);-- load part8 T- A% K) Q8 h- |+ H6 B$ }
                        @.CurrIcon := "load";5 }+ \8 n+ W2 p- ^1 c0 ^9 P8 w
                        GlobalDistObj := part.globDestination;( ]  c! J+ N% f  }+ _3 g$ m. d
                        assignLObj := rgmanager.rgAssignL;
, t7 {' s3 ~+ Y7 o/ Z% L; w0 T                        row := assignLObj.getRowNo(GlobalDistObj);9 |2 n5 V3 u" W6 c# R# }9 H
                        if Row = -1 then -- since 70
, y3 Y1 X, u* Z3 N$ L) W                                if lan=1 then  U5 l. x7 Z: A+ d, F6 I6 I2 v' n3 E5 _
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, [9 |, L9 r. t) F( E) }& m, U
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 W6 U3 e; c2 J5 E: p+ a" \                                else
' P8 D* \2 S8 {/ `" z/ f9 ~                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% U  _0 d. M) J2 w+ ^4 @
                                                to_str("in docking station: \"",?.~.name,"\""));                                $ H1 p/ z1 B, b, J1 N
                                end;7 l: I/ D: @0 I& J* }. n, @
                        else
" f7 o/ b& A9 F$ b3 n  c" z                                @.Destination := assignLObj[1,row];- _0 W' c* @- V
                        end;                       
5 ~0 [6 M9 a% [) H8 r0 f* i7 r                        newDirection(@);# f7 X; C6 b9 g
                        @.HasOrder := true;5 X6 S  G: _- d- L5 u; e
                end;3 }3 l8 m9 s3 T7 w
        end;& {4 P+ }7 L9 M7 ^* H2 ?
end;        -- of the method- Q; U. g9 N0 P4 x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 : g, W+ e. k4 e, Y
3 K, P+ @  g2 C6 C
这是AGV_putin中arrive的method。% N) c2 E3 q! t1 e
0 N  C! d  M& Q% c" M! }0 u! [
当到达物料速度越高时,这个报警更多,% o% F8 L/ G. q0 ~7 D- B
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
* e( I& b2 P7 z7 W  C程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?# a& a" i7 T* A( K1 f

# z( L: i3 F' o另外一个小建议,就是move,所有的move都可以这样% J5 o$ D! `9 L7 U1 S
if not move() then debug end; F4 C4 I' h6 t
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- k8 c) B+ J2 v! ]. ~. j8 H0 Kplant simulation中的free libraries有AGV模板,
- Q7 u. D4 ?! m! @) H  o里面也有案例。! h8 }5 @7 y+ d; {+ }1 H- U) {
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。: q% q- C5 k$ b' [

  K0 Q' {! e& R% ~; B$ h我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) U1 N, A1 A! w5 x7 {) @/ L

; [% o0 O: i5 R- Y那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / G; u% k. S9 G$ M, j! ^
这是AGV_putin中arrive的method。
% ~& _+ ?* U7 f/ K$ E, c1 J4 N+ P" r) {6 k5 z+ Y& g4 \  a$ t
当到达物料速度越高时,这个报警更多,

" n) A. D: j3 |: N+ }6 \: S另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-13 07:39 , Processed in 0.020655 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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