设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9383|回复: 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'
0 ^" Z9 i" v1 m+ X. b*/
" |# ^2 c! ^* m0 Y# {is! Z1 ]: g; D4 w
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 S; k: r2 D8 a; _, {7 b7 W) wdo
  R2 x& q1 q1 V5 g        Lan := rootfolder.Internal.Tools.AOLlanguage;
0 S9 S8 f, s9 e# ?        if current = @.Destination -- else return
# I: P6 E/ G& U# @1 G        then3 g0 l" P" `! q9 h) U6 T
                @.Destination := void;
5 V4 m1 M9 N! o8 z/ _0 O. `                if @.occupied then
7 U6 Q1 }$ C  M  I1 R& \, Z                        part := @.cont;
" M3 h1 m! W4 k, ?                        @.transpOrder := void;
4 J+ J! s% \0 I: i2 N- }. d                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" Z* _3 z! j% U( |0 W0 m                                @,root.eventcontroller.simTime);  ^0 ], [1 a+ [' n) i8 q6 m# {
                        @.HasOrder := false;8 M" k) \0 p$ M  ?
                        @.DrivingHome := true;0 c2 K$ l# O" E  N  o5 d
                        rgManager.tryToStartTransOrder;) i* h3 s7 @, a4 c$ g% m
                        if @.Destination = void
( x: `" s: L% C4 J- Z3 L                        then -- no transport order for vehicle @
; L" Q- v+ n1 B! U                                @.Destination :=# p- a& E% W1 w( a
                                rgManager.nearestFreeStation(@,track.~);; x$ `* n- u9 L+ @" ^
                                newDirection(@);   : l+ U0 ]7 N% `
                                if @.Destination /= void then6 Z& a( `$ z3 p
                                        @.Destination.NumReservation :=
# j0 x. C  \4 Z$ P6 Y% @                                        @.Destination.NumReservation + 1;" d6 R2 ]! c: `& {- `! p
                                end;
9 N5 U2 m+ P2 D( v& ]( L) Z                                @.CurrIcon := "drivingHome";
5 O9 w% a0 k3 L# c! f. ^( H# @                                @.DrivingHome := true;
# V7 x9 _" Z. d4 X; t# B4 F+ f; q                        end;
/ c$ W2 D) R0 [  \. V4 q( ^3 o                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: G# p0 D' @6 p                        part := @.transpOrder;3 F0 ]* c7 q) `: x
                        part.move(@);-- load part
; J- y1 @& ^5 y6 ^3 K' \                        @.CurrIcon := "load";$ b: @0 O. [7 b  o7 ?3 y5 u
                        GlobalDistObj := part.globDestination;
' @, D9 O% q1 {' ]& }& |                        assignLObj := rgmanager.rgAssignL;" p' e2 |: W* d. {4 d: L+ E; q/ U
                        row := assignLObj.getRowNo(GlobalDistObj);% [: {* V7 E8 X2 [2 x
                        if Row = -1 then -- since 70
& c$ r3 M. v8 A, h                                if lan=1 then+ w9 p, ~1 v+ \9 h9 Z
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 c% I' q  {" J8 G1 b% M6 h                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' `& n( s+ F" M1 K) z                                else
8 ]# s) w5 S  V. X! b0 h                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 U6 d$ h2 o% F6 f3 j: P  y+ I
                                                to_str("in docking station: \"",?.~.name,"\""));                               
8 i" M( n# r$ `- J0 Y  ?                                end;
2 h+ g! B) @- M9 V; O( `% q! E                        else1 o8 A! \1 o8 [  H# n8 j) b
                                @.Destination := assignLObj[1,row];
4 L4 w4 A5 F( C                        end;                       
6 z0 b  p, m4 u  H3 U2 j                        newDirection(@);
7 h: P) I6 c5 H                        @.HasOrder := true;! Z2 [$ v* n5 e2 M0 k0 j/ h
                end;1 s4 p$ F$ n! b" B% U
        end;1 S( W+ D$ w5 W! L
end;        -- of the method
3 \: `- T" x. X/ x1 w
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 0 ?4 \+ Z# O& x5 L! A* M

) D+ I  K7 z) Q5 k! w) Y$ p4 e这是AGV_putin中arrive的method。
! }4 l- i" `; ?6 t6 }+ B
% \. ]& ?6 M7 f& X. J" a+ J当到达物料速度越高时,这个报警更多,
. r" b+ B6 o  B3 M4 M9 f可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
5 l) @7 W( R% T$ G" K5 U程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
' J) ^: y! A1 p0 H) E
9 e+ Z  ], t0 H9 J- A) d0 s8 c另外一个小建议,就是move,所有的move都可以这样; Y' a1 H. _8 m2 _
if not move() then debug end1 W7 F0 ?2 D9 \; F7 j  P
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
7 t; r% E+ }- {6 B3 T" J$ yplant simulation中的free libraries有AGV模板,
- H1 V. {7 k/ ^4 a' {1 t" a里面也有案例。1 m% _( W% s% Q( K% ?+ v4 H$ s
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。3 O% S9 Y$ G$ O9 w9 b5 e1 d
! N! l" v4 x+ g# X5 Y
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 - S' Z2 g0 s0 e+ _  `

. j- i; P$ j  f# A那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ' E1 {' U/ f( M) X, W; V" t5 N+ p7 z
这是AGV_putin中arrive的method。, D8 t7 f  j% O5 N8 J) C
: H9 d; a3 E9 O( \4 {1 U* i
当到达物料速度越高时,这个报警更多,

5 I9 X5 l2 a# K另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-29 06:28 , Processed in 0.018363 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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