设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6803|回复: 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'
; F5 c/ U/ L' i) {5 O*/+ z% S5 o2 |% g6 ^8 P8 O: F
is
/ @: Q( Z! T! M" G, q        part, GlobalDistObj, assignLObj:object;row,Lan:integer;) x6 Q- g6 P3 Z. K8 d
do1 [! E  \; E6 ?: L, S% B+ r
        Lan := rootfolder.Internal.Tools.AOLlanguage;) h- |2 L1 d; \. Z
        if current = @.Destination -- else return
( |( c9 ^9 k5 v4 R        then7 c2 a: ]7 R5 F' m8 u* a* P
                @.Destination := void;
+ j* n; R7 e5 @                if @.occupied then
# f  K# r6 \; {% ]! g5 `                        part := @.cont;
0 R, j8 Z" \: t4 k2 i& Q# b                        @.transpOrder := void;
" t* U% Z% ~$ {7 F. p$ o2 V* |                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) a" H7 p9 [' P+ k9 o: e8 G                                @,root.eventcontroller.simTime);
$ M8 M3 v* w8 w: s; _                        @.HasOrder := false;
  R+ g0 \( z; e: e8 n* p  g1 z                        @.DrivingHome := true;; `2 M  I- K3 |
                        rgManager.tryToStartTransOrder;
* w- K* N) [: S! P                        if @.Destination = void
9 L; N+ h+ }( _  K* z2 d                        then -- no transport order for vehicle @1 i8 f( h3 e4 r, \  J) ?
                                @.Destination :=
* a" b7 h* `3 d0 d: N                                rgManager.nearestFreeStation(@,track.~);
  ?2 J: g$ o2 [% B; E! `8 _                                newDirection(@);   
6 {2 b( O  b5 {                                if @.Destination /= void then) p% I$ Y$ I/ Y0 i+ J1 a7 }7 h' C
                                        @.Destination.NumReservation :=
4 Y9 K& A8 S: ?/ ~, Q/ k                                        @.Destination.NumReservation + 1;
7 ^0 U; y: p3 v1 Y) K" v                                end;  I. W; ~/ V* K2 J
                                @.CurrIcon := "drivingHome";7 Q' G4 `( h; k; O9 H
                                @.DrivingHome := true;
& G3 a' z' `! s1 q6 q                        end;
) T* @( ^% x( y7 G                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ i' K8 ?/ B- b! }2 m* s3 f  t- f                        part := @.transpOrder;
# ^* u  U4 H) a' q                        part.move(@);-- load part
1 ~# a! I; F: @1 R                        @.CurrIcon := "load";
, ~' ^% c  L9 z4 B( I                        GlobalDistObj := part.globDestination;4 |2 X: W4 u4 u$ x- k! b
                        assignLObj := rgmanager.rgAssignL;
, x( t! |& |6 I                        row := assignLObj.getRowNo(GlobalDistObj);* z' X" e; K1 m- R8 X/ O! Q( ~
                        if Row = -1 then -- since 70$ Z- F( E! n' p. ?/ _
                                if lan=1 then
8 |  N5 t% U% C0 A                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- I; b! T, a* K3 h6 i. P                                                to_str("in der Andockstation: \"",?.~.name,"\""));" p0 T- e+ @4 z9 z3 }5 P
                                else- Z5 A* D" [; K
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: X& q5 O" J. h- F  b+ B                                                to_str("in docking station: \"",?.~.name,"\""));                               
  U8 g8 q* j8 Y: K) _! K2 B                                end;
: l9 y# u6 r' S) c7 B. y+ Q5 `7 m                        else5 Y2 Z3 ?' Q% Y) G& m
                                @.Destination := assignLObj[1,row];
' k% W: g& h# ?/ D* z& U; w9 t/ z                        end;                       
! D2 H. }4 N9 t5 K! i3 M                        newDirection(@);
* Z: @, d/ T" y. n                        @.HasOrder := true;2 f. h; c6 V  A) T, L( N
                end;
$ F) j% I1 H$ ]' ]        end;/ ]. a: W9 H- I+ M
end;        -- of the method
) L- d- l9 ]8 @2 X5 N
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 1 |1 |% a5 D, `; |! c% m, _( l
" x3 Q4 _1 [5 O
这是AGV_putin中arrive的method。# L7 Y+ h: h" J9 Y3 o, d# [8 [; y  B. S8 f

! z) I1 O1 o  [: n* G; [" o2 n当到达物料速度越高时,这个报警更多,
% Z6 c0 o" N8 h, i可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
- w6 E- g3 z/ U7 D4 P5 p程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?, a0 S3 w; l! V( _
; b0 U  h, H9 t5 i# T5 O9 v& {6 X
另外一个小建议,就是move,所有的move都可以这样
6 `2 M( ]. t+ D1 J( r" I5 Hif not move() then debug end4 s* `4 J2 x4 M8 O
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。4 K7 Q* R6 F; }
plant simulation中的free libraries有AGV模板,
) @- `: f" Y0 c2 X里面也有案例。
1 y7 n( F  D' {* \8 U' K我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。& Q/ {3 D/ \& g; {. H

9 W3 @' \! w) T$ {9 j9 H, V) j5 q( E我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
6 t+ {$ y& L" _
' S5 O& v; s; V% r- `$ g那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 8 h  A/ ^. D* p9 [8 E1 {! x
这是AGV_putin中arrive的method。
1 X" j& D: p7 f) d5 o. i* m6 A- m& t  P# e  W
当到达物料速度越高时,这个报警更多,
$ ?/ C7 f" r1 A' _! E
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-27 16:05 , Processed in 2.960390 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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