设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7355|回复: 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': q2 u- {5 P* {# U2 ]2 ^4 B1 P) K
*/
  u0 F  D, M3 q# C' ris3 O6 v2 v7 Y# \* S  h
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% {6 N5 X, ?0 i8 W8 Edo
* {: Z* D0 n! p1 [) A9 p        Lan := rootfolder.Internal.Tools.AOLlanguage;
! k3 ~6 _5 T- V. b3 ^+ S; ^' p        if current = @.Destination -- else return( }$ S/ @' Q' U
        then
1 d# t+ x( |7 l                @.Destination := void;% T! {) y/ Y/ l5 @& C
                if @.occupied then
% l' k1 o5 V6 i6 m* M0 w                        part := @.cont;" d6 C3 s0 _8 h3 ?3 l
                        @.transpOrder := void;
8 N: T3 G: }7 b  O! j                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ C2 R$ }; g( G6 O* r9 P
                                @,root.eventcontroller.simTime);
9 x: U" @+ [1 K: N                        @.HasOrder := false;5 L" }! t5 R3 a& k3 Q
                        @.DrivingHome := true;
' J6 M: r: c2 p6 W' C                        rgManager.tryToStartTransOrder;
( ?$ F8 z7 J2 s& L: _" |, {                        if @.Destination = void
! j: r4 o2 ~, \% j                        then -- no transport order for vehicle @* j- E* X# P$ n# g2 Q9 a" {
                                @.Destination :=( z6 h- X( b$ K! M
                                rgManager.nearestFreeStation(@,track.~);% D8 }8 v( }3 i$ U  U
                                newDirection(@);   
% \$ w0 ^* i" F. x' }( x: N+ H                                if @.Destination /= void then: j- x0 f" O9 P2 I/ B
                                        @.Destination.NumReservation :=
- u% X; h* B4 B$ Q9 R  J( k                                        @.Destination.NumReservation + 1;6 g' f; K! Z/ p( F  W# `
                                end;$ @) M  r' x% I- O1 B; i
                                @.CurrIcon := "drivingHome";
* S! W; V' j0 _3 x1 x, J                                @.DrivingHome := true;
0 C$ f- K6 N/ E* Q- G                        end;
% O/ z5 D' i* H" P                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 @2 P9 H5 m2 g8 R9 `7 F5 b+ o* t                        part := @.transpOrder;
* _! Q. b6 ]# J9 m& C                        part.move(@);-- load part
: r2 G) l3 }9 r, R( w                        @.CurrIcon := "load";
/ s2 ?8 ?! `5 K0 i  o/ k                        GlobalDistObj := part.globDestination;* p, O- e6 d5 H: c
                        assignLObj := rgmanager.rgAssignL;
  Q( m, x! b- T' S9 N2 K2 G1 o! l9 ^                        row := assignLObj.getRowNo(GlobalDistObj);
( ]/ ^8 L; V  `- B5 z. C2 ]                        if Row = -1 then -- since 70
/ e- F9 r7 _; H; A4 ?- v                                if lan=1 then  l% ]( B, `# d7 [: k2 H2 O; a3 Q' o! N
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) u* {8 p% q1 D$ F
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
7 C! N3 [6 S" S0 b  g                                else' i; R. }  t9 x6 `. W$ L. h
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 H7 [" ^1 A- _/ q& K" p# w                                                to_str("in docking station: \"",?.~.name,"\""));                                ; l2 \2 z" `" b' f
                                end;( v7 p. t& b/ I
                        else
* m- U0 U; D5 v  Z                                @.Destination := assignLObj[1,row];" \& A/ V( G+ J5 P' ~; A
                        end;                       
7 Z+ u2 ?' F4 Z+ n8 F                        newDirection(@);, D( e, ?6 J, |' U
                        @.HasOrder := true;
5 d* J6 [) V: [  W% y+ H                end;/ W+ ?% E/ R) }1 I4 n
        end;
5 X2 D! D  j% e$ _' ~0 f4 Uend;        -- of the method
) C7 A* ]* }6 o# R) f
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
- }5 M! c; o0 U9 w) w- I7 Y# L0 D5 V" Y) U( r3 \2 X
这是AGV_putin中arrive的method。
7 C& C; q+ P7 @
8 p" F  Q4 T- d4 _% F* P当到达物料速度越高时,这个报警更多,/ ]6 ^% _" @; S1 D
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。( h' t5 m# l6 H
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?6 ?/ m- m) N8 d3 a6 A# }0 \& G

  @  X& N. p! h- b/ [& i另外一个小建议,就是move,所有的move都可以这样
* C5 A) [' O# G' u& _1 S/ ~if not move() then debug end$ l1 r; v; u' W) R) S
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。/ p) o. M8 Z  I1 L9 i3 \
plant simulation中的free libraries有AGV模板,- s; M1 V6 |9 g/ d+ A/ g
里面也有案例。* n; @: l; `3 M) `  l
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
+ M9 f* ^' w6 g7 }) I( F: k  m! n8 U$ h2 z! \3 U
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
/ O4 v- p- p: v$ b7 g$ L% V! g: R3 Y2 p4 f/ j, I9 F; W- t
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
3 h# O1 T) p* o4 p! _) [这是AGV_putin中arrive的method。# G& z3 v+ r6 C

/ C% f- M5 `9 r5 s当到达物料速度越高时,这个报警更多,
# \" y: G, v* F. X
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-6 14:01 , Processed in 0.024484 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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