设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7563|回复: 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'( t/ x  y1 j* g3 q& F' [+ S# U
*/
' \- a0 Z1 Z; d  y) Tis) Q+ h5 F" g7 H5 m9 `
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, u  Y4 H' G, }# i5 K+ M( Gdo
* e4 S6 P5 P4 |# n6 w        Lan := rootfolder.Internal.Tools.AOLlanguage;2 }* Z9 i, A9 A7 L: S
        if current = @.Destination -- else return3 Z( E9 a7 r9 o
        then
; {; F( A5 f5 q$ \# O                @.Destination := void;
/ J7 F) G% |6 d0 N  [. d% M$ u3 w                if @.occupied then
0 M$ Y; ^3 b; {* v) i; {& {& q                        part := @.cont;
) G7 K' {: q3 G& r3 F                        @.transpOrder := void;9 P4 p# a. |7 ?2 k% p. }  n3 l- g5 ^+ C
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 j* u4 c# Q' X) d. p                                @,root.eventcontroller.simTime);
! b/ P2 o, ~# o3 V3 e. _                        @.HasOrder := false;
5 u, j( Q. x& ]. C                        @.DrivingHome := true;
2 r8 b% B  Y" U# x6 @+ J                        rgManager.tryToStartTransOrder;3 u" V! {0 m* L6 V1 p' {
                        if @.Destination = void
5 q" Z+ k' u6 |1 C) q! ^                        then -- no transport order for vehicle @
9 q4 i; E" z: w& w% ]3 |8 A: ~                                @.Destination :=, x  l: @8 z) T
                                rgManager.nearestFreeStation(@,track.~);
0 ]5 Z9 A4 y1 a( _6 R$ M/ j6 V                                newDirection(@);   / M2 L5 U, p3 M
                                if @.Destination /= void then
1 r* P; c0 \$ k( e; W$ j7 l/ A                                        @.Destination.NumReservation :=
" e$ L; t& g) G# H                                        @.Destination.NumReservation + 1;
* H  w7 |: J, N* S; c0 t" {                                end;
+ ]; U, P; Y& I$ a( j                                @.CurrIcon := "drivingHome";
5 D" m2 ^% i1 [+ I+ q5 i: r                                @.DrivingHome := true;: v9 P/ Y5 R; L5 o& q7 e5 f
                        end;
$ a0 j$ r; x5 D8 Z3 N0 }0 ]                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" R* a4 M- X* i( d- l                        part := @.transpOrder;
- N" a* l' U# M5 Z                        part.move(@);-- load part' L8 y. F  K8 J7 ]5 Q6 t$ @* O2 C
                        @.CurrIcon := "load";- p# f1 U7 |. n; w0 |6 }
                        GlobalDistObj := part.globDestination;% D4 ^& B# b' w3 e9 J
                        assignLObj := rgmanager.rgAssignL;& }9 n0 Y" `* U' ?) O6 f, y; r
                        row := assignLObj.getRowNo(GlobalDistObj);
" y, @" s; _7 M/ P4 o                        if Row = -1 then -- since 70
. v. j1 j* E* H8 N$ p                                if lan=1 then: F- Y. Q! d  V8 r
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),/ S7 s" b& G3 ^
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' v" ^* k# C; ^7 _8 f& X% b7 }                                else( ^/ k0 L% k' j+ y" q5 r8 b
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* r7 B. A: e5 z5 w# ^
                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 \2 a+ F1 V  t                                end;) x/ ^9 F2 R, Y, \% V+ }5 P
                        else; Q1 q4 v2 L  |# Z
                                @.Destination := assignLObj[1,row];
% x- k( L/ i9 g' p9 I* C% u& t                        end;                        $ V, I7 Y' k! p: L
                        newDirection(@);) \9 f" m% r& q3 J
                        @.HasOrder := true;/ R5 G+ i# r# E, v/ ]
                end;
& }% }) O3 o! f, e        end;
& F9 \; X5 u. y! }end;        -- of the method
( |# ~) _7 l. t
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * u) }6 f8 J/ j: S1 o
% A5 h' H. w7 e3 S
这是AGV_putin中arrive的method。
  w: l6 M2 W$ M* T0 g* T
* f% \8 j( ?; k5 Z- \. `8 D当到达物料速度越高时,这个报警更多,; ~; j& s1 A- n4 \) f, t
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。3 l5 {1 j; U9 c& l
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
, R/ s1 R4 R8 M* F5 t  w; E  }" g' Q* o0 T, r# G
另外一个小建议,就是move,所有的move都可以这样
; V& C) i9 @0 {4 C# Y7 H  Cif not move() then debug end
- M. G3 f3 a5 ?这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。9 T' K9 v# i. b5 h5 e3 Q: h5 p
plant simulation中的free libraries有AGV模板,
5 `0 e: V5 f, x; \* {里面也有案例。
9 n. S8 R8 q2 e3 Q9 ?1 U我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ O5 z* K( D) S. I- i7 ~
& }5 b4 e! Z) y3 U' J  s
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ' r) p9 x4 \" b: _, e0 Q

0 C! a! C3 |/ r: }0 v# K# g# d那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 , W4 M' V/ W3 T  X/ P1 @% a
这是AGV_putin中arrive的method。
9 z  e6 e  h, D& t% r) q( k2 A) Y" G1 y
当到达物料速度越高时,这个报警更多,

6 Y. k- H- T$ w. C8 _. e! I1 W1 {另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-17 22:01 , Processed in 0.019484 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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