设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9522|回复: 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'3 O6 m9 p/ i1 t1 G  i" W
*/
- a8 C( g& C4 ris
- Z* K9 h9 ]8 F        part, GlobalDistObj, assignLObj:object;row,Lan:integer;: h# X( C$ L% {$ f2 H
do6 q5 k$ U1 p+ P# r0 }: A# {8 A
        Lan := rootfolder.Internal.Tools.AOLlanguage;) _. e, C1 k! O; ~
        if current = @.Destination -- else return
6 N1 F3 ?( a/ X/ ~        then
) ?  c# D3 L1 U% x                @.Destination := void;9 `/ x1 B6 X' c0 f( t# v. x& B# ~
                if @.occupied then
9 T* p1 J# Y' C5 n9 @2 K9 U                        part := @.cont;
0 ^% Q, Q5 q& H. M/ k# M                        @.transpOrder := void;2 @3 `% f- U. E2 W
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# I+ U* H; P2 B+ f/ o                                @,root.eventcontroller.simTime);, n' X4 _+ u1 n$ b( e6 S4 u
                        @.HasOrder := false;) |) j8 \8 B6 k% H' C  \
                        @.DrivingHome := true;% ~" |& [- T. _
                        rgManager.tryToStartTransOrder;
# ?4 H8 s. f' @  W                        if @.Destination = void: t9 q; r) Q" t# T
                        then -- no transport order for vehicle @
) ?* V' o& C+ O; z8 X# y2 A6 q                                @.Destination :=6 m0 ]6 X- S' N; M
                                rgManager.nearestFreeStation(@,track.~);
; S7 F" i2 d! [* L7 y" S  l                                newDirection(@);   
; N7 S( h# r) c3 T1 F0 ^                                if @.Destination /= void then
: }, v8 `) Y* `- t& D                                        @.Destination.NumReservation :=
, ^' W. [' g- D: R7 K+ l& m) b                                        @.Destination.NumReservation + 1;$ f9 C$ A! K0 v7 e) M% k
                                end;
! T9 |; ?1 {8 O" w7 ?9 p                                @.CurrIcon := "drivingHome";
/ r6 @2 {. t/ a- S1 o9 P8 Y0 ^                                @.DrivingHome := true;
$ v: ]  ~( h. Z" X* d# y                        end;! C$ N$ v1 M% H& R7 U& @
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 A, {* M# D( b0 P. N5 m
                        part := @.transpOrder;
8 _0 a; T: M) h, E                        part.move(@);-- load part
0 k, R" ~  [5 R                        @.CurrIcon := "load";* }: L3 h* ^0 Q: f8 m
                        GlobalDistObj := part.globDestination;3 y& e7 G' Z' b/ y  s2 y3 k* K
                        assignLObj := rgmanager.rgAssignL;% ~  p% I' V* J$ L
                        row := assignLObj.getRowNo(GlobalDistObj);
  g4 [' U) v: d" ~& y                        if Row = -1 then -- since 70
# i) D$ W% r; J# h                                if lan=1 then
8 O; L5 u& h/ m/ Z2 \) f' r                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 B# \' `% X1 |0 R
                                                to_str("in der Andockstation: \"",?.~.name,"\""));  r& f* h& M- x; H
                                else
$ P, W5 @9 G3 p2 ?- @. i. I                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% W( a! D8 a- w" x' v                                                to_str("in docking station: \"",?.~.name,"\""));                                : U7 B1 O  i0 G1 D$ l0 d/ g: p. r
                                end;3 Q' P% i' |+ c' x  T' I
                        else- T1 m: B( s/ O" _: C
                                @.Destination := assignLObj[1,row];7 [9 g) j/ k7 p2 |
                        end;                        5 `; r. C- F6 D5 c" L& v
                        newDirection(@);
2 B5 P4 U7 {" @8 _) U/ J# Q' U* [                        @.HasOrder := true;$ t9 c# |  W8 Y  ?
                end;  l! p) ~# j$ ~: I1 F
        end;
7 N% v, C5 f+ B1 G! q( Z5 dend;        -- of the method! ]; }- S6 V3 @8 A  M! N9 ~
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 3 d# i  ?( |' J2 z6 f, Z- O

. w+ N6 g' K5 _' O/ S. {% Z8 _1 N这是AGV_putin中arrive的method。- f6 X" ?; p% w1 U
. F) r  q' `8 P1 j/ B
当到达物料速度越高时,这个报警更多,
9 k/ Z7 F4 i+ ?* Y2 u可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
8 x" ?# D2 I7 t, ]2 p0 K  P  G. d# q4 d程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?" ~; d% \6 c1 W: r# x1 g3 k7 B
7 R2 i& h; g. V; [. Z
另外一个小建议,就是move,所有的move都可以这样
2 ]+ C4 z, f5 U0 H/ _. sif not move() then debug end
2 L) ?4 |- W, I. T这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。0 o) [8 k; W# O3 ]* O$ r
plant simulation中的free libraries有AGV模板," `- d/ V4 k- i4 P& i8 _
里面也有案例。
+ `# e$ x% u7 i$ G% [我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
) N- R) d# J2 u, G! w: I' h
$ f1 Z" J3 ~1 {+ ^6 P3 G/ {# j我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 ) a; Y1 j# R, g( H9 I3 `& \& A
5 m+ I) h. q/ `% s+ _; r  S
那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 2 o' [$ s6 t2 a# p' o$ q+ A
这是AGV_putin中arrive的method。) O& |" y& n8 }' A9 h
9 X9 Q2 e7 u: \
当到达物料速度越高时,这个报警更多,

! ]5 M6 O( @1 `: C/ [* a* w另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-5 22:49 , Processed in 0.021491 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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