设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3904|回复: 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'
! p. L5 H4 E: ~' |. M*/7 D( [/ r) B4 `
is- y+ i! |( u8 L. s$ v" A/ v; y  o
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;( u" M8 b# g% i) f: F- z
do2 I0 n8 G; d3 R0 c; e. w4 k
        Lan := rootfolder.Internal.Tools.AOLlanguage;
' Y! Z) j7 Z6 J3 a9 j: o        if current = @.Destination -- else return/ w8 V& Q7 S) u7 [2 Q
        then
& [! j% H4 @9 {  h/ D                @.Destination := void;
9 P3 P* _0 f# z  v+ s% v                if @.occupied then
3 x( S, M3 G( A) x% k                        part := @.cont;
$ \# L9 P" A$ V5 B                        @.transpOrder := void;3 ^% A2 Y$ v7 {- \' Y- O
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 g2 b& W8 r* ^: F" U3 X- w
                                @,root.eventcontroller.simTime);
+ I% g; W* X: ^! }  c# y2 d0 A                        @.HasOrder := false;
; d5 \; S+ l6 C( T1 R                        @.DrivingHome := true;  _/ C1 `' _- l8 n8 r; |- Z
                        rgManager.tryToStartTransOrder;  h& R8 p  ~# `' u  b6 v; t
                        if @.Destination = void& g5 V. k* j1 i' y7 r1 c% \
                        then -- no transport order for vehicle @
' _  ~% h9 b6 C2 ?                                @.Destination :=/ D1 }- p& w$ N  ]3 Y
                                rgManager.nearestFreeStation(@,track.~);$ d1 Q9 n, G) A+ v& J2 w
                                newDirection(@);   
' P% u1 H0 }! A! q3 N5 {' G                                if @.Destination /= void then0 U3 T" y; X5 O, f; `0 P
                                        @.Destination.NumReservation :=
3 d4 ^  i9 w. w  x9 v                                        @.Destination.NumReservation + 1;' o9 P# a7 c, `) L4 V
                                end;  D3 c% V) u7 [( F' o& W" N: `% \) L% P# D
                                @.CurrIcon := "drivingHome";
% L: O$ _0 z5 y1 `/ f0 D                                @.DrivingHome := true;
9 Q2 H/ |! \* @& ~; K/ T3 {3 K                        end;' O; `0 t& `1 [8 ~7 O- z
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ K6 q& y3 C  d: c/ f5 r
                        part := @.transpOrder;
3 J- B+ f+ E6 I( V! n                        part.move(@);-- load part& s, Y5 s: [- J3 Y/ s, d8 F! C
                        @.CurrIcon := "load";
1 m1 D! I+ N0 @                        GlobalDistObj := part.globDestination;
# }( v7 F6 y( |4 X/ T- c$ l1 o: K                        assignLObj := rgmanager.rgAssignL;
: \; |- C* c5 [+ B0 S                        row := assignLObj.getRowNo(GlobalDistObj);6 X  C. r$ O/ y# d+ u5 M
                        if Row = -1 then -- since 70
+ u  [: a  c5 r; U5 i" b4 G4 I  r( S                                if lan=1 then1 |& `' X' j/ [: P7 T
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' v! |  O* l2 t, l
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
8 r& G) p* f) I/ A1 k                                else
' A7 V; R. @  O$ O7 c3 D6 g# F" M                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* @# l! L$ I9 s/ n9 w: m, ~1 A
                                                to_str("in docking station: \"",?.~.name,"\""));                                + s; b% a8 N7 m
                                end;
; ~* X$ m( C( B% A/ E; \                        else/ O+ i' I2 {' k- Z" ?& `0 C
                                @.Destination := assignLObj[1,row];! V( Y9 ]- `4 c* X- [
                        end;                        ' `% ^6 s+ l$ ]- g- T& Y* k' O
                        newDirection(@);
( X  \  R: x' q4 R                        @.HasOrder := true;1 _3 s; D( H4 u% a. N8 f
                end;0 m, @( q- M" j$ Z. j& Q. \
        end;' ]. R5 K  e: X
end;        -- of the method
$ E4 c; o2 Y- X9 I3 x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
  [0 R, E6 a+ J3 G/ ^5 X: p6 O: K' a: Y( w$ r4 h: Y
这是AGV_putin中arrive的method。" i  @: n6 t6 m7 J) e0 L

; m  \( Y6 R0 n6 z+ m8 S当到达物料速度越高时,这个报警更多,6 R9 m" \7 p; d3 g! o* A5 C1 U
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
7 K, m. N- p3 Z  r* g: I4 c程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
% _% [$ z% `& ~# ~$ G  s+ S
. ]' y6 T# R5 J8 j% H/ H5 P另外一个小建议,就是move,所有的move都可以这样
; B: q+ R. F. A1 ?; rif not move() then debug end" g0 n& B! F/ Q7 u! H
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。+ x5 Z2 v5 c4 [" a
plant simulation中的free libraries有AGV模板,! X0 g# J- F+ a& q
里面也有案例。+ ?+ r' E" R, q
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。  h. J: a, Q+ E

0 @# g/ k+ D+ r# _( y/ z我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
$ R- x7 I" w+ i6 c- Q
) _2 j/ S" A8 G' d- O那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 + t0 e. N/ l# k) k' E" q7 a' i
这是AGV_putin中arrive的method。0 W& \  r' r+ a/ }5 j6 L
' }4 f( V5 C  e0 U
当到达物料速度越高时,这个报警更多,
1 {7 j$ G1 e  F: _- h- M
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-2-2 20:48 , Processed in 0.288783 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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