设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9777|回复: 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'3 }3 h* N: f- \% x( `$ Q' V2 E% t  y2 K
*/
1 M) y& Z* {9 _+ A5 `is6 E; S5 E/ c5 W+ x) T8 y9 `8 d
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: r5 p6 _- e2 n8 f% |
do
- N7 ?! H+ K" i# O: [/ X: c        Lan := rootfolder.Internal.Tools.AOLlanguage;
- m4 w9 Y; P# G9 p) i3 b0 \        if current = @.Destination -- else return2 u5 b+ Q6 A5 `* |, U. H
        then7 @- S& p6 A' `2 X
                @.Destination := void;
! V1 a4 _. x+ M( m" n                if @.occupied then
, H) C4 L1 {4 W  \% l                        part := @.cont;
! V' `, u% r6 \& N                        @.transpOrder := void;
# P3 X  [3 T3 t7 ]5 F& q                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 ^* U4 \) ?% T/ d; D3 J5 t; T% ]5 k& D                                @,root.eventcontroller.simTime);3 L( L. G6 X+ F1 F; k+ T3 q$ s
                        @.HasOrder := false;
! K# W$ ?, N' Y: z                        @.DrivingHome := true;- s. h0 \/ I3 W: i5 \
                        rgManager.tryToStartTransOrder;+ [! g3 \/ t$ @2 z9 x
                        if @.Destination = void/ R: S* ]- K1 T/ W" A
                        then -- no transport order for vehicle @
- f. Y* K# j, ~9 v8 T                                @.Destination :=! y5 ~6 i- j, w( {9 Y
                                rgManager.nearestFreeStation(@,track.~);' K. T; y" X& `: D) q" O9 d7 ~
                                newDirection(@);   ; t# @2 k$ v- h* b1 W# C- ^; U& s
                                if @.Destination /= void then
/ S$ {( ?5 u$ m$ V) `# @/ D                                        @.Destination.NumReservation :=
- h5 ?& I" ~- q, L8 U                                        @.Destination.NumReservation + 1;5 s" f0 h1 l& J+ H
                                end;, a) ^% Y, `6 U! w( i' ]: y. T# }
                                @.CurrIcon := "drivingHome";5 k: V& Z4 C1 R1 d- C; A
                                @.DrivingHome := true;* Q3 `7 O" u" t/ C; r2 w
                        end;8 ~; c4 L# t1 v4 o# b3 K
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 q. f2 a* `$ C% f* U  l; B0 X                        part := @.transpOrder;9 P, N3 y; ~* U  ?7 P/ I" _
                        part.move(@);-- load part, ^& {+ X' C- C
                        @.CurrIcon := "load";' v7 g/ ?0 |0 t" c" o
                        GlobalDistObj := part.globDestination;2 @0 y& E* J5 [% K9 P* A, |
                        assignLObj := rgmanager.rgAssignL;( ]/ w( X" n+ m
                        row := assignLObj.getRowNo(GlobalDistObj);
7 d0 R( `8 l1 w6 X, W, Y6 |8 o                        if Row = -1 then -- since 70! o) i- F( d' R! B# o
                                if lan=1 then# Y$ q9 y% b' M7 N9 o7 d0 c: i" B
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 u5 x* [  `6 R' }" L                                                to_str("in der Andockstation: \"",?.~.name,"\""));0 h0 \9 a+ M8 y& b  y9 R
                                else% z$ m: p% k( C9 Y5 d: ?
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, h% b! j; s. M- j8 G5 I
                                                to_str("in docking station: \"",?.~.name,"\""));                                $ w* e" F' T4 g; S- `+ r9 z2 D4 u: E  V
                                end;  t* D, Z! ^' L  f* ?! h
                        else
$ U2 h2 A6 H7 B& M9 P9 h                                @.Destination := assignLObj[1,row];
* {5 v" d. T  d3 {: [5 I                        end;                        6 ~. v+ R5 ?1 ]* @
                        newDirection(@);
6 `+ ]' j$ B6 }& c, `                        @.HasOrder := true;
* H" {. g+ G( x: Y4 t                end;# M. n5 P! F8 P( @
        end;0 F0 {' ]8 z/ Y5 n4 D7 Q
end;        -- of the method
8 V2 S% ?: E# B. q9 b+ F
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 7 K2 q  C3 c2 @- V
2 k9 C* [! l3 \- a6 g: Z: U
这是AGV_putin中arrive的method。
/ A% T  W" G( }0 b. i
  H% _' Q% l8 w' |3 b当到达物料速度越高时,这个报警更多,
0 k/ |+ g5 Z; k; U) K, z" i可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。) q9 K& p. y: v0 b8 s# u
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?4 y  H+ U) _# z5 p: q, X& @1 u7 E* `

0 s% c* p  v" S% v5 x" @: T2 m另外一个小建议,就是move,所有的move都可以这样
0 ]# b+ x- ~5 m7 Wif not move() then debug end; D5 L6 }: d9 F: u. ?
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 [+ V9 y6 @' p2 E/ c4 O; K
plant simulation中的free libraries有AGV模板,( H5 t9 ^: m% H  }# L
里面也有案例。
- B0 x% n$ `# e& |! v! Z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( b* X+ |# U+ S( n
, [$ ~7 ~$ I: P" h' a8 O我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
9 ]6 B' b7 ]- w. P3 w5 ]$ G8 d' g+ w/ D8 v' r9 \9 r: ^
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
$ B4 U5 \" u. I; X7 K2 ~( n! O这是AGV_putin中arrive的method。
" j5 R9 _$ h- ~. [1 `6 V  \- c' a$ R  g
当到达物料速度越高时,这个报警更多,
; H6 ?' y# \# O* `: Z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-24 06:55 , Processed in 0.022502 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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