设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6935|回复: 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'
) J( f2 @% D& R*// F2 N+ i: H# p
is( F( ~: G! J3 c5 [/ O' K  e
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 _+ q5 y* b+ H; V4 G& j
do
6 C2 d2 P) a. @7 ~        Lan := rootfolder.Internal.Tools.AOLlanguage;6 N8 d7 v" `: `3 r4 w3 W% h
        if current = @.Destination -- else return
$ ~" y( r8 k) O/ b& V/ @        then; r% \$ g" R/ v7 N. _/ ?
                @.Destination := void;
, y& Z, Z8 |% Y, r8 X3 ?7 _                if @.occupied then2 S7 Y: d. y1 w$ j$ S2 q6 k; z9 s7 H* U
                        part := @.cont;9 L: T" c8 b1 A$ ]( t3 n+ v& ]
                        @.transpOrder := void;+ x9 n. G( {! L' h4 }/ X4 H
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ O2 d) a  k7 I/ V! H. W
                                @,root.eventcontroller.simTime);0 S* G6 B- p3 z0 L/ F  y7 r. d
                        @.HasOrder := false;3 G% o! p/ \1 S0 ]: O
                        @.DrivingHome := true;0 X9 }) o  q8 a! f% ^! x* ]
                        rgManager.tryToStartTransOrder;6 k7 ]! Q$ E9 C# O( [+ M
                        if @.Destination = void
& d  i1 x8 n$ Z# U2 a                        then -- no transport order for vehicle @
, u9 t* Q2 o5 A3 F; o! d) q: V                                @.Destination :=
& r" V  n( p! F: N                                rgManager.nearestFreeStation(@,track.~);: U8 B6 x' u  h* g/ b9 K
                                newDirection(@);   
$ N" s+ T% L$ [1 a/ g4 W0 l( ~                                if @.Destination /= void then4 n! M# Z/ Q6 ^8 E+ f
                                        @.Destination.NumReservation :=
9 j' r; K3 h# w. y                                        @.Destination.NumReservation + 1;" P% J) S/ s7 l% k
                                end;
$ h# L; l4 X! L" m) B" p9 }                                @.CurrIcon := "drivingHome";
% y5 y( U3 E1 z                                @.DrivingHome := true;- n! ?  d1 G6 K
                        end;% @6 ?' [9 D5 ~( j4 K. S
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. K0 p" T6 l/ w: i8 Q2 D" r                        part := @.transpOrder;/ o9 q$ w9 V: x' D4 E! c
                        part.move(@);-- load part
4 O, b1 c. }% \                        @.CurrIcon := "load";
' Z% \) B/ E8 O. j- N                        GlobalDistObj := part.globDestination;
. T" ]4 N; g$ @. [+ F4 D/ M4 _/ [                        assignLObj := rgmanager.rgAssignL;* N( j( s8 B6 \& u: \' U" q! _
                        row := assignLObj.getRowNo(GlobalDistObj);
- E, s/ v. ?$ x: v3 d( y3 A! o: I                        if Row = -1 then -- since 70% p% Z" t# Q6 `+ `
                                if lan=1 then# C5 b6 ]4 e) n& s" {/ |- ~1 B. A
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 Z9 m  D1 S* V4 D4 s" |. x; @
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
2 w6 B0 ~# j" @/ i6 l                                else: s+ ]" G, ~! a* g7 ?. r
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* n0 d2 J" Y8 ~5 |6 C1 m$ y5 l! ?, {                                                to_str("in docking station: \"",?.~.name,"\""));                               
3 C, ?# c# R- r; |5 d0 K( n                                end;
9 [: j# ]% l1 |) C                        else4 O3 X# G* {. U9 g/ x
                                @.Destination := assignLObj[1,row];* W1 f9 o2 L( D
                        end;                        - G* H9 \$ t+ S
                        newDirection(@);
5 q7 b" r" ~0 K8 Q& a4 `8 T9 P                        @.HasOrder := true;
# l" o& D; B! {" i6 ^                end;- u6 ]9 Y$ k# M8 x5 L! f
        end;( C$ V+ z1 C+ V  }
end;        -- of the method$ K2 T3 V1 c0 u
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
; ~$ N$ }- N. }8 k
  E! N) i6 S. s1 s) @这是AGV_putin中arrive的method。
) i6 s. v: v+ G: S3 S! N* N7 X7 t( K% _7 x' t
当到达物料速度越高时,这个报警更多,; w& ]: e" _; @- f! O8 L; O6 ^
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
$ `5 b) e9 o4 g$ B; p1 w9 d' N* y程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?8 C7 S2 Q# H- `. z' T
+ h* K( d7 ]9 u
另外一个小建议,就是move,所有的move都可以这样1 n% J, u* Y- o. Q) G! J
if not move() then debug end
( U" `2 \* Y9 B$ [! D这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
- a- B' o4 u# N; W5 x, R% e$ ?plant simulation中的free libraries有AGV模板,
% ]) s5 Z7 J: f4 Z4 Q. _里面也有案例。
! Q: n6 S& {! c  p0 ^* @我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ b3 R- k6 D7 l( H; N% F+ t4 W+ A1 G# f$ A
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 . e6 N3 c( I" q( m& \% x
! Z. Z% b" h4 O5 V; I, u
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 0 \3 l% d# i8 k; m' b
这是AGV_putin中arrive的method。  h( R$ ?; w6 h4 A
( o, j4 }, e: p) j6 A
当到达物料速度越高时,这个报警更多,
' p/ y% x8 l) M: z9 K
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-7 12:00 , Processed in 0.016867 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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