设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7434|回复: 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'' a$ O! C* ]  s' N
*/
6 K: c6 E* K# U8 yis0 X4 D. t$ p; y
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;; h/ f: o" h9 X" B7 J
do
' K# @; @7 `. z" ?; I5 y) o        Lan := rootfolder.Internal.Tools.AOLlanguage;$ o1 {! \6 c4 {, Z
        if current = @.Destination -- else return
# O( ^$ q1 Y) R' Z0 i        then
) z+ v( C: Y+ Q: k; e- W  X6 T                @.Destination := void;# K8 [1 U& l! F) l7 X
                if @.occupied then
7 d6 k: B7 x. G1 M- ^7 R                        part := @.cont;
+ f: [" n4 `9 A  P" O2 H: }+ B6 x                        @.transpOrder := void;
* K: \5 w. m( \6 U$ |" u! p0 P- c                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
  n( f! U' @% }# U) \  s$ e& Y                                @,root.eventcontroller.simTime);
+ x6 c& L( h8 R9 K2 @) E# @                        @.HasOrder := false;1 I+ `. P! @  ^5 p3 n. b1 A9 l  D
                        @.DrivingHome := true;
/ `4 k* `4 f9 W, B1 |# D0 L                        rgManager.tryToStartTransOrder;
  w' X7 q# d! t/ N$ A1 n                        if @.Destination = void
! s. x. [. K) d2 c                        then -- no transport order for vehicle @
4 R0 j4 V$ ~' |' F# k                                @.Destination :=
/ X& U" F7 x+ A, ]. h" ?. }                                rgManager.nearestFreeStation(@,track.~);
$ N0 G& @" s1 I9 v% s' X* t8 x; {" j                                newDirection(@);   
4 ?* h, a8 v+ Z  H" i' z                                if @.Destination /= void then+ E  Z* |/ W3 _2 z8 @& p9 q
                                        @.Destination.NumReservation :=
7 F6 r4 O0 o$ }0 T/ {                                        @.Destination.NumReservation + 1;
- s8 N3 b, g4 Q6 u9 h% `9 ^' C                                end;
  q. ^: g& P7 _; p% x( l; J                                @.CurrIcon := "drivingHome";
$ `3 R/ K# y3 M: {                                @.DrivingHome := true;
, P5 w1 S: i; Y+ ^                        end;* H' ?# U& g# s9 L8 W9 G
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" X; A; P5 g" l$ ], o6 V                        part := @.transpOrder;
3 {+ |3 a4 E: }8 ^) m                        part.move(@);-- load part- l% G, `4 q! h! n, b, H% R( P
                        @.CurrIcon := "load";- R. e3 ?! C! C' E/ W
                        GlobalDistObj := part.globDestination;" @8 v6 O: m8 [* u+ V
                        assignLObj := rgmanager.rgAssignL;' w! J) y( a5 O; P/ M" ]
                        row := assignLObj.getRowNo(GlobalDistObj);, n) O9 F, v1 q5 B5 Z% w
                        if Row = -1 then -- since 70
4 g- s, F, C3 @                                if lan=1 then
' ^4 h$ O. M4 F6 F1 e                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ K7 k  [/ h" u9 e                                                to_str("in der Andockstation: \"",?.~.name,"\""));; Q) W3 T% |+ q  S3 O) W
                                else
0 ~4 r1 p" |8 a( K" }6 \                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' `+ {, \; f7 F) k/ ^( e9 V                                                to_str("in docking station: \"",?.~.name,"\""));                                * j1 l/ k0 t) d, w
                                end;
9 X6 i8 j8 h( M5 i. s                        else1 Q+ d- _5 p9 I
                                @.Destination := assignLObj[1,row];6 S3 E; a6 S7 b
                        end;                        3 `& I3 T! n7 n& }( l" Y; @
                        newDirection(@);/ l, U: S- `( d
                        @.HasOrder := true;: O% C4 }6 d; C. i8 Y. w
                end;. Y% J. Z" P; G( @
        end;8 Y4 a7 S& p0 t8 {
end;        -- of the method
) W7 u( J, H8 Z
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 * z: T# f' l, {8 Z2 }3 D

0 L; ?# s' I" ]$ q( @  ?这是AGV_putin中arrive的method。/ w3 N- y0 ^" c

7 A( k8 @1 u% v3 p7 ~$ y5 P" ?4 G7 S当到达物料速度越高时,这个报警更多,+ K% I' j- T1 M' j# [8 e
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。1 |+ V' `, r3 `# v
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
3 q) s$ i! E( y4 N! m: L
+ D1 e. S2 ?7 G. ]5 u3 j另外一个小建议,就是move,所有的move都可以这样3 M4 H- I2 g: ^& }6 Z  }
if not move() then debug end
& U1 `, F+ N9 p# ^这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
( O; m- x9 h* \: Y5 _2 N0 \plant simulation中的free libraries有AGV模板,. R7 u. [; t# v/ O
里面也有案例。! }0 {8 n$ [$ H! d% N6 `* ?, T
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
0 h/ X/ Q) P6 V/ U* J
* c& D) n8 T& K% |* R1 S8 ^我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ! z5 D. ~! d3 F% ]! E4 Z8 N6 c: Q

* P( W& q" E, f7 T% `6 W, O那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
* V- X% \- F8 q9 |2 _  x这是AGV_putin中arrive的method。+ w% f# m: B9 o" y9 G
( Z2 x7 A! m: @+ W, W
当到达物料速度越高时,这个报警更多,

/ [% q# E- z4 p/ s- ]8 W0 B另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-11 04:55 , Processed in 0.029655 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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