设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5696|回复: 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; P: X# z& o( ^
*/' l/ @- L, \6 a$ m
is5 U! S5 C' A  I6 S+ b- W
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;' G6 h& {' n+ |0 f# X9 _" P
do. d) O9 m8 Y+ B* m, u
        Lan := rootfolder.Internal.Tools.AOLlanguage;
8 ^" ?! M2 ^* N6 P1 F, Z' E9 \, z. s        if current = @.Destination -- else return+ G" K4 _  t8 g, b8 P: Z
        then
1 a& _7 l1 m3 A1 L" Q- d                @.Destination := void;
4 {+ ?) H- G) K3 }/ y' b7 u. d# d' C                if @.occupied then
: Z  V; ~' I6 E" t- c' Q: E                        part := @.cont;
6 V' b3 X- n0 l' J, y8 g0 B                        @.transpOrder := void;
2 @5 L: x7 t9 l6 ~% H                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# Q6 G+ s' o5 X" [4 H+ m' q, M
                                @,root.eventcontroller.simTime);1 \/ t" [3 n3 A" _( J, u' L
                        @.HasOrder := false;
% J% V' @* @0 r7 x. [- B" }                        @.DrivingHome := true;
" Q9 R/ e1 G# j, |2 b2 o                        rgManager.tryToStartTransOrder;
) N1 Z; i' s+ l7 ]$ U# @' _, z2 Y                        if @.Destination = void" O  _7 x! }; ?4 I2 X" j4 Z/ G
                        then -- no transport order for vehicle @
$ N6 b" M1 ]" `                                @.Destination :=$ c: ?/ H9 a+ H) q
                                rgManager.nearestFreeStation(@,track.~);! }' W( G; z% f- L
                                newDirection(@);   ( G  \, Y& }, d
                                if @.Destination /= void then. K4 L/ ?( ~  d6 f6 y; @* r) w+ I/ b
                                        @.Destination.NumReservation :=
' ]: |. T$ C9 p. g                                        @.Destination.NumReservation + 1;' w! E$ Y7 B5 K8 [, B7 W; x! J5 [) k1 H
                                end;
4 y# Q* o# a2 R6 B6 B5 v# M                                @.CurrIcon := "drivingHome";) [$ N0 u) l8 C( J$ |# o$ B
                                @.DrivingHome := true;
7 `# Z& \, E! Y/ _7 G                        end;
0 C- `- S+ c) F5 V: d" }                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ]1 Z; J+ ], \/ ?7 v3 h, I                        part := @.transpOrder;
! v! g. u' P8 S1 @! l1 ?3 V' T                        part.move(@);-- load part
! U7 k% G: C1 x5 U3 O                        @.CurrIcon := "load";
( Y: o1 i1 P0 _8 ?' _                        GlobalDistObj := part.globDestination;
) ?3 N4 y5 E& [  a# }                        assignLObj := rgmanager.rgAssignL;$ C9 C) M8 u) M8 f; {
                        row := assignLObj.getRowNo(GlobalDistObj);: ~# S( R; M/ z3 s$ s! {
                        if Row = -1 then -- since 70+ ^( {5 u) Z1 m: K9 V# {8 D, Q
                                if lan=1 then1 V5 r  G  e5 o+ V% [
                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& S/ i0 k* B0 T
                                                to_str("in der Andockstation: \"",?.~.name,"\""));) h/ T. |! `2 j) ^+ I2 }/ r3 t- l* x
                                else+ l: P2 T0 T* Q% ~9 |
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' I( @6 f) K) s+ p                                                to_str("in docking station: \"",?.~.name,"\""));                                1 F. @+ J: ^( m  O
                                end;8 ~$ V! w4 R, p4 |1 Q2 ?
                        else
- n* n6 I2 A9 U& n: n  x6 A$ X* d                                @.Destination := assignLObj[1,row];
+ z; w  ~! l4 y0 }" }* |/ _  r: Y# K                        end;                       
0 w) Z3 D8 k& {                        newDirection(@);
9 J4 E4 Y  C4 v                        @.HasOrder := true;5 C5 u7 ^' V: I3 X  r
                end;
' T+ G8 Q3 h+ @( x9 N+ Z) s, n        end;
0 f6 p) _$ H. Kend;        -- of the method
1 t+ r7 r% [5 K% k5 N1 U0 {
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
9 q5 `4 P" g$ \9 R9 N( s5 o0 j8 L" x* q. D. f: w4 x* P; o
这是AGV_putin中arrive的method。
2 y* ~$ b  w& b9 B7 C- Y
: L0 R( k! M) n当到达物料速度越高时,这个报警更多,2 f0 i- c; X" M) k
可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。/ u7 s, |% V7 \) M
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
! v4 d) C+ @7 ^, }8 T1 n+ r
" b( F. x0 B; o3 \! Z/ |另外一个小建议,就是move,所有的move都可以这样
8 l7 V* [) d5 d3 Gif not move() then debug end' a9 d  T: `& O9 h; x1 \) D0 [/ m
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。7 O0 W" y4 P/ V6 w
plant simulation中的free libraries有AGV模板,
; G; W7 |  S2 ~+ g% a" Q1 R里面也有案例。
& t9 v( I9 s2 G; o9 Y: Y6 ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
8 h: D) G& A% x! m
8 o9 R9 u% H( U' D- O1 T6 h$ o" N# s我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 " P, q1 h; W. Z
/ k& T$ d& v; [2 S0 o( l
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 / _2 U( G! H! B* h& ]9 m
这是AGV_putin中arrive的method。" J) Y* _, n/ L
& ]/ U( h! m1 m! ^+ Y/ H0 E
当到达物料速度越高时,这个报警更多,

8 E) i% H# l) P; d9 k" D5 q5 B( Q另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-14 20:13 , Processed in 0.015124 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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