设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8795|回复: 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') f9 O- c$ I( d5 G' G! l$ t2 ?+ X
*/
8 l  _$ h- B9 Yis
1 y! @8 u" D9 v9 m) |3 u        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! t" `" O# u0 }3 B7 |do
9 }; {) R3 i: _4 X  J        Lan := rootfolder.Internal.Tools.AOLlanguage;
; t- ~# y) i* m9 Z+ O' s        if current = @.Destination -- else return
* {8 G% f) p1 M3 I        then$ f" w- K" I5 U* H
                @.Destination := void;8 r' F7 j* Z- x% S8 _2 }/ Z) r+ |; A
                if @.occupied then7 @' u& e+ O; I$ q
                        part := @.cont;
3 r: Z$ y! g$ O" {, q                        @.transpOrder := void;8 q+ ^% @! E6 v, l. ?! L" K
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" Q# t. o+ c6 i7 s  ^                                @,root.eventcontroller.simTime);
) z) R7 T, n7 o$ M+ n                        @.HasOrder := false;; }% p" J% q1 A
                        @.DrivingHome := true;) }4 Z/ R7 f' X1 t
                        rgManager.tryToStartTransOrder;3 v/ S8 i0 a9 v& p
                        if @.Destination = void( q% I# u  y' d( r2 S8 R$ ~3 V1 e
                        then -- no transport order for vehicle @) V# f9 j9 _: J' ]" h6 j. Q& B' e
                                @.Destination :=
/ I( Y: o6 M8 X6 n+ O  {                                rgManager.nearestFreeStation(@,track.~);$ d; \) V( g  ]  {- i
                                newDirection(@);   $ O5 U0 `4 R+ O' E" {4 X' A/ F
                                if @.Destination /= void then
" t' h1 O( k1 x) B0 m/ _                                        @.Destination.NumReservation :=0 q# O  `+ f0 Z9 [# V1 O* L* E
                                        @.Destination.NumReservation + 1;
" @: x( f  U: \" u/ [$ Z+ p                                end;
" S: S6 x- U. v+ [0 `  k2 j/ Q                                @.CurrIcon := "drivingHome";
: }0 `% A" E, ^2 Y& ^- q/ R4 q2 s) U                                @.DrivingHome := true;9 c3 T& j/ z. P1 _9 ~$ V
                        end;! x& N+ @; O% |  _" _0 F: b* @
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% f  f& e2 R5 Q! Z0 O2 J) I' Y                        part := @.transpOrder;7 E5 P1 c! {/ ?' U1 ?% G+ a2 S
                        part.move(@);-- load part/ h- b. P- a6 l. u9 E9 \& T
                        @.CurrIcon := "load";
3 Z  B( f0 K+ I& H/ u/ z6 s                        GlobalDistObj := part.globDestination;3 c9 h) Z8 X" m5 P3 z/ h' U3 W
                        assignLObj := rgmanager.rgAssignL;9 ^. \( a" X2 n( b* l7 N( `% m
                        row := assignLObj.getRowNo(GlobalDistObj);! u0 ]: n8 |+ e
                        if Row = -1 then -- since 70( |3 p5 g1 K4 c' J4 T
                                if lan=1 then
6 `) G2 {; T  J7 ]5 [; w                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' _1 m, e, S+ U( R' `5 m2 O# z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));4 L6 u; A; @# I2 f# |/ p
                                else
; m  Z* ^. A1 `                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 o. b$ H# D; X+ |9 O! m' x                                                to_str("in docking station: \"",?.~.name,"\""));                                $ d" l+ H: n# T4 U2 c' v' M
                                end;7 N6 I& ?7 Q! X5 E5 q
                        else
, Z  |) m: ?3 j                                @.Destination := assignLObj[1,row];* j5 ]; O) c/ B5 L/ M& D
                        end;                        1 z+ u4 Q; ~7 j; i7 l$ w+ T, y  I6 C
                        newDirection(@);
/ R7 S( o" n) R% u$ N4 _: \) ^                        @.HasOrder := true;
# w9 L0 e( F$ ~$ i& _                end;
- t. R- ^' [: i4 n( v2 H. U; x        end;7 U0 B3 r* N3 r3 {  P( B  Z0 {
end;        -- of the method4 N9 Q) i2 l9 @- F; v. }! W) K* p
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 6 q( @; o" L3 e% e1 z: c# V. X

1 h) }9 L" A  d7 F- [7 M# F7 o这是AGV_putin中arrive的method。9 }. i" M8 h8 y$ r4 q9 k
8 f6 `2 p1 N" }  j/ a& j
当到达物料速度越高时,这个报警更多,
  i! @7 P5 q  x5 p7 [5 w( C可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ k9 @9 F* O, P; i3 L5 c: N
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?/ e! G3 ?! p. Q, @
. [. J, B* k  Z8 c" p( [
另外一个小建议,就是move,所有的move都可以这样
6 ^% W- x. l. t) z4 ^# lif not move() then debug end
( E& \& u+ z/ u$ l! K这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
/ o. P4 O6 J6 @* l* N7 mplant simulation中的free libraries有AGV模板,
# q- |  H9 b; r, o6 B里面也有案例。4 f  X" R# O7 L0 U! @0 A" P
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。8 a$ w$ [( u9 X
$ ]! H. C% v2 a, E2 ~8 |& v+ Q" V
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
) m* r: o1 D' y; Z2 ]8 e# \& n) N1 m  {- a
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 3 f+ ~9 s, K& W% f
这是AGV_putin中arrive的method。2 V$ P: T/ p  Y2 X' u/ C

0 r1 y  c9 K8 y; w4 ?  z当到达物料速度越高时,这个报警更多,

% s" q1 `1 p- I另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-26 16:46 , Processed in 0.015425 second(s), 14 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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