设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9202|回复: 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'
$ g: o  F5 k$ t! d' N7 o*// k7 |3 E4 h( e
is
8 z1 J2 W1 b  h9 V# n, M/ z        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; V/ F6 A+ J& r5 G, Kdo
# u0 K, b& a2 K* m1 i9 i: Y        Lan := rootfolder.Internal.Tools.AOLlanguage;
  d' u* b" y7 j4 J+ L        if current = @.Destination -- else return
1 {& |. @$ O; N  d        then& v' ?; `3 y5 c9 l
                @.Destination := void;. ], `/ m: d' r
                if @.occupied then6 u& V1 @6 X8 `6 n! P/ i1 L
                        part := @.cont;
: S6 _6 v0 Z- U9 c: Z1 s' X+ P( {                        @.transpOrder := void;
1 D. v2 u$ h# d' l2 w                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ Z) j9 J! D' H
                                @,root.eventcontroller.simTime);
( `6 e' d. z% _7 x# T$ \                        @.HasOrder := false;
, M2 d  u1 V! [- W6 p. z5 U9 V                        @.DrivingHome := true;; a  ?1 q+ z: I: O
                        rgManager.tryToStartTransOrder;- G0 @0 H! o: R  X* [% c
                        if @.Destination = void7 j8 d3 Y% Y% ~6 G+ }
                        then -- no transport order for vehicle @
# V# g4 m; Y: c2 x# B- u9 l                                @.Destination :=
; H2 b3 c+ M* |7 f! a( ]# \7 w                                rgManager.nearestFreeStation(@,track.~);
. z! g$ Y5 u# [                                newDirection(@);   % h4 g9 |5 r( c* ~( y  [  ^
                                if @.Destination /= void then
% i" q; u6 W6 M0 s                                        @.Destination.NumReservation :=! f0 Z. d' r4 i% l
                                        @.Destination.NumReservation + 1;6 v6 c/ m7 L) ?  @0 A/ m2 F- h
                                end;
* V$ _% ~- @/ i                                @.CurrIcon := "drivingHome";6 H* |8 ^7 q/ n; f' {4 ^
                                @.DrivingHome := true;
' @  W; Y4 W5 `! ~/ [! c0 Z1 \                        end;
7 _6 s6 @5 A- ]& n                else -- the vehicle @ is empty, both vehicle and part are in the same dock station  s0 v$ I1 Z) W5 {
                        part := @.transpOrder;
" R' r$ F; J7 |( M2 g. s2 `                        part.move(@);-- load part1 w, D$ X+ y- K6 ?; P0 B7 D
                        @.CurrIcon := "load";
7 q$ A- I* ^) H' b; i9 W0 h                        GlobalDistObj := part.globDestination;
* p; `9 H4 X8 j: w. I                        assignLObj := rgmanager.rgAssignL;" c9 v  |/ j2 p# W" c
                        row := assignLObj.getRowNo(GlobalDistObj);/ D$ Z2 y/ p7 E& W! a- \
                        if Row = -1 then -- since 70
: Q, j5 F! @8 s3 c# |5 ~" {7 G                                if lan=1 then
6 K1 Y$ s+ [* Q: }; j% W' ~0 Z$ D. G                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," V  }  h. g1 m. W1 H
                                                to_str("in der Andockstation: \"",?.~.name,"\""));
" Z; n$ y* Z1 R5 A. s9 C# r5 _                                else
0 a+ h& F+ U0 M. ]$ y3 H                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 j' ~1 K% P" g
                                                to_str("in docking station: \"",?.~.name,"\""));                                ' ^% \. ?1 ]" N) b; [+ F" Z2 b1 s
                                end;
' _$ P2 H9 }: e+ A8 n                        else6 g7 U9 @, x0 L4 B9 q, N" {% S7 o
                                @.Destination := assignLObj[1,row];0 L% J7 Y7 j; S) y. M) \2 V
                        end;                       
$ l3 Q  C+ A" F- `& b                        newDirection(@);
4 v$ O' A: d1 g) F                        @.HasOrder := true;
3 g6 {& o, N- ?9 d9 ^+ S                end;
1 P7 b: [- U2 M        end;
4 H9 {/ b% n; _* R9 cend;        -- of the method
+ v+ e2 d& v2 O" A- x
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 5 Q2 w. L8 k' X; h0 v
/ w& u/ u0 E3 u& y  Y, `7 J% h
这是AGV_putin中arrive的method。4 S$ ?7 u/ V0 }, n7 T
! N6 k: v' g2 n6 p" l* R: c7 a
当到达物料速度越高时,这个报警更多,4 k. \# `5 W) P5 m- k
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。' c! N' G. b6 I$ |: l- L: b( p
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
- n8 D' V% z2 F" G
" O3 {1 y9 w! V, R另外一个小建议,就是move,所有的move都可以这样  h+ N0 ~3 D& R+ p3 w5 T- k+ `
if not move() then debug end; B$ F/ n7 b: F- N
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
3 e0 G8 y8 K4 Q( S3 Rplant simulation中的free libraries有AGV模板,
; f2 O7 _9 I/ j! T4 w里面也有案例。3 z  b6 `) R8 r0 g  }$ x6 ~. ^
我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。0 N( j) }8 Z& _7 i, Y
6 d0 H( `) j% l0 X; I7 W
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 # {1 V) F5 I$ a! h9 I  b
, V  C+ S+ n7 a, X
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 4 V1 Z& ?6 s4 E
这是AGV_putin中arrive的method。: q. f' W7 X% A" {. Y
' I" p6 ~+ z# S" U9 D
当到达物料速度越高时,这个报警更多,
8 i& {. C' ?4 D" R
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-19 02:42 , Processed in 0.015225 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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