设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8729|回复: 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': ^+ O4 B  s6 j8 c% |
*/
1 y2 z* i4 V# n3 G; [  M1 X' eis
! w/ T& b8 n% L. `) o        part, GlobalDistObj, assignLObj:object;row,Lan:integer;- L  u. S/ c+ |
do
6 B* y9 ^0 {, F  h        Lan := rootfolder.Internal.Tools.AOLlanguage;
+ P+ u$ d/ E* [+ r4 a9 H        if current = @.Destination -- else return3 u9 y; s6 R0 g& ^
        then
/ G8 p0 N7 q- E9 x( Z2 J: @- K% q; I                @.Destination := void;
5 |- S' h( l1 `3 x6 I1 n                if @.occupied then. D! M6 A+ }# E# O% W$ ]
                        part := @.cont;
! k$ f6 p3 E8 p4 M                        @.transpOrder := void;- d8 b5 v  G; j. v( l% ]9 F
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 p3 P- q. w7 ]
                                @,root.eventcontroller.simTime);
/ g. d6 l2 X1 J  g" `3 x- @4 _1 K& x                        @.HasOrder := false;
- d; c3 n$ G" m3 h: Y' D) n0 ~2 e' U                        @.DrivingHome := true;5 d/ t, b1 T; Y' }; M
                        rgManager.tryToStartTransOrder;: g; l8 [  A# I- F4 z- @& Q
                        if @.Destination = void2 u6 R- j$ H! E* Q8 C! T* I
                        then -- no transport order for vehicle @
: j& s2 C5 t& ^6 Y5 b                                @.Destination :=
5 N# U8 R- m4 e7 Z. H$ W                                rgManager.nearestFreeStation(@,track.~);- M5 `7 c+ [9 g6 ^5 f, q
                                newDirection(@);   ( T  X. w1 i2 @4 w7 c
                                if @.Destination /= void then
1 \+ \& w" i5 ?6 P- l) ?; J' j                                        @.Destination.NumReservation :=8 ^& w; p1 Y/ M" E
                                        @.Destination.NumReservation + 1;
. N3 ], v' d6 J. f                                end;2 V5 k. y( @$ p5 ~& ]7 t5 W$ Y
                                @.CurrIcon := "drivingHome";
) s" w6 }' e& H+ |5 r4 \% l8 K                                @.DrivingHome := true;
0 A; b) ~5 t2 o2 \2 Y6 P  o% t0 \                        end;
! H, X# [% F5 E8 }                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! X( Y6 F, W8 P/ P: u0 R                        part := @.transpOrder;
# ~' j' r8 o+ T" H+ Z; p, O' Z                        part.move(@);-- load part! e1 S6 v0 J% z! i3 b7 F/ G
                        @.CurrIcon := "load";
6 j/ r" K/ J* f6 s  O0 Z                        GlobalDistObj := part.globDestination;
' N$ t9 N$ B% n  L7 L3 X# X! e( ~! g                        assignLObj := rgmanager.rgAssignL;
" L" @  K& t( M: y                        row := assignLObj.getRowNo(GlobalDistObj);
  |4 m' e; S' ~) x7 X! n) g                        if Row = -1 then -- since 70
( U0 d% p5 j6 O! e                                if lan=1 then
4 j6 ]% h' q7 t$ ^+ G1 A) g                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* C6 X; K9 C6 @# x
                                                to_str("in der Andockstation: \"",?.~.name,"\""));* y: y3 n8 r7 w$ C2 `3 C
                                else( w" |2 o- z  T5 {: K5 \
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( _" |/ ^& c& [9 D0 `
                                                to_str("in docking station: \"",?.~.name,"\""));                                1 d. W& ?- v9 S6 z; M$ l; T6 A
                                end;( G0 x7 v5 n4 e. B3 \4 V& {4 v
                        else
! |" L/ I' o+ x& l5 B* @; F                                @.Destination := assignLObj[1,row];( |9 M& }+ [9 [5 T$ M' ^
                        end;                       
# a' _( W; l. q' n  W  M, B9 c                        newDirection(@);7 ~  H1 F0 y, P# J5 T5 q6 E# F
                        @.HasOrder := true;: q, h" ~, {0 Q5 Z6 e5 v7 V/ s
                end;
# Y! E2 A6 z4 v' ^! ^/ n( d        end;
, `5 T) ~& ~! w2 ?- X5 }end;        -- of the method
+ D1 y+ J: x! ]+ `& s% i0 v) I7 q
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ L. _, Y4 d7 H: Z# a) N1 Z5 [5 `2 i+ W5 p/ Z: N0 B2 R
这是AGV_putin中arrive的method。" g" b; p8 J7 U' g  h2 ~" b$ z

! D6 p0 a* t5 w$ a" U$ ?% h当到达物料速度越高时,这个报警更多,; q/ y. h) J$ |0 l
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。# E; e5 t8 ~$ r+ t/ R. P
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?- {8 i1 J& E0 k+ ~7 G3 w8 f# U

; c# t! O" q# T0 v另外一个小建议,就是move,所有的move都可以这样. e9 c# \6 I/ h$ C! G
if not move() then debug end1 E0 b  t/ L1 v
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# v6 w: N0 |6 b' b
plant simulation中的free libraries有AGV模板,7 F: ?( L/ V  C6 V3 L3 b
里面也有案例。
* P2 z, s7 K( I' x我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。7 N8 N6 t; j( |- e) h

0 h; S0 A: t; i) e$ }9 H9 M4 f我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 5 i! F# L/ W& x  I
  ?+ f3 o: Z( h0 G- T2 O
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 * B7 x8 o- g2 u: R
这是AGV_putin中arrive的method。
. ~4 A5 x9 |  `* U: b: P; F! V- W" b
/ j  p- W) W' ]2 p1 W8 ]' A- J- y当到达物料速度越高时,这个报警更多,
" U7 ~8 f* z3 N6 i
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-22 23:26 , Processed in 0.017085 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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