设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9665|回复: 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'
" L9 z. _- k& u- I0 q2 P. }*/
; L+ j' x: N/ o. I% h  O. x( A* M: \& Kis
! M. F7 K5 a0 y& _  ~        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ F5 P( u; \' w, Y* I# |do1 y+ {2 N9 j# r+ o/ H  @, W# w8 c
        Lan := rootfolder.Internal.Tools.AOLlanguage;
" \: r. U0 q7 B! k: {) N% {" k        if current = @.Destination -- else return
' J6 K& b! j( a* J6 r0 N3 ^        then5 L2 r5 }5 l- ~: q: a% c
                @.Destination := void;
1 u/ Z2 m! @: j3 O" j: y                if @.occupied then+ m4 j( S* N( d1 f( Y- i0 ^( ~
                        part := @.cont;! t* g! c( V( D/ `' C
                        @.transpOrder := void;7 z+ ?# p+ T+ }
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! e" g0 }- i$ }5 m% H# c* [, C% \                                @,root.eventcontroller.simTime);
4 O2 x% _$ z& o. [                        @.HasOrder := false;
% @0 M. B6 K3 u- n, O                        @.DrivingHome := true;, ?: [3 [6 Z5 V( S$ i& J, }6 t
                        rgManager.tryToStartTransOrder;
" r  A+ }0 f% W8 i                        if @.Destination = void. B: X+ M# A/ g0 Y9 r
                        then -- no transport order for vehicle @
/ z) J5 l% X" {; c: A" x                                @.Destination :=6 @5 T1 ?# c5 o$ {+ T! a
                                rgManager.nearestFreeStation(@,track.~);' x% _% a( g( n; }$ j/ q
                                newDirection(@);   
' n, X% @4 S$ G7 G( b% V                                if @.Destination /= void then
5 u" P. |; J8 a3 b/ T9 V3 p' E6 Z9 X                                        @.Destination.NumReservation :=
7 ^/ B$ j" b6 R. z/ n  Z% ]4 }) g- ^                                        @.Destination.NumReservation + 1;+ O8 r% a3 |& p0 |: C6 Y8 C
                                end;% [$ P: C' P0 z% n7 R( b
                                @.CurrIcon := "drivingHome";
+ T( r" t) F/ C0 r                                @.DrivingHome := true;
: M5 S( K9 J2 U4 Z; ~% `. ?                        end;, \3 C3 B( F; ?3 H4 d8 `: y5 h7 W
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( m8 ]: a$ Z+ k                        part := @.transpOrder;' g. L1 j# Q1 h, B% J% ~. l1 b% y. t
                        part.move(@);-- load part
2 s8 }, A; S# A3 K% [1 l; T9 I% @; m9 H                        @.CurrIcon := "load";, r6 S; G$ C# g7 K3 ]
                        GlobalDistObj := part.globDestination;/ _; E1 m2 w( J7 F0 G; A8 m
                        assignLObj := rgmanager.rgAssignL;
3 E$ ]+ F2 d. e5 G2 E/ X                        row := assignLObj.getRowNo(GlobalDistObj);
) P) A4 J6 M) g3 j0 k) c$ N8 [                        if Row = -1 then -- since 70
. Q. R1 I+ f; r, ~1 i5 r                                if lan=1 then
  y. s$ H+ m* b5 l                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ \- D( {) C& z& [& p                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ K7 c# p8 o! f% A
                                else+ R$ H1 \8 h/ ~7 X( E" g( l
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 V* b! S& E; _- a2 e; p: J                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 c+ {* @+ `1 F+ e                                end;
$ [! e& M; N) ]! v7 S. [                        else: j; p( n* q/ g& k$ b- `& X
                                @.Destination := assignLObj[1,row];3 z( O& N7 H5 \) O
                        end;                       
/ D& h8 R# i) y$ M* V9 Q: m3 r                        newDirection(@);6 h7 V9 S' l$ O- v* v8 Y
                        @.HasOrder := true;: [2 `7 u8 r# |# _! F8 p
                end;8 i! A8 g$ w4 e' V- ]
        end;
1 q9 _3 h' I, V2 ^3 m& e/ Z% ?end;        -- of the method' W9 j8 O" \+ m: G" g/ X9 F6 e
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 - K% b$ j1 O- `# A
& a) S+ O; E& N' y. |# {: y* Q
这是AGV_putin中arrive的method。0 w& T' M, C" {4 f( h
$ L. i3 |& r: i5 K0 w# j) x/ |
当到达物料速度越高时,这个报警更多,$ A8 K6 Y# e" _2 b" B7 H
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。, B  r* K/ V) a9 g* C/ \9 ^1 f
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?: F  e8 ?* h# X( l7 y
2 a/ n: P( C! T. s! d! k
另外一个小建议,就是move,所有的move都可以这样1 p% r( e+ |# @
if not move() then debug end) c! t. f0 y  ]% C0 n
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。% |. v/ T7 x1 d/ M/ S2 U; a
plant simulation中的free libraries有AGV模板,! P+ s4 q& u3 ]& \( f0 B8 i
里面也有案例。
6 v' B9 @4 B' e" F我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
4 j4 c( ^8 D0 y' p
0 G( |3 \, t& ?& _我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 $ b% R7 d( }8 |6 ^
4 C. B$ X- k* a5 @) E/ [
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08   h( u. ~# B2 l5 e# i4 ^( U
这是AGV_putin中arrive的method。
' ?. _& o" }6 y- P6 I+ g/ R; y. h! q* ?/ ?
当到达物料速度越高时,这个报警更多,
- c) T: M: v7 |
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-15 19:56 , Processed in 0.017385 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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