设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9130|回复: 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', [- u1 P* I3 C! V: P
*/
  v: G9 m6 K% m& G! _is
4 p4 x% B% l3 Y- G3 p0 @8 R; P4 L        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' k1 I) d  K+ Q! fdo2 A' D& I3 Y! W3 p1 D  P
        Lan := rootfolder.Internal.Tools.AOLlanguage;+ q' ~! R* ^5 I0 Z/ Q5 Y
        if current = @.Destination -- else return
7 C$ i( x2 P4 v+ d2 S% I% `        then8 O6 r+ ?( U( n3 `9 x
                @.Destination := void;
' w' I2 W! R; w                if @.occupied then4 C% ~( b& L% o8 e
                        part := @.cont;8 x8 P6 P4 ~2 j" R
                        @.transpOrder := void;& ~, l/ ?* J% v6 o
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 H' F4 I4 d  i. p# d2 s( s7 B* j( Y8 y                                @,root.eventcontroller.simTime);2 R) c' J- T5 w. T# c: }0 L
                        @.HasOrder := false;
: [6 b: y, m& _" Z0 [2 h                        @.DrivingHome := true;5 l3 l; d  @7 f; G# I1 P9 a
                        rgManager.tryToStartTransOrder;2 g% U2 n! _' R# p
                        if @.Destination = void
1 l$ x: w  ~7 g7 t5 \                        then -- no transport order for vehicle @
" O  I, ^% W- f4 M                                @.Destination :=4 I+ s5 T) P) k7 z+ y
                                rgManager.nearestFreeStation(@,track.~);6 i8 U* u1 x7 `# f+ B
                                newDirection(@);   0 ~1 F/ q" I! I; r( ~8 R
                                if @.Destination /= void then
1 M2 {- f1 m8 A- T                                        @.Destination.NumReservation :=  K) f) Y, J& q& n$ x
                                        @.Destination.NumReservation + 1;$ J/ R) o$ J. _+ ?. v4 G
                                end;
! i; w) Z. g+ {                                @.CurrIcon := "drivingHome";
5 B8 l5 u- n1 b; r# ]                                @.DrivingHome := true;
  n9 N$ ?5 ^/ h2 L                        end;
) B: ?& S! s: [& P$ I8 S/ k                else -- the vehicle @ is empty, both vehicle and part are in the same dock station( L5 R- A+ Q, x4 R
                        part := @.transpOrder;
) S/ }' R9 E) i: v* i* N                        part.move(@);-- load part
( _9 g% o& M1 v) R8 c/ K                        @.CurrIcon := "load";
' q% p% P) g' `  {8 E                        GlobalDistObj := part.globDestination;+ t! ]. J  U4 Z0 Z; C: v
                        assignLObj := rgmanager.rgAssignL;
5 Q$ w- U: ~( S+ B                        row := assignLObj.getRowNo(GlobalDistObj);
3 k0 T+ q  x( f( Q% T+ B, L' P                        if Row = -1 then -- since 70/ y6 S: M4 i/ T
                                if lan=1 then
( e9 @! `# \+ i) P                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" h* O0 W! G' R+ w: w) H+ v                                                to_str("in der Andockstation: \"",?.~.name,"\""));+ ?5 f" K% Y/ o- b2 n* X
                                else
# z, y" f  K3 o1 K7 p9 u6 s                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 G$ K- ]6 x. q  L+ F$ D
                                                to_str("in docking station: \"",?.~.name,"\""));                               
% i0 \$ f1 f3 G/ Y4 [6 G# w                                end;
! k6 }1 S6 R' ~0 q' `8 J* F                        else( \# v) }1 {+ X
                                @.Destination := assignLObj[1,row];4 ?( g/ _! y6 t+ ?1 G+ b
                        end;                       
4 b3 C% Z) y/ c: M                        newDirection(@);
& g4 u7 Y6 |% M, f6 e$ R2 h& E- V: S                        @.HasOrder := true;; s$ O0 b, K; t* x# R! M
                end;
: U* i$ U. }9 [4 ?- h: s  M        end;) e" [% k8 @( n; t
end;        -- of the method
% q- H5 q" r. Q1 V, }& V
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
5 t/ B' K6 a5 H( _, E5 D/ W3 C
0 g# f3 a$ O/ m/ d* T这是AGV_putin中arrive的method。
' f- t3 ^. U- r7 X7 |1 |/ r
$ ]6 J2 |6 C! R0 d当到达物料速度越高时,这个报警更多,
* q% i8 S: H; O) w5 f, `可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。+ J- Y4 s/ d) s- G* |
程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?
; R6 i4 J' V7 X; B. h: Q
3 ~4 t& ]6 A# A# B% a/ H另外一个小建议,就是move,所有的move都可以这样
6 A* M, I) L' Nif not move() then debug end8 D# ]8 L- |' j8 ?
这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。
6 P( X+ D# p, {( f" \6 y& t$ Cplant simulation中的free libraries有AGV模板,8 r( k- L0 X) \
里面也有案例。
7 }9 L) v- L1 V# E/ y5 Z我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
/ p! M# w! X# Z6 L
3 G7 z2 M# X$ b9 B3 C1 d' O: {我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑
4 Q& o9 D" z6 D- a
9 Q+ \& J& p" |% }% m5 _" p* r3 _那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08
' L  \4 g1 h3 h; N/ Y2 W这是AGV_putin中arrive的method。
9 o; q8 r4 h# x9 Q; B6 F0 a& P: D* c
当到达物料速度越高时,这个报警更多,
8 \9 j* b0 w. c1 i, J- V
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-15 13:06 , Processed in 0.017792 second(s), 16 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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