设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4962|回复: 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': M/ x" F: K0 ?2 J: A
*/
( s# _# I* F+ J) e* Y3 X* lis0 Y- D2 _8 c1 Q/ V3 t
        part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 e2 ?6 q# z, a; h" B+ v6 |" E" pdo
4 V& N$ w9 y, b" Z        Lan := rootfolder.Internal.Tools.AOLlanguage;
3 `+ Y8 i5 h* @; k2 o        if current = @.Destination -- else return
: Q# d0 }6 G* E. s  ?        then
, Z( n4 O7 }, B8 B5 I                @.Destination := void;
0 S( v! x9 ^5 y2 V1 K" \                if @.occupied then
% x7 N' |0 a" k! p* v                        part := @.cont;( {/ `' V. s2 U% `# Q
                        @.transpOrder := void;- i( s  i$ f7 }4 R$ ^
                        part.move(partExit);-- unload is already possible                        rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 g% N* m5 i) K$ J6 t; k
                                @,root.eventcontroller.simTime);
. D. s) _4 T$ q( C5 h                        @.HasOrder := false;* r1 D/ j' k! @6 G: D& E
                        @.DrivingHome := true;
% l- Y& Q7 A; g; c                        rgManager.tryToStartTransOrder;! \! P' D& |8 p7 v- U: ^' K
                        if @.Destination = void
" ^8 D; K4 I7 Z  Q% Z+ G' T                        then -- no transport order for vehicle @
$ ^2 g0 |5 g; ?; @. V                                @.Destination :=2 k: |$ G) y: D
                                rgManager.nearestFreeStation(@,track.~);9 d) \3 r0 n8 V+ @
                                newDirection(@);   3 X8 S% V4 n: @+ y' M
                                if @.Destination /= void then
, x. G# ~/ F) I" p$ d1 P                                        @.Destination.NumReservation :=
% r+ p# ^; v: |                                        @.Destination.NumReservation + 1;$ j% c- y; M0 T4 Y/ ?) q  Q: M
                                end;
/ N3 ^# G* n  c) h                                @.CurrIcon := "drivingHome";
4 S: l$ X, d- L* N$ B4 w' U. N                                @.DrivingHome := true;9 O* M% u) y7 A6 m- ?
                        end;0 @5 A. ]. M1 u4 u
                else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* ^/ j7 g5 y6 r3 R* C. }4 j                        part := @.transpOrder;, p0 }: n7 Z  y* r
                        part.move(@);-- load part
- n# N; x0 w" q, k! i                        @.CurrIcon := "load";0 V( B- H* X: Z- U
                        GlobalDistObj := part.globDestination;
: q7 m" h1 d2 J# c% k8 r                        assignLObj := rgmanager.rgAssignL;0 k) ~1 @: p( b: H
                        row := assignLObj.getRowNo(GlobalDistObj);
9 T7 t( l0 \2 J: w. L/ _                        if Row = -1 then -- since 70
, h! ?; e/ m6 E# Y9 L                                if lan=1 then
6 g* S# O0 L; _; n( i: {9 t                                        promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 P+ n( s5 w  J' d) ?- S, ^. Y
                                                to_str("in der Andockstation: \"",?.~.name,"\""));, {4 ?  w3 B$ y+ k7 R
                                else
9 {* U* j$ Q; j+ @8 g  D- o; k# a                                        promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 e. U& E0 c) G6 Y& w1 s2 _                                                to_str("in docking station: \"",?.~.name,"\""));                               
- t6 p' u, V2 ]! n. W                                end;
& L$ ], u* l' H1 g1 e! E7 D                        else. q$ q" C6 m9 m3 j; W( i! J2 K
                                @.Destination := assignLObj[1,row];# Q' K/ Y, c, E  p9 R
                        end;                       
* x0 ~2 s5 w8 C' D. k: f' R/ F                        newDirection(@);: S4 j6 ]9 T9 c4 y9 S$ n3 p
                        @.HasOrder := true;$ `/ C0 i" O+ @( @  v" O: Q
                end;
" g3 p' L" Z* [, R2 q        end;" r6 Q4 t& @# D! b! \
end;        -- of the method
+ F& ^: t! ^8 B
 楼主| 发表于 2011-11-17 11:08:06 | 显示全部楼层
本帖最后由 kuka 于 2011-11-17 11:10 编辑
$ ?& J1 X: n8 o9 G9 \
  A2 N- p6 r+ m4 Q这是AGV_putin中arrive的method。
4 f. H& G7 Y8 d; B7 d; \, E
! V6 c. r- k2 L1 ^! w3 o5 N- k6 }当到达物料速度越高时,这个报警更多,
5 t7 B0 w' X1 J可能是到达物料分给了小车,而小车上已有有物料不能接受,所以发生了冲突。
1 M! _. x. I& b& O* o  ~" o程序解决这个冲突程序是暂缓到partExit,但是AGV模板提示这个无效。
发表于 2011-11-25 19:15:24 | 显示全部楼层
是不是partexit未定义或者路径不对?' e8 M5 v: l7 R! q. ~
, L! x; O! v9 A4 _* P  M5 x2 H* f& u
另外一个小建议,就是move,所有的move都可以这样* s# I4 U1 K) Z9 E$ r# ~1 W' q
if not move() then debug end
- s( N0 k: w$ H5 Y+ P+ Y这样一旦move有问题就会报错 便于检查和修改
发表于 2011-11-25 19:20:37 | 显示全部楼层
另外弱弱的问一句 AGV是神马 o(╯□╰)o
 楼主| 发表于 2011-11-26 19:26:51 | 显示全部楼层
AGV(Automated Guided Vehicle)自动导引小车。# m+ f% s3 w4 ]# l- X
plant simulation中的free libraries有AGV模板,3 `. v$ x8 A7 B2 k5 ?( G- S# U: {
里面也有案例。
6 ~( m6 d: l9 [/ ?我运行过案例,没有发现这种报错,可能案例模型没有发生冲突,运行不到if下面这块。
. ]6 m- G2 v0 M( n
$ {6 `6 {7 t8 D我开了一下模板,的确没有定义partexit,它可能是一个队列对象,不知道怎么定义。
发表于 2011-11-26 20:09:15 | 显示全部楼层
因为是用的move,可以直接在模型里建立一个缓存模块,比如buffer之类的,容量定义为-1,move的目标指向这个缓存就可以了,囧。。。不过其实我个人不推荐这种解决方法,因为实际中并不存在这种缓存。。。
发表于 2011-11-26 20:10:15 | 显示全部楼层
本帖最后由 五五 于 2011-11-26 20:10 编辑 & b6 y9 P& p7 ^) ?

+ u7 I* v; W) _: ?6 P0 N那么 Automated Guided Vehicle 是不是就是小车的自动寻路系统那个呀 还是还有其他功能或者模块咩
发表于 2011-11-26 20:12:36 | 显示全部楼层
kuka 发表于 2011-11-17 11:08 " s0 U; B6 G& ]6 V
这是AGV_putin中arrive的method。
' L- d( W) D# E) R" V7 o- V# y) X4 }/ @1 C! D% V: j6 e
当到达物料速度越高时,这个报警更多,
+ W; I/ y, M- _  y
另外 一般对于容量有限的小车 我个人觉得还是更早引入容量控制比较好些 而不是在装运是才报警
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-9-16 21:20 , Processed in 0.017867 second(s), 15 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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