设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6609|回复: 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'7 p8 C8 @  S: y. g0 ?0 y4 J, u
*/  {# N' P/ U0 U& t2 T5 Z1 V
is% e7 T& z& U5 Y8 S% V
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 k" i: U' _8 Kdo
6 ?. j7 I, o% X7 ~/ a        Lan := rootfolder.Internal.Tools.AOLlanguage;3 w4 o" j9 i# h5 U0 Y
        if current = @.Destination -- else return
7 M/ ]+ H' v% ~9 }- P        then9 w6 S7 g+ S# B1 p) |: q3 _$ [
                @.Destination := void;8 }; u2 t! L1 [+ c$ {" P9 m/ u
                if @.occupied then
6 R+ u& p( D( Q6 j% |                        part := @.cont;
/ `. i7 a# l  T: e: q& b                        @.transpOrder := void;2 Y+ `9 g# ?+ z6 N& [' o# w
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ ~4 O4 a! T3 V9 m0 f: t                                @,root.eventcontroller.simTime);
2 f2 p& D8 a% B9 q                        @.HasOrder := false;
! i4 E* @6 d8 D- B                        @.DrivingHome := true;* D8 K, y& i( e
                        rgManager.tryToStartTransOrder;# H: G% B! Y( T% ]
                        if @.Destination = void7 e! d) R. B8 L
                        then -- no transport order for vehicle @
' D0 B( T, x' u4 S                                @.Destination :=
8 s* t6 I. O- ]) }, d4 W5 C) C                                rgManager.nearestFreeStation(@,track.~);& W( \% q/ N& e& t+ b& f
                                newDirection(@);   
$ ]5 A; b3 Q. r8 Y/ D4 K                                if @.Destination /= void then
9 y% Q/ n! I' ]4 |! j: F                                        @.Destination.NumReservation :=
# w3 _) M% p5 `1 Q" G! x2 K. H6 W                                        @.Destination.NumReservation + 1;6 S9 V3 n( j7 }# T8 @+ D- R: i
                                end;2 I6 ]8 A( p- m
                                @.CurrIcon := "drivingHome";
9 n$ q: e8 {/ l$ j' `                                @.DrivingHome := true;4 z$ B4 O. T9 ?8 n1 T+ @0 D. P
                        end;
( J# ]" z* {/ ?6 s! ~# h6 q7 y4 W                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- t, n7 i$ l) r                        part := @.transpOrder;: V+ v; q' C; V2 @; a8 E
                        part.move(@);-- load part
- p$ N8 _3 E% h! L3 V                        @.CurrIcon := "load";
# _8 d* x9 U' n5 B! o                        GlobalDistObj := part.globDestination;& o( m. B: k/ U" A) x0 m7 A
                        assignLObj := rgmanager.rgAssignL;9 `- Y& H4 ^' u+ l4 M
                        row := assignLObj.getRowNo(GlobalDistObj);
9 O" l' _3 z, Q* y: x% `* e7 ?5 C                        if Row = -1 then -- since 702 q2 |7 y3 j: K# x
                                if lan=1 then
6 C' }& L6 {5 B: Z' L% a  J                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) Q$ s/ T. y6 w6 o$ W- Z
                                                to_str("in der Andockstation: \"",?.~.name,"\""));  Z6 q  W' d: ]' ^/ w/ n) G8 N
                                else1 F8 a( I5 Q% [: s
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 w6 R% f4 f% P) U                                                to_str("in docking station: \"",?.~.name,"\""));                                / O. U8 @1 E8 ^
                                end;
  [8 s3 |9 q* i" H. T                        else% U4 P# h3 `% v2 t7 T
                                @.Destination := assignLObj[1,row];
! H8 `+ T! B& Y' p                        end;                        6 R) G+ m5 ]) m' i- {' H
                        newDirection(@);" D2 A, c4 e5 C' u# T' _
                        @.HasOrder := true;
2 u, o7 o# j" S7 ^& P# {/ W                end;
) }  b- B) Y, d( J  O; J. F& }/ G        end;
% J) L& c) a3 zend;        -- of the method: y- u0 r6 {2 L! W, O0 y
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 L8 e( I, q' M* w# {  d" z6 z) H) Z0 }. y/ }" q. j) s1 o9 G+ u
这是AGV_putin中arrive的method。
4 r' ^- ^# g, ?) k  W/ \$ B  @* R  v! L
当到达物料速度越高时,这个报警更多,
" [0 @3 X" g* l4 J8 J0 E% y) Q可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。- F$ h, Y2 x, n9 h
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
  y2 b7 c$ ^  q' `* G, S( U; v# d# a1 \) y  q) l; q
另外一个小建议,就是move,所有的move都可以这样' r: h/ L$ k2 i0 [+ J$ W# I, w
if not move() then debug end* y* ~1 D+ |8 Z2 J* B
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。. p6 _) @3 O% k
plant simulation中的free libraries有AGV模板,' b* H1 |, u' X1 u! z% S
里面也有案例。
; u9 w7 p# Z1 y* C我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
( m6 e% K( ^6 j) S( z* n2 h- t# o" n# S+ b# O7 `- e
我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
# f$ a, F, t* ~1 v& X, Y1 g8 H- E0 _7 l. I7 t9 J7 S; B, g
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
# I. B! Z/ E! L( i9 F这是AGV_putin中arrive的method。3 Y" G; _: V1 {7 d5 ^) K" L
- A3 X7 g  D; B! s; s1 X' x
当到达物料速度越高时,这个报警更多,
" m) X# k, h$ A  j4 _1 z
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-16 04:21 , Processed in 0.020443 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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