设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7515|回复: 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'! A3 g  h! T) p, O0 p
*/+ ~( p$ K2 ?# X6 t) }8 }6 ~6 J
is3 x$ ~$ r1 i0 B) ^8 U, V
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ m5 T- E& H$ Q3 E+ M3 ?! _' O. w
do/ f; h: s& j5 T3 I
        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 q* G9 @  N) s2 x' m6 C5 U        if current = @.Destination -- else return
* k0 s0 H5 N$ V$ d- w2 V* k. O& J        then/ Y2 e/ g8 _" C) S! D: q) q
                @.Destination := void;
" ^: c2 |* b" c& [5 A1 ?- Z! |. s                if @.occupied then6 x+ C  d( D+ W& _+ G( j( u+ B
                        part := @.cont;3 T( D' r7 J, f) e; O/ i5 A( |5 |
                        @.transpOrder := void;" \3 U; A' l8 H2 q  L5 F
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# t! W8 o  Z* i" J
                                @,root.eventcontroller.simTime);& n, N" @2 X- I
                        @.HasOrder := false;( S6 H4 a  P& T
                        @.DrivingHome := true;
- E0 Q2 o9 L% P( t) u4 V* S                        rgManager.tryToStartTransOrder;2 d3 C! Y8 q9 w5 V, i! S- w+ O
                        if @.Destination = void8 ^. ]+ r7 I5 t' r4 q6 v7 l
                        then -- no transport order for vehicle @2 i' k- Q, |! p1 U* {$ h$ Y- Z
                                @.Destination :=8 m/ V3 w: X7 M9 ^- r) h7 Q- Y7 d9 J
                                rgManager.nearestFreeStation(@,track.~);
0 t! ~- {# \) l* p' j( y8 ^9 K  a                                newDirection(@);   
$ \5 M% S0 i3 [                                if @.Destination /= void then
" ^, S" h. |$ T+ O4 S                                        @.Destination.NumReservation :=, V6 d& U4 ?1 r. M' b8 Z) E4 l
                                        @.Destination.NumReservation + 1;
- X& v2 k: L4 F7 ?% M: s$ R/ Y                                end;
3 |( b4 y/ Y$ w8 m                                @.CurrIcon := "drivingHome";
+ X2 J8 V* M. j& E) x                                @.DrivingHome := true;  K$ \. Z, R0 _- @
                        end;* P$ w. [2 t  a* r% n' C; F
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 @; P# h6 o5 V$ _5 F" {/ ?
                        part := @.transpOrder;" E6 M( ?; v- W6 c/ A& H. }$ ?( t
                        part.move(@);-- load part
7 z& R; a- l# M0 T                        @.CurrIcon := "load";
% C7 j( i7 O4 C1 P9 T. v. Q$ Z2 @                        GlobalDistObj := part.globDestination;
) w& h, d2 q# r# u6 k2 }  s1 S                        assignLObj := rgmanager.rgAssignL;
' G4 Y- l! r9 W7 k: L& Y                        row := assignLObj.getRowNo(GlobalDistObj);
% W0 s& C, t( g1 A- Z( V                        if Row = -1 then -- since 70. \: @( `* T3 b& i
                                if lan=1 then
( n) n8 y* \  r! T3 f                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 i( B1 X0 b" M, N                                                to_str("in der Andockstation: \"",?.~.name,"\""));
( G. O4 F+ A! F  h3 A7 `$ s4 D8 W                                else8 Q  A7 d: L  m: l  f) _
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 q2 w) B- y( u& _                                                to_str("in docking station: \"",?.~.name,"\""));                               
  v* P: N- D3 R                                end;$ f1 K& _  e% ~+ r  h: I5 R' V
                        else
; S# r% E- P0 y+ `& ~' e                                @.Destination := assignLObj[1,row];  N& ?- X* L# ^( ~/ y1 @
                        end;                       
5 x$ w% @8 p8 }8 J. d: Q! n                        newDirection(@);9 G" Q  N( S) ]4 w
                        @.HasOrder := true;
1 S2 I9 U2 ^% r* K& M, n& ]                end;
4 W( `/ J$ l) a0 r        end;
) A; k) h/ p7 r8 K3 mend;        -- of the method
, o& W& p' h( |. X
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
7 k7 r, }% |- c  L* J0 H' f8 [! b6 d1 f6 `# \$ H
这是AGV_putin中arrive的method。) l8 e' R  c# C3 B# B9 n

! N: s/ P8 S, T当到达物料速度越高时,这个报警更多,: ~4 C  J4 f% e4 z0 C! }
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。! M0 e7 j! ]& ^' ?# d+ w
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?3 b; {, I8 D+ }+ X( J8 N
" N, G$ X$ y  M2 r$ V6 R% U
另外一个小建议,就是move,所有的move都可以这样
6 ~3 p+ A+ R; Z+ [1 V7 aif not move() then debug end. x5 W! H2 J7 o( |) q# v
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 K4 D( Z2 z4 I. c" M$ ]
plant simulation中的free libraries有AGV模板,
8 O2 ^/ t- g- a里面也有案例。! B0 O$ n/ T1 D+ g) i/ p
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
' B- H$ w( ^# ~; g2 Z8 ~; H& \: d4 L2 f3 c4 Q/ s
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
* c3 E- N/ @8 N/ e$ I3 {, o) N+ t. K: x( _# p
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 . d  ]% g9 Q3 j
这是AGV_putin中arrive的method。
( w! Y2 s/ i4 y% q9 `( W' d' b" |' a9 Y
当到达物料速度越高时,这个报警更多,
) ~. w6 R8 e) s9 k, \! u
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-16 02:38 , Processed in 0.020902 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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