设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6807|回复: 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'- C8 a) g0 l! p: N
*/
! [% P/ M% E& I0 k3 U4 Iis
" S- w0 C/ J% k5 j        part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 U  z9 r+ j* a
do" m* B  Q4 I! b/ h7 N
        Lan := rootfolder.Internal.Tools.AOLlanguage;. w( ^. E. U8 R
        if current = @.Destination -- else return
2 c  Y2 W$ }* e" A- D        then
; [! I! c/ I* }0 m                @.Destination := void;! U; Z% I/ ~& S5 V( l# h% A, \, g
                if @.occupied then4 h! M3 V; c* T! N5 ~" S
                        part := @.cont;' |4 V2 X' Y* L
                        @.transpOrder := void;
! h5 J  c& e2 W) p( V5 I! Y) K                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# h8 j5 \; S; V* e& k- `/ Z- q. r                                @,root.eventcontroller.simTime);+ X4 X5 f, @- p  q# g) `  G/ c
                        @.HasOrder := false;
9 {) F4 A2 x, ?7 X1 J                        @.DrivingHome := true;
1 @7 S  n9 j0 a& ]! O4 Q; [                        rgManager.tryToStartTransOrder;$ ?" @: x- g% F& E0 J
                        if @.Destination = void
' C! B0 P! m% a+ c( e" j                        then -- no transport order for vehicle @
7 ^) z( c8 T8 v8 L                                @.Destination :=; D4 s" X0 w$ C; |5 j& D
                                rgManager.nearestFreeStation(@,track.~);9 r! A; U9 e! z
                                newDirection(@);   
  E6 m3 v2 i* x                                if @.Destination /= void then
3 u/ L, ~8 g( {5 j- p                                        @.Destination.NumReservation :=
3 z7 Y6 Y+ Y& o. q0 G& D% _                                        @.Destination.NumReservation + 1;  ]- ?; D; r% u
                                end;
$ w7 @7 P& t, j. ~7 E5 Z                                @.CurrIcon := "drivingHome";
- W6 Z) q1 k9 \  O1 j                                @.DrivingHome := true;
# [. F# @9 q- i5 C                        end;  d" }1 E% h. O" e+ G, T
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ t4 |. ?& U# v
                        part := @.transpOrder;' G7 Q6 x1 d5 l: f0 B4 h% m
                        part.move(@);-- load part
3 `( O9 p  f/ P. K' u                        @.CurrIcon := "load";
8 e- n0 k( M3 @0 d$ ]* f5 D$ S                        GlobalDistObj := part.globDestination;7 H; z% D# Q* c/ o0 Z' I/ J7 t( X
                        assignLObj := rgmanager.rgAssignL;/ ?6 }5 K. W! v- `$ W& r: `
                        row := assignLObj.getRowNo(GlobalDistObj);
7 p3 D/ c/ i$ _9 _1 `                        if Row = -1 then -- since 70
+ l" L  _3 V" W                                if lan=1 then
2 h5 g" m  i1 l$ k                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( `8 p- A& I( f2 a$ t0 ^4 R4 V                                                to_str("in der Andockstation: \"",?.~.name,"\""));
' h; M( J- B( F                                else" n4 R5 v# H$ m8 h  U/ |
                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 e8 o/ a* a2 `/ W* L$ w' V( x5 J
                                                to_str("in docking station: \"",?.~.name,"\""));                               
5 W) r3 P2 ]8 }3 r# c7 \                                end;
2 `8 \! P0 e2 E% X% m- R                        else
/ n, @; P0 D( d" g                                @.Destination := assignLObj[1,row];( ]8 V6 s" C7 X- d
                        end;                       
( m8 E2 ?( r: [8 v                        newDirection(@);
$ ~7 @* M) g" _" T4 P  e                        @.HasOrder := true;
/ c# A: Y; c7 s) T                end;8 k; X, z0 S: F! o2 n6 z) Z, e$ S& k
        end;
# `- R5 }% B! u+ q  Iend;        -- of the method7 t: o" Y* n; |/ }# W; {' D$ M
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑 ( `2 z, L9 Q& q# w

! o) s+ h2 S- L! b$ m. u! w这是AGV_putin中arrive的method。) w* `( ~) O3 I7 [) |
' Y! p; c  i. D* q0 c. _1 \0 S; Q
当到达物料速度越高时,这个报警更多,
0 |1 |7 M, B4 _- P- N- w4 H2 ^- o2 c可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
2 y2 I% s- Q' g+ C0 A程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?+ B( Z, d" w; y6 s! ~

, S$ g- S2 d4 n+ ]2 c另外一个小建议,就是move,所有的move都可以这样
& A  p% Z% j5 v5 ]6 kif not move() then debug end' c2 {7 H* q9 {
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。; H! C) R* y- R2 l) v5 g( V5 l
plant simulation中的free libraries有AGV模板,
9 K6 r! Y: e  Z8 x$ X+ t- b9 Z里面也有案例。
6 _3 g& x2 p& x我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。+ _0 z! G, [; ^

3 h; y: V  {3 L$ y( E3 V我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 1 l4 f% w* m" c) t

2 F5 a2 A! y/ D' }) X: m0 T那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 ) o4 O; Q- {& o  \! d* L1 y& s/ D
这是AGV_putin中arrive的method。
: l- P, s8 \; P( A+ d  @3 f0 W& n. }; U/ V
当到达物料速度越高时,这个报警更多,
, I- [4 y% y1 E$ E! Y
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-2-27 22:02 , Processed in 0.016690 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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